Commit graph

16382 commits

Author SHA1 Message Date
Junio C Hamano 6af50f7536 Merge branch 'rs/alloc-ref'
* rs/alloc-ref:
  make alloc_ref_from_str() the new alloc_ref()
  use alloc_ref_from_str() everywhere
  add alloc_ref_with_prefix()
2008-10-21 17:58:01 -07:00
Junio C Hamano d67dd17b33 Merge branch 'jk/fix-ls-files-other'
* jk/fix-ls-files-other:
  refactor handling of "other" files in ls-files and status
2008-10-21 17:57:56 -07:00
Junio C Hamano 500ac7f42e Merge branch 'jc/maint-reset-remove-unmerged-new'
* jc/maint-reset-remove-unmerged-new:
  reset --hard/read-tree --reset -u: remove unmerged new paths
2008-10-21 13:48:41 -07:00
Junio C Hamano 20341dd970 Merge branch 'maint'
* maint:
  GIT 1.6.0.3
  rehabilitate 'git index-pack' inside the object store
2008-10-21 13:47:22 -07:00
Junio C Hamano 031e6c898f GIT 1.6.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-21 13:37:42 -07:00
Nicolas Pitre a672ea6ac5 rehabilitate 'git index-pack' inside the object store
Before commit d0b92a3f6e it was possible to run 'git index-pack'
directly in the .git/objects/pack/ directory.  Restore that ability.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-21 13:20:03 -07:00
Junio C Hamano 208f689610 Merge branch 'maint'
* maint:
  Fix testcase failure when extended attributes are in use
2008-10-20 23:40:21 -07:00
Lee Marlow f3f0c51882 workflows documentation: fix link to git-request-pull[1]
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-20 23:39:37 -07:00
Lee Marlow 99f0b59954 bash completion: Add 'workflows' to 'git help'
Completion for new workflow documentation introduced in f948dd8

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-20 23:39:28 -07:00
Junio C Hamano 35d2f73b99 Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Turn short SHA1 names into links too
  gitk: Regenerate .po files
  gitk: New way of constructing menus that allows for Alt+letter accelerators
  gitk: Bind Key-Return to create on new branch dialog
  gitk: Fix binding for <Return> in sha1 entry field
  gitk: Clean up file encoding code and add enable/disable option
  gitk: Implement batch lookup and caching of encoding attrs
  gitk: Enhance file encoding support
  gitk: Add untranslated error messages to translation
  gitk: Fix a bug in collapsing deeply nested trees
  gitk: Use <Button-2> for context menus on OSX
2008-10-20 22:16:09 -07:00
Jeff King 8776f5d3bb document "intent to add" option to git-add
This was added by 3942581 but never documented.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-20 19:34:56 -07:00
Paul Mackerras d375ef9b14 gitk: Turn short SHA1 names into links too
This changes the link detection logic to accept strings of between 6
and 40 hex characters as a possible SHA1 ID of another commit, rather
than insisting on seeing the full 40 hex characters.

To make the logic that turns a possible link into an actual link work
with abbreviated IDs, this changes the way the commitinterest array is
used, and puts the code that deals with it in a pair of new functions.
The commitinterest array is now indexed by just the first 4 characters
of the interesting SHA1 ID, and each element is a list of id + command
pairs.  This also pulls out the logic for expanding an abbreviated
SHA1 to the list of matching full IDs into its own function (the way
it is done is still the same slow way it was done before, which should
be improved some day).

This also fixes the bug where clicking on a link would take you to the
wrong commit if the line number of the target had changed since the
link was made.

This is based on a patch by Linus Torvalds, but totally rewritten by me.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-10-21 10:18:52 +11:00
Junio C Hamano 5610e3b031 Fix testcase failure when extended attributes are in use
06cbe855 (Make core.sharedRepository more generic, 2008-04-16) made
several testcases in t1301-shared-repo.sh which fail if on a system
which creates files with extended attributes (e.g. SELinux), since ls
appends a '+' sign to the permission set in such cases.  In fact,
POSIX.1 allows ls to add a single printable character after the usual
3x3 permission bits to show that an optional alternate/additional access
method is associated with the path.

This fixes the testcase to strip any such sign prior to verifying the
permission set.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tested-by: Deskin Miller <deskinm@umich.edu>
2008-10-19 22:51:17 -07:00
Junio C Hamano 310237b969 Merge branch 'sh/maint-rebase3'
* sh/maint-rebase3:
  rebase--interactive: fix parent rewriting for dropped commits
2008-10-19 16:07:29 -07:00
Junio C Hamano 310d188f7e Merge branch 'tr/workflow-doc'
* tr/workflow-doc:
  Documentation: add manpage about workflows
  Documentation: Refer to git-rebase(1) to warn against rewriting
  Documentation: new upstream rebase recovery section in git-rebase
2008-10-19 16:07:23 -07:00
Junio C Hamano adcb2e0f46 Merge branch 'mv/clonev'
* mv/clonev:
  Implement git clone -v
2008-10-19 16:07:07 -07:00
Junio C Hamano 449acfabab Merge branch 'ml/cygwin-filemode'
* ml/cygwin-filemode:
  compat/cygwin.c - Use cygwin's stat if core.filemode == true
2008-10-19 16:07:02 -07:00
Junio C Hamano 94d2b854eb Merge branch 'gb/refactor-pathinfo'
* gb/refactor-pathinfo:
  gitweb: refactor input parameters parse/validation
2008-10-19 16:06:53 -07:00
Junio C Hamano 6c1c3d1753 Merge branch 'dp/checkattr'
* dp/checkattr:
  git-check-attr(1): use 'verse' for multi-line synopsis sections
  check-attr: Add --stdin option
  check-attr: add an internal check_attr() function
2008-10-19 16:06:47 -07:00
Junio C Hamano fd6e237d4e Merge branch 'gb/formatpatch-autonbr'
* gb/formatpatch-autonbr:
  format-patch: autonumber by default
2008-10-19 16:06:44 -07:00
Junio C Hamano 18e143487d Merge branch 'sp/describe-lwtag'
* sp/describe-lwtag:
  describe: Make --tags and --all match lightweight tags more often
2008-10-19 16:06:39 -07:00
Junio C Hamano edacb101ef Merge branch 'ae/preservemerge'
* ae/preservemerge:
  rebase: Support preserving merges in non-interactive mode
2008-10-19 16:06:31 -07:00
Junio C Hamano 4f2d651e5b Merge branch 'mv/merge-noff'
* mv/merge-noff:
  builtin-commit: use reduce_heads() only when appropriate

Conflicts:
	builtin-commit.c
	t/t7600-merge.sh
2008-10-19 16:06:21 -07:00
Junio C Hamano ce6e5ff435 Merge branch 'ns/rebase-noverify'
* ns/rebase-noverify:
  rebase: Document --no-verify option to bypass pre-rebase hook
  rebase --no-verify
2008-10-19 16:05:58 -07:00
Junio C Hamano 3aa615bc5d Merge branch 'maint'
* maint:
  Documentation: Clarify '--signoff' for git-commit
2008-10-19 15:53:46 -07:00
Junio C Hamano 828e32b82e Fix mismerge at cdb22c4 in builtin-checkout.c
The code to complain when -b is not given but an explicit --track/--no-track
override was given from the command line was unchanged on one branch and
reworked on the other branch.  The merge result incorrectly kept it.

Spotted by Matt McCutchen.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19 15:32:42 -07:00
Matt McCutchen e137a892d8 git-merge-recursive: honor merge.conflictstyle once again
This was originally implemented in c236bcd061
but was lost to a mismerge in 9ba929ed65.

Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19 14:49:38 -07:00
Thomas Rast f948dd8992 Documentation: add manpage about workflows
This attempts to make a manpage about workflows that is both handy to
point people at it and as a beginner's introduction.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19 14:27:59 -07:00
Fredrik Skolmli 971e83528d Documentation: Spelling fix
Signed-off-by: Fredrik Skolmli <fredrik@frsk.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-19 13:08:14 -07:00
Junio C Hamano a4aefee46d Merge branch 'pb/rename-rowin32'
* pb/rename-rowin32:
  Do not rename read-only files during a push

Looks-fine-to-me-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Johannes Sixt <johannes.sixt@telecom.at>
2008-10-19 12:38:54 -07:00
Abhijit Bhopatkar 09cff066f6 Documentation: Clarify '--signoff' for git-commit
'--signoff' uses commiter name always to add the signoff line,
make it explicit in the documentation.

Signed-off-by: Abhijit Bhopatkar <bain@devslashzero.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 22:19:52 -07:00
Junio C Hamano d1a43f2aa4 reset --hard/read-tree --reset -u: remove unmerged new paths
When aborting a failed merge that has brought in a new path using "git
reset --hard" or "git read-tree --reset -u", we used to first forget about
the new path (via read_cache_unmerged) and then matched the working tree
to what is recorded in the index, thus ending up leaving the new path in
the work tree.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 10:00:59 -07:00
Junio C Hamano 3041b98a9d Update draft release notes for 1.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 08:30:39 -07:00
Junio C Hamano 58e0fa5416 Merge branch 'maint'
* maint:
  Hopefully the final draft release notes update before 1.6.0.3
  diff(1): clarify what "T"ypechange status means
  contrib: update packinfo.pl to not use dashed commands
  force_object_loose: Fix memory leak
  tests: shell negation portability fix
2008-10-18 08:26:44 -07:00
Junio C Hamano f430c8e44d Hopefully the final draft release notes update before 1.6.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 08:26:39 -07:00
Junio C Hamano f07c3c53f8 diff(1): clarify what "T"ypechange status means
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 08:20:51 -07:00
Junio C Hamano a38bb0cc0f Merge branch 'db/maint-checkout-b' into maint
* db/maint-checkout-b:
  Check early that a new branch is new and valid
2008-10-18 08:18:11 -07:00
Brian Gernhardt a567fdcb01 format-patch: autonumber by default
format-patch is most commonly used for multiple patches at once when
sending a patchset, in which case we want to number the patches; on
the other hand, single patches are not usually expected to be
numbered.

In other words, the typical behavior expected from format-patch is the
one obtained by enabling autonumber, so we set it to be the default.

Users that want to disable numbering for a particular patchset can do
so with the existing -N command-line switch.  Users that want to
change the default behavior can use the format.numbering config key.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Test-updates-by: Jeff King <peff@peff.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 07:18:03 -07:00
Petr Baudis 33b650308c Do not rename read-only files during a push
Win32 does not allow renaming read-only files (at least on a Samba
share), making push into a local directory to fail. Thus, defer
the chmod() call in index-pack.c:final() only after
move_temp_to_file() was called.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-10-18 07:16:38 -07:00
Junio C Hamano f4a75a416f Merge branch 'pb/commit-where'
* pb/commit-where:
  tutorial: update output of git commit
  reformat informational commit message
  git commit: Reformat output somewhat
  builtin-commit.c: show on which branch a commit was added
2008-10-18 07:07:23 -07:00
René Scharfe 59c69c0c65 make alloc_ref_from_str() the new alloc_ref()
With all calls to alloc_ref() gone, we can remove it and then we're free
to give alloc_ref_from_str() the shorter name.  It's a much nicer
interface, as the callers always need to have a name string when they
allocate a ref anyway and don't need to calculate and pass its length+1
any more.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 06:53:47 -07:00
René Scharfe b0b44bc7b2 use alloc_ref_from_str() everywhere
Replace pairs of alloc_ref() and strcpy() with alloc_ref_from_str(),
simplifying the code.

In connect.c, also a pair of alloc_ref() and memcpy() is replaced --
the additional cost of a strlen() call should not have too much of an
impact.  Consistency and simplicity are more important.

In remote.c, the code was allocating 11 bytes more than needed for
the name part, but I couldn't see them being used for anything.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 06:53:47 -07:00
René Scharfe 8009768e89 add alloc_ref_with_prefix()
In three cases in remote.c, a "raw" ref is allocated using alloc_ref()
and then its is constructed using sprintf().  Clean it up by adding a
helper function, alloc_ref_with_prefix(), which creates a composite
name.  Use it in alloc_ref_from_str(), too, as it simplifies the code.

Open code alloc_ref() in alloc_ref_with_prefix(), as the former is
going to be removed in the patch after the next.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 06:53:46 -07:00
Dan McGee 3b1eb12493 contrib: update packinfo.pl to not use dashed commands
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 06:20:27 -07:00
Björn Steinbrink 1fb23e6550 force_object_loose: Fix memory leak
read_packed_sha1 expectes its caller to free the buffer it returns, which
force_object_loose didn't do.

This leak is eventually triggered by "git gc", when it is manually invoked
or there are too many packs around, making gc totally unusable when there
are lots of unreachable objects.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 06:19:06 -07:00
Paul Mackerras 79056034be gitk: Regenerate .po files
This is the result of running make update-po and removing or fixing
the strings that were fuzzily matched.  The ones that were fixed were
the ones where the only change was "git rev-list" to "git log", and
the "about gitk" message where the copyright year got updated.

To get xgettext to see the menu labels as needing translation, it
was necessary for arrange for them to be preceded by "mc".  This
therefore changes makemenu to ignore the first element in each
menu item so that it can be "mc" in the makemenu call.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-10-18 22:23:33 +11:00
Junio C Hamano e845e16ee6 Merge branch 'jk/maint-ls-files-other' into jk/fix-ls-files-other
* jk/maint-ls-files-other:
  refactor handling of "other" files in ls-files and status

Conflicts:
	read-cache.c
2008-10-17 13:03:52 -07:00
Jeff King 98fa473887 refactor handling of "other" files in ls-files and status
When the "git status" display code was originally converted
to C, we copied the code from ls-files to discover whether a
pathname returned by read_directory was an "other", or
untracked, file.

Much later, 5698454e updated the code in ls-files to handle
some new cases caused by gitlinks.  This left the code in
wt-status.c broken: it would display submodule directories
as untracked directories. Nobody noticed until now, however,
because unless status.showUntrackedFiles was set to "all",
submodule directories were not actually reported by
read_directory. So the bug was only triggered in the
presence of a submodule _and_ this config option.

This patch pulls the ls-files code into a new function,
cache_name_is_other, and uses it in both places. This should
leave the ls-files functionality the same and fix the bug
in status.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-17 12:46:59 -07:00
Shawn O. Pearce 7e425c4fbb describe: Make --tags and --all match lightweight tags more often
If the caller supplies --tags they want the lightweight, unannotated
tags to be searched for a match.  If a lightweight tag is closer
in the history, it should be matched, even if an annotated tag is
reachable further back in the commit chain.

The same applies with --all when matching any other type of ref.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-By: Uwe Kleine-König <ukleinek@strlen.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-17 11:35:43 -07:00
Jeff King 7213080817 tests: shell negation portability fix
Commit 969c8775 introduced a test which uses the non-portable construct:

  command1 && ! command2 | command3

which must be

  command1 && ! (command2 | command3)

to work on bsd shells (this is another example of bbf08124, which fixed
several similar cases).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-17 11:30:54 -07:00