gitweb.git
t/t3700: convert two uses of negation operator '!'... Brandon Casey Tue, 20 Jul 2010 15:24:47 +0000 (10:24 -0500)

t/t3700: convert two uses of negation operator '!' to use test_must_fail

These two lines use the negation '!' operator to negate the result of a
simple command. Since these commands do not contain any pipes or other
complexities, the test_must_fail function can be used and is preferred
since it will additionally detect termination due to a signal.

This was noticed because the second use of '!' does not include a space
between the '!' and the opening parens. Ksh interprets this as follows:

!(pattern-list)
Matches anything except one of the given patterns.

Ksh performs a file glob using the pattern-list and then tries to execute
the first file in the list. If a space is added between the '!' and the
open parens, then Ksh will not interpret it as a pattern list, but in this
case, it is preferred to use test_must_fail, so lets do so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 20 Jul 2010 18:29:30 +0000 (11:29 -0700)

Merge branch 'maint'

* maint:
t/README: clarify test_must_fail description
Check size of path buffer before writing into it

Conflicts:
t/README

t/README: clarify test_must_fail descriptionBrandon Casey Tue, 20 Jul 2010 17:17:12 +0000 (12:17 -0500)

t/README: clarify test_must_fail description

Some have found the wording of the description to be somewhat ambiguous
with respect to when it is desirable to use test_must_fail instead of
"! <git-command>". Tweak the wording somewhat to hopefully clarify that
it is _because_ test_must_fail can detect segmentation fault that it is
desirable to use it instead of "! <git-command>".

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Check size of path buffer before writing into itGreg Brockman Tue, 20 Jul 2010 04:46:21 +0000 (00:46 -0400)

Check size of path buffer before writing into it

This prevents a buffer overrun that could otherwise be triggered by
creating a file called '.git' with contents

gitdir: (something really long)

Signed-off-by: Greg Brockman <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 19 Jul 2010 18:21:08 +0000 (11:21 -0700)

Merge branch 'maint'

* maint:
update-server-info: Shorten read_pack_info_file()
Documentation: Explain git-mergetool's use of temporary files

update-server-info: Shorten read_pack_info_file()Ralf Thielow Mon, 19 Jul 2010 16:26:12 +0000 (18:26 +0200)

update-server-info: Shorten read_pack_info_file()

The correct responses to a D and a T line in .git/objects/info/packs
are the same, so combine their case arms. In both cases we already
‘goto’ out of the switch so while at it, remove a redundant ‘break’
to avoid yet another line of code.

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Reviewed-by: Jonathan Nieder <jrnieder <at> gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: Add a --full-tree optionElijah Newren Sat, 17 Jul 2010 17:00:51 +0000 (11:00 -0600)

fast-export: Add a --full-tree option

This option adds symmetry with fast-import, enabling it to also work with
complete trees instead of just incremental changes. It works by issuing a
'deleteall' directive with each commit and then listing the full set of
files that make up that commit, rather than just showing the list of files
that have changed since the (first) parent commit. Note that this
functionality is automatically turned on when using --import-marks together
with path limiting in order to avoid dropping important but unchanged
files.

This functionality is desired when using hand-written filters along with
'fast-export | some-filter | fast-import' as it can be easier to write
<some-filter> in terms of complete trees than incremental changes.

We could avoid the need to add this option by simply always turning it on.
While the end result would be identical, it would slow things down slightly
by printing many more filenames per commit which goes somewhat against the
'fast' in 'fast-export'.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: Fix dropping of files with --import-marks... Elijah Newren Sat, 17 Jul 2010 17:00:50 +0000 (11:00 -0600)

fast-export: Fix dropping of files with --import-marks and path limiting

Since fast-export operates by listing file changes since the (first) parent
commit, when using --import-marks and path limiting and using a wider list
of paths than in previous runs, files from the new path(s) will silently be
omitted from the result unless or until a commit which explicitly changes
those files. The resulting repository in such cases is broken and makes no
sense.

This commit fixes this by having fast-export work with complete trees
instead of incremental changes (when both --import-marks and path limiting
are used). It works by issuing a 'deleteall' directive with each commit and
then listing the full set of files that make up that commit, rather than
just showing the list of files that have changed since the (first) parent
commit.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git add: Add --ignore-missing to SYNOPSISÆvar Arnfjörð Bjarmason Sat, 17 Jul 2010 15:33:15 +0000 (15:33 +0000)

git add: Add --ignore-missing to SYNOPSIS

All the git add options were listed in the synopsis until the
--ignore-missing option was added. Change that so that the git add
documentation now has the complete listing.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule add: Remove old docs about implicit -fÆvar Arnfjörð Bjarmason Sat, 17 Jul 2010 15:53:45 +0000 (15:53 +0000)

git submodule add: Remove old docs about implicit -f

git submodule add no longer implicitly adds with --force. Remove
references to the old functionality in the documentation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule add: Require the new --force option to... Jens Lehmann Sat, 17 Jul 2010 15:11:43 +0000 (17:11 +0200)

git submodule add: Require the new --force option to add ignored paths

To make the behavior of "git submodule add" more consistent with "git add"
ignored submodule paths should not be silently added when they match an
entry in a .gitignore file. To be able to override that default behavior
in the same way as we can do that for "git add", the new option "--force"
is introduced.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jl/add-n-ignore-missing'Junio C Hamano Mon, 19 Jul 2010 18:09:38 +0000 (11:09 -0700)

Merge branch 'jl/add-n-ignore-missing'

* jl/add-n-ignore-missing:
git add: Add the "--ignore-missing" option for the dry run

Documentation: Explain git-mergetool's use of temporary... David Aguilar Sun, 18 Jul 2010 01:46:48 +0000 (18:46 -0700)

Documentation: Explain git-mergetool's use of temporary files

'git mergetool' creates '*.orig' backup files in its
default configuration. Mention this in its documentation.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/reset: move "undo permanently" example... Thomas Rast Sun, 18 Jul 2010 18:23:26 +0000 (20:23 +0200)

Documentation/reset: move "undo permanently" example behind "make topic"

I consider the latter usage more important.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/reset: reorder examples to match descriptionThomas Rast Sun, 18 Jul 2010 18:23:25 +0000 (20:23 +0200)

Documentation/reset: reorder examples to match description

A previous commit moved the <paths> mode (undoes git-add) to the front
in the description, so make the examples follow the same order.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/reset: promote 'examples' one section upThomas Rast Sun, 18 Jul 2010 18:23:24 +0000 (20:23 +0200)

Documentation/reset: promote 'examples' one section up

Move the examples section upwards, before the discussion that gives
the gory details. Adjust the style of the heading accordingly.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/reset: separate options by modeThomas Rast Sun, 18 Jul 2010 18:23:23 +0000 (20:23 +0200)

Documentation/reset: separate options by mode

Remove all but -q from the OPTIONS section, and instead explain the
options separated by usage mode, since they only apply to one each.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-reset: reorder modes for soft-mixed... Thomas Rast Sun, 18 Jul 2010 18:23:22 +0000 (20:23 +0200)

Documentation/git-reset: reorder modes for soft-mixed-hard progression

Reorder the documetation so that the soft/mixed/hard modes are in this
order. This way they form a natural progression towards changing more
of the state.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: write memoized data explicitly to avoid Storab... Sergey Vlasov Sun, 18 Jul 2010 12:17:49 +0000 (16:17 +0400)

git-svn: write memoized data explicitly to avoid Storable bug

Apparently using the Storable module during global destruction is
unsafe - there is a bug which can cause segmentation faults:

http://rt.cpan.org/Public/Bug/Display.html?id=36087
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482355

The persistent memoization support introduced in commit 8bff7c538
relied on global destruction to write cached data, which was leading
to segfaults in some Perl configurations. Calling Memoize::unmemoize
in the END block forces the cache writeout to be performed earlier,
thus avoiding the bug.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>

Merge branch 'jc/diff-merge-base-multi'Junio C Hamano Fri, 16 Jul 2010 22:45:35 +0000 (15:45 -0700)

Merge branch 'jc/diff-merge-base-multi'

* jc/diff-merge-base-multi:
diff A...B: do not limit the syntax too narrowly

post-receive-email: optional message line count limitKevin P. Fleming Fri, 16 Jul 2010 19:16:23 +0000 (14:16 -0500)

post-receive-email: optional message line count limit

We have become used to the features of svnmailer when used with Subversion,
and one of those useful features is that it can limit the maximum length
(in lines) of a commit email message. This is terribly useful since once the
goes beyond a reasonable number of lines, nobody is going to read the remainder,
and if they really want the entire contents of the commits, they can use
git itself to get them using the revision IDs present in the message already.

Change the post-receive-email script to respond to an 'emailmaxlines' config key
which, if specified, will limit the number of lines generated (including
headers); any lines beyond the limit are suppressed, and a final line is added
indicating the number that were suppressed.

Signed-off-by: Kevin P. Fleming <kpfleming@digium.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: improve success message by adding abbreviated... Christian Couder Tue, 13 Jul 2010 23:28:15 +0000 (01:28 +0200)

revert: improve success message by adding abbreviated commit sha1

Instead of saying "Finished one cherry-pick." or "Finished one revert.",
we now say "Finished cherry-pick of commit <abbreviated sha1>." or
"Finished revert of commit <abbreviated sha1>." which is more informative,
especially when cherry-picking or reverting many commits.

In case of failure the message is now "Automatic cherry-pick of commit
<abbreviated sha1> failed." instead of "Automatic cherry-pick failed."

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: don't print "Finished one cherry-pick." if... Christian Couder Tue, 13 Jul 2010 23:28:14 +0000 (01:28 +0200)

revert: don't print "Finished one cherry-pick." if commit failed

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: refactor commit code into a new run_git_commit... Christian Couder Tue, 13 Jul 2010 23:28:13 +0000 (01:28 +0200)

revert: refactor commit code into a new run_git_commit() function

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: report success when using option --strategyChristian Couder Tue, 13 Jul 2010 23:28:12 +0000 (01:28 +0200)

revert: report success when using option --strategy

"git cherry-pick foo" has always reported success with
"Finished one cherry-pick" but "cherry-pick --strategy"
does not print anything. So move the code to write that
message from do_recursive_merge() to do_cherry_pick()
so other strategies can share it.

This patch also refactors the code that prints a message
like "Automatic cherry-pick failed. <help message>". This
code was duplicated in both do_recursive_merge() and
do_pick_commit().

To do that, now do_recursive_merge() returns an int to signal
success or failure. And in case of failure we just return 1
from do_pick_commit() instead of doing "exit(1)" from either
do_recursive_merge() or do_pick_commit().

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Only run aggregate-results over actual countsThomas Rast Fri, 16 Jul 2010 09:37:44 +0000 (11:37 +0200)

Only run aggregate-results over actual counts

The current make target 'aggregate-results' scanned all files matching
test-results/t*-*. Normally these are only the test counts (and the
exit values, which are ignored), but with --tee the suite also dumps
all output. Furthermore, with --verbose t1450 contains several lines
starting with "broken link from ..." which matches the criteria used
by aggregate-results.sh.

Rename the counts output files to *.counts, and only scan those.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add a sample user for the svndump libraryJonathan Nieder Thu, 15 Jul 2010 16:25:39 +0000 (18:25 +0200)

Add a sample user for the svndump library

The svn-fe tool takes a Subversion dump file as input and produces
a fast-import stream as output. This can be useful as a low-level
tool in building other importers, or for debugging the vcs-svn
library.

make svn-fe
make svn-fe.1

to test.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff A...B: do not limit the syntax too narrowlyJunio C Hamano Fri, 16 Jul 2010 19:08:24 +0000 (12:08 -0700)

diff A...B: do not limit the syntax too narrowly

Earlier we tried to make sure that the trees we get are what A...B
syntax produced, by checking that earlier ones are all marked
uninteresting (which has to be true as they are merge bases),
there are two remaining ones that are interesting, and they are
marked as non-symmetric-left and symmetric-left respectively.

The "the last two must be interesting" condition is however wrong when one
is an ancestor of the other between A and B (i.e. fast-forward). In such
a case, one of them is marked uninteresting.

Export parse_date_basic() to convert a date string... Jonathan Nieder Thu, 15 Jul 2010 16:22:57 +0000 (18:22 +0200)

Export parse_date_basic() to convert a date string to timestamp

approxidate() is not appropriate for reading machine-written dates
because it guesses instead of erroring out on malformed dates.
parse_date() is less convenient since it returns its output as a
string. So export the underlying function that writes a timestamp.

While at it, change the return value to match the usual convention:
return 0 for success and -1 for failure.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jn/paginate-fix'Junio C Hamano Thu, 15 Jul 2010 19:09:14 +0000 (12:09 -0700)

Merge branch 'jn/paginate-fix'

* jn/paginate-fix:
git --paginate: paginate external commands again
git --paginate: do not commit pager choice too early
tests: local config file should be honored from subdirs of toplevel
t7006: test pager configuration for several git commands
t7006 (pager): introduce helper for parameterized tests

Conflicts:
t/t7006-pager.sh

Merge branch 'wp/merge-tree-fix'Junio C Hamano Thu, 15 Jul 2010 19:08:41 +0000 (12:08 -0700)

Merge branch 'wp/merge-tree-fix'

* wp/merge-tree-fix:
merge-tree: fix where two branches share no changes
add basic tests for merge-tree

Merge branch 'js/merge-rr-fix'Junio C Hamano Thu, 15 Jul 2010 19:08:36 +0000 (12:08 -0700)

Merge branch 'js/merge-rr-fix'

* js/merge-rr-fix:
MERGE_RR is in .git, not .git/rr-cache

Merge branch 'jc/diff-merge-base-multi'Junio C Hamano Thu, 15 Jul 2010 19:08:25 +0000 (12:08 -0700)

Merge branch 'jc/diff-merge-base-multi'

* jc/diff-merge-base-multi:
diff A...B: give one possible diff when there are more than one merge-base

Merge branch 'ns/merge-recursive-uptodate'Junio C Hamano Thu, 15 Jul 2010 19:08:11 +0000 (12:08 -0700)

Merge branch 'ns/merge-recursive-uptodate'

* ns/merge-recursive-uptodate:
merge-recursive: use "up-to-date" instead of "uptodate" in error message for consistency

Merge branch 'jn/tests'Junio C Hamano Thu, 15 Jul 2010 19:08:04 +0000 (12:08 -0700)

Merge branch 'jn/tests'

* jn/tests:
t3000 (ls-files -o): modernize style

Merge branch 'eb/doc-log-manpage'Junio C Hamano Thu, 15 Jul 2010 19:07:56 +0000 (12:07 -0700)

Merge branch 'eb/doc-log-manpage'

* eb/doc-log-manpage:
Reorganize `git-log' man page to clarify common diff options.

Merge branch 'jn/grep-open'Junio C Hamano Thu, 15 Jul 2010 19:07:18 +0000 (12:07 -0700)

Merge branch 'jn/grep-open'

* jn/grep-open:
grep -O: Do not pass color sequences as filenames to pager

Merge branch 'mg/revision-doc'Junio C Hamano Thu, 15 Jul 2010 19:07:01 +0000 (12:07 -0700)

Merge branch 'mg/revision-doc'

* mg/revision-doc:
Documentation: link to gitrevisions rather than git-rev-parse
Documentation: gitrevisions
Documentation: split off rev doc into include file

Merge branch 'jk/maint-status-keep-index-timestamp'Junio C Hamano Thu, 15 Jul 2010 19:06:55 +0000 (12:06 -0700)

Merge branch 'jk/maint-status-keep-index-timestamp'

* jk/maint-status-keep-index-timestamp:
do not write out index when status does not have to

Merge branch 'jc/rebase-i-commit-msg-fix'Junio C Hamano Thu, 15 Jul 2010 19:06:48 +0000 (12:06 -0700)

Merge branch 'jc/rebase-i-commit-msg-fix'

* jc/rebase-i-commit-msg-fix:
rebase-i: do not get fooled by a log message ending with backslash
rebase-i: style fix

Merge branch 'ab/submodule-add-f'Junio C Hamano Thu, 15 Jul 2010 19:06:25 +0000 (12:06 -0700)

Merge branch 'ab/submodule-add-f'

* ab/submodule-add-f:
git submodule: add submodules with git add -f <path>

Merge branch 'bc/maint-makefile-fixes'Junio C Hamano Thu, 15 Jul 2010 19:06:11 +0000 (12:06 -0700)

Merge branch 'bc/maint-makefile-fixes'

* bc/maint-makefile-fixes:
Makefile: work around ksh's failure to handle missing list argument to for loop
Makefile: remove some unnecessary curly braces

Merge branch 'maint'Junio C Hamano Thu, 15 Jul 2010 19:04:32 +0000 (12:04 -0700)

Merge branch 'maint'

* maint:
Documentation: add submodule.* to the big configuration variable list
gitmodules.5: url can be a relative path
gitweb: fix esc_url

Documentation: add submodule.* to the big configuration... Jonathan Nieder Thu, 15 Jul 2010 07:51:19 +0000 (02:51 -0500)

Documentation: add submodule.* to the big configuration variable list

The url, path, and the update items in [submodule "foo"] stanzas
are nicely explained in the .gitmodules and ‘git submodule’
documentation. Point there from the config documentation.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitmodules.5: url can be a relative pathJonathan Nieder Thu, 15 Jul 2010 07:41:55 +0000 (02:41 -0500)

gitmodules.5: url can be a relative path

There is already excellent documentation for this facility in
git-submodule.1, but it is not so discoverable.

Relative paths in .gitmodules can be useful for serving the
same repository over multiple protocols, for example.
Thanks to Peter for pointing this out.

Cc: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: fix esc_urlPavan Kumar Sunkara Thu, 15 Jul 2010 07:29:01 +0000 (12:59 +0530)

gitweb: fix esc_url

Earlier, 452e225 (gitweb: fix esc_param, 2009-10-13) fixed CGI escaping
rules used in esc_url. A very similar logic exists in esc_param and needs
to be fixed the same way.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git --paginate: paginate external commands againJonathan Nieder Wed, 14 Jul 2010 22:55:12 +0000 (17:55 -0500)

git --paginate: paginate external commands again

73e25e7c (git --paginate: do not commit pager choice too early,
2010-06-26) failed to take some cases into account.

1b. Builtins that do not use RUN_SETUP (like git config) do
not find GIT_DIR set correctly when the pager is launched
from run_builtin(). So the core.pager configuration is
not honored from subdirectories of the toplevel for them.

4a. External git commands (like git request-pull) relied on the
early pager launch to take care of handling the -p option.
Ever since 73e25e7c, they do not honor the -p option at all.

4b. Commands invoked through ! aliases (like ls) were also relying
on the early pager launch.

Fix (4a) by launching the pager (if requested) before running such a
“dashed external”. For simplicity, this still does not search for a
.git directory before running the external command; when run from a
subdirectory of the toplevel, therefore, the “[core] pager”
configuration is still not honored.

Fix (4b) by launching pager if requested before carrying out such an
alias. Actually doing this has no effect, since the pager (if any)
would have already been launched in a failed attempt to try a
dashed external first. The choice-of-pager-not-honored-from-
subdirectory bug still applies here, too.

(1b) is not a regression. There is no need to fix it yet.

Noticed by Junio.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: Show the the type and path to corrupt objectsÆvar Arnfjörð Bjarmason Thu, 10 Jun 2010 12:47:01 +0000 (12:47 +0000)

sha1_file: Show the the type and path to corrupt objects

Change the error message that's displayed when we encounter corrupt
objects to be more specific. We now print the type (loose or packed)
of corrupted objects, along with the full path to the file in
question.

Before:

$ git cat-file blob 909ef997367880aaf2133bafa1f1a71aa28e09df
fatal: object 909ef997367880aaf2133bafa1f1a71aa28e09df is corrupted

After:

$ git cat-file blob 909ef997367880aaf2133bafa1f1a71aa28e09df
fatal: loose object 909ef997367880aaf2133bafa1f1a71aa28e09df (stored in .git/objects/90/9ef997367880aaf2133bafa1f1a71aa28e09df) is corrupted

Knowing the path helps to quickly analyze what's wrong:

$ file .git/objects/90/9ef997367880aaf2133bafa1f1a71aa28e09df
.git/objects/90/9ef997367880aaf2133bafa1f1a71aa28e09df: empty

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

MERGE_RR is in .git, not .git/rr-cacheJay Soffian Wed, 14 Jul 2010 17:18:11 +0000 (13:18 -0400)

MERGE_RR is in .git, not .git/rr-cache

0af0ac7 (Move MERGE_RR from .git/rr-cache/ into .git/) moved the
location of MERGE_RR but I found a few references to the old
location.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-tree: fix where two branches share no changesWill Palmer Wed, 14 Jul 2010 17:04:07 +0000 (18:04 +0100)

merge-tree: fix where two branches share no changes

15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16)
introduced a regression to merge-tree to cause it to segfault when merging
files which existed in one branch, but not in the other or in the
merge-base. This was caused by referencing entry->path at a time when
entry was known to be possibly-NULL.

To correct the problem, we save the path of the entry we came in with,
as the path should be the same among all the stages no matter which
sides are involved in the merge.

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add basic tests for merge-treeWill Palmer Wed, 14 Jul 2010 17:04:06 +0000 (18:04 +0100)

add basic tests for merge-tree

merge-tree had no test cases, so here we add some very basic tests for
it, including some known-breakages.

[jc: with obvious/trivial fixups]

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.2-rc3 v1.7.2-rc3Junio C Hamano Wed, 14 Jul 2010 16:42:24 +0000 (09:42 -0700)

Git 1.7.2-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/read-tree-cache-tree-fix'Junio C Hamano Wed, 14 Jul 2010 16:34:23 +0000 (09:34 -0700)

Merge branch 'jc/read-tree-cache-tree-fix'

* jc/read-tree-cache-tree-fix:
Fix "read-tree -m A B" priming the cache-tree

rerere: fix overeager gcSZEDER Gábor Mon, 12 Jul 2010 23:42:04 +0000 (01:42 +0200)

rerere: fix overeager gc

'rerere gc' prunes resolutions of conflicted merges that occurred long
time ago, and when doing so it takes the creation time of the
conflicted automerge results into account. This can cause the loss of
frequently used conflict resolutions (e.g. long-living topic branches
are merged into a regularly rebuilt integration branch (think of git's
pu)) when they become old enough to exceed 'rerere gc's threshold.

To prevent the loss of valuable merge resolutions 'rerere' will (1)
update the timestamp of the recorded conflict resolution (i.e.
'postimage') each time when encountering and resolving the same merge
conflict, and (2) take this timestamp, i.e. the time of the last usage
into account when gc'ing.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add configuration variable for --autosquash option... Heiko Voigt Wed, 14 Jul 2010 11:59:57 +0000 (13:59 +0200)

add configuration variable for --autosquash option of interactive rebase

If you use this feature regularly you can now enable it by default. In
case the user wants to override this config on the commandline
--no-autosquash can be used to force disabling.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use dev_t for device id (st_dev) from stat in setup_git... Raja R Harinath Tue, 13 Jul 2010 09:02:00 +0000 (14:32 +0530)

Use dev_t for device id (st_dev) from stat in setup_git_directory_gently()

The original declaration was int, which seems to cause trouble on my
machine. It causes spurious "filesystem boundary" errors when running
the testsuite. The cause seems to be

$ stat -c%d .
2147549952

which is too large for a 32-bit int type.

Using the correct type, dev_t, solves the issue. (Because I'm
paranoid and forgetful, I checked -- yes, Unix v7 had dev_t.)

Other uses of st_dev seem to be reasonably safe. fill_stat_cache_info
truncates it to an 'unsigned int', but that value seems to be used only
to validate the cache, and only if USE_STDEV is defined.

Signed-off-by: Raja R Harinath <harinath@hurrynot.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Enable custom schemes for column colors in the graph APIJohan Herland Tue, 13 Jul 2010 21:23:39 +0000 (23:23 +0200)

Enable custom schemes for column colors in the graph API

Currently, the graph code is hardcoded to use ANSI color escapes for
coloring the column characters in the generated graphs. This patch
allows a custom scheme of colors to be set at runtime, allowing
different types of color escapes to be used.

A new function - graph_set_column_colors() - is added to the graph.h API,
which allows a custom column_colors array (and column_colors_max value)
to replace the builtin ANSI array (and _max value). The new function -
if used - must be called before graph_init() is called.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make graph_next_line() available in the graph.h APIJohan Herland Tue, 13 Jul 2010 21:23:38 +0000 (23:23 +0200)

Make graph_next_line() available in the graph.h API

In order to successfully use the graph API from a context other than the
stdout/command-line scenario (where the graph_show_* functions are
suitable), we need direct access to graph_next_line(), to drive the
graph drawing process.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff A...B: give one possible diff when there are more... Junio C Hamano Tue, 13 Jul 2010 00:27:46 +0000 (17:27 -0700)

diff A...B: give one possible diff when there are more than one merge-base

We instead showed a combined diff that explains one of the randomly
chosen merge-base as if it were the result of merging all the other
merge bases and two tips given, which made no sense at all.

An alternative is to simply fail such a request, telling the user that
there are criss-cross merges, but it wouldn't be so helpful.

Noticed by James Pickens.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 13 Jul 2010 16:14:35 +0000 (09:14 -0700)

Merge branch 'maint'

* maint:
git fetch documentation: describe short '-p' synonym to '--prune' option
format-patch: document the format.to configuration setting

git fetch documentation: describe short '-p' synonym... Oren Held Tue, 13 Jul 2010 12:01:40 +0000 (15:01 +0300)

git fetch documentation: describe short '-p' synonym to '--prune' option

It's already implemented, just undocumented.

Signed-off-by: Oren Held <orenhe@il.ibm.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: document the format.to configuration... Miklos Vajna Mon, 12 Jul 2010 18:58:38 +0000 (20:58 +0200)

format-patch: document the format.to configuration setting

[jc: with simplification from Jonathan Nieder]

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mingw_utime(): handle NULL times parameterSZEDER Gábor Mon, 12 Jul 2010 23:42:03 +0000 (01:42 +0200)

mingw_utime(): handle NULL times parameter

POSIX sayeth:

"If times is a null pointer, the access and modification
times of the file shall be set to the current time."

Let's do so.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git add: Add the "--ignore-missing" option for the... Jens Lehmann Fri, 9 Jul 2010 22:18:38 +0000 (00:18 +0200)

git add: Add the "--ignore-missing" option for the dry run

Sometimes it is useful to know if a file or directory will be ignored
before it is added to the work tree. An example is "git submodule add",
where it would be really nice to be able to fail with an appropriate
error message before the submodule is cloned and checked out.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: TAP compliance for skipping tests on requestMichael J Gruber Mon, 12 Jul 2010 10:33:49 +0000 (12:33 +0200)

test-lib: TAP compliance for skipping tests on request

Make the output TAP compliant for tests skipped on request (GIT_SKIP_TESTS).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: simplify GIT_SKIP_TESTS loopMichael J Gruber Mon, 12 Jul 2010 10:32:18 +0000 (12:32 +0200)

test-lib: simplify GIT_SKIP_TESTS loop

04ece59 (GIT_SKIP_TESTS: allow users to omit tests that are known to break, 2006-12-28)
introduced GIT_SKIP_TESTS, and since then we have had two nested loops
iterating over GIT_SKIP_TESTS with the same loop variable.

Reduce this to one loop.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 12 Jul 2010 06:47:29 +0000 (23:47 -0700)

Merge branch 'maint'

* maint:
Documentation: Spelling fix in protocol-capabilities.txt
checkout: accord documentation to what git does
t0005: work around strange $? in ksh when program terminated by a signal

t3000 (ls-files -o): modernize styleJonathan Nieder Sun, 11 Jul 2010 04:20:25 +0000 (23:20 -0500)

t3000 (ls-files -o): modernize style

This script is part of the second batch of tests, from the same day
the test infrastructure was added to git. Update it to use a more
modern style in the spirit of v1.6.4-rc0~45^2~2 (2009-05-22).
In particular:

- Put setup code inside test assertions, to avoid unexpected
breakages and avoid stray output without -v (as t/README
recommends); and

- Put the test title on the same line as the "test_expect_success",
and end the line with a single-quote to begin the body of the test
which is one multi-line string.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: fix usage of themed widgets variableHeiko Voigt Sat, 20 Feb 2010 13:38:38 +0000 (14:38 +0100)

git-gui: fix usage of themed widgets variable

There was one forgotten global so NS was not visible to the method
which resulted in an error.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>

git-gui: Handle failure of core.worktree to identify... Pat Thoyts Sat, 10 Jul 2010 22:40:59 +0000 (23:40 +0100)

git-gui: Handle failure of core.worktree to identify the working directory.

Commit 21985a11 'git-gui: handle non-standard worktree locations' attempts
to use either GIT_WORK_TREE or core.worktree to set the _gitworktree
variable but these may not be set which leads to a failure to launch
gitk to review history. Use _gitdir to set the location for a standard
git layout where the parent of the .git directory is the working tree.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Documentation: Spelling fix in protocol-capabilities.txtFredrik Skolmli Sat, 10 Jul 2010 00:00:01 +0000 (02:00 +0200)

Documentation: Spelling fix in protocol-capabilities.txt

Signed-off-by: Fredrik Skolmli <fredrik@frsk.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-recursive: use "up-to-date" instead of "uptodate... Nicolas Sebrecht Fri, 9 Jul 2010 20:27:49 +0000 (22:27 +0200)

merge-recursive: use "up-to-date" instead of "uptodate" in error message for consistency

Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout: accord documentation to what git doesNicolas Sebrecht Fri, 9 Jul 2010 20:27:48 +0000 (22:27 +0200)

checkout: accord documentation to what git does

Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t0005: work around strange $? in ksh when program termi... Johannes Sixt Fri, 9 Jul 2010 07:05:16 +0000 (09:05 +0200)

t0005: work around strange $? in ksh when program terminated by a signal

ksh93 is known to report $? of programs that terminated by a signal as
256 + signal number instead of 128 + signal number like other POSIX
compliant shells (ksh's behavior is still POSIX compliant in this regard).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: Improve robustness when D->F changes provi... Elijah Newren Fri, 9 Jul 2010 13:10:56 +0000 (07:10 -0600)

fast-import: Improve robustness when D->F changes provided in wrong order

When older versions of fast-export came across a directory changing to a
symlink (or regular file), it would output the changes in the form
M 120000 :239821 dir-changing-to-symlink
D dir-changing-to-symlink/filename1
When fast-import sees the first line, it deletes the directory named
dir-changing-to-symlink (and any files below it) and creates a symlink in
its place. When fast-import came across the second line, it was previously
trying to remove the file and relevant leading directories in
tree_content_remove(), and as a side effect it would delete the symlink
that was just created. This resulted in the symlink silently missing from
the resulting repository.

To improve robustness, we ignore file deletions underneath directory names
that correspond to non-directories. This can also be viewed as a minor
optimization: since there cannot be a file and a directory with the same
name in the same directory, the file clearly can't exist so nothing needs
to be done to delete it.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: Fix output order of D/F changesElijah Newren Fri, 9 Jul 2010 13:10:55 +0000 (07:10 -0600)

fast-export: Fix output order of D/F changes

The fast-import stream format requires incremental changes which take place
immediately, meaning that for D->F conversions all files below the relevant
directory must be deleted before the resulting file of the same name is
created. Reversing the order can result in fast-import silently deleting
the file right after creating it, resulting in the file missing from the
resulting repository.

We correct this by first sorting the diff_queue_struct in depth-first
order.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge_recursive: Fix renames across paths below D/F... Elijah Newren Fri, 9 Jul 2010 13:10:54 +0000 (07:10 -0600)

merge_recursive: Fix renames across paths below D/F conflicts

The rename logic in process_renames() handles renames and merging of file
contents and then marks files as processed. However, there may be higher
stage entries left in the index for other reasons (e.g., due to D/F
conflicts). By checking for such cases and marking the entry as not
processed, it allows process_entry() later to look at it and handle those
higher stages.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-recursive: Fix D/F conflictsElijah Newren Fri, 9 Jul 2010 13:10:53 +0000 (07:10 -0600)

merge-recursive: Fix D/F conflicts

The D/F conflicts that can be automatically resolved (file or directory
unmodified on one side of history), have the nice property that
process_entry() can correctly handle all subpaths of the D/F conflict. In
the case of D->F conversions, it will correctly delete all non-conflicting
files below the relevant directory and the directory itself (note that both
untracked and conflicting files below the directory will prevent its
removal). So if we handle D/F conflicts after all other conflicts, they
become fairly simple to handle -- we just need to check for whether or not
a path (file/directory) is in the way of creating the new content. We do
this by having process_entry() defer handling such entries to a subsequent
process_df_entry() step.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add a rename + D/F conflict testcaseAlexander Gladysh Fri, 9 Jul 2010 13:10:52 +0000 (07:10 -0600)

Add a rename + D/F conflict testcase

This is a simple testcase where both sides of the rename are paths involved
in (separate) D/F merge conflicts

Signed-off-by: Alexander Gladysh <agladysh@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add additional testcases for D/F conflictsElijah Newren Fri, 9 Jul 2010 13:10:51 +0000 (07:10 -0600)

Add additional testcases for D/F conflicts

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge remote branch 'ko/master' into jc/read-tree-cache... Junio C Hamano Fri, 9 Jul 2010 01:55:50 +0000 (18:55 -0700)

Merge remote branch 'ko/master' into jc/read-tree-cache-tree-fix

* ko/master: (2325 commits)
Git 1.7.2-rc2
backmerge a few more fixes to 1.7.1.X series
fix git branch -m in presence of cross devices
t/t0006: specify timezone as EST5 not EST to comply with POSIX
add missing && to submodule-merge testcase
t/README: document more test helpers
test-date: fix sscanf type conversion
xdiff: optimise for no whitespace difference when ignoring whitespace.
gitweb: Move evaluate_gitweb_config out of run_request
parse_date: fix signedness in timezone calculation
t0006: test timezone parsing
rerere.txt: Document forget subcommand
t/README: proposed rewording...
t/README: Document the do's and don'ts of tests
t/README: Add a section about skipping tests
t/README: Document test_expect_code
t/README: Document test_external*
t/README: Document the prereq functions, and 3-arg test_*
t/README: Typo: paralell -> parallel
t/README: The trash is in 't/trash directory.$name'
...

Conflicts:
builtin-read-tree.c

diff.c: fix a graph output bugBo Yang Thu, 8 Jul 2010 15:12:34 +0000 (23:12 +0800)

diff.c: fix a graph output bug

When --graph is in effect, the line-prefix typically has colored graph
line segments and ends with reset. The color sequence "set" given to
this function is for showing the metainfo part of the patch text and
(1) it should not be applied to the graph lines, and (2) it will be
reset at the end of line_prefix so it won't be in effect anyway.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: Use skip_all=* to skip testsÆvar Arnfjörð Bjarmason Thu, 8 Jul 2010 01:16:06 +0000 (01:16 +0000)

tests: Use skip_all=* to skip tests

Change tests to skip with skip_all=* + test_done instead of using say
+ test_done.

This is a follow-up to "tests: Skip tests in a way that makes sense
under TAP" (fadb5156e4). I missed these cases when prepearing that
patch, hopefully this is all of them.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix "read-tree -m A B" priming the cache-treeJunio C Hamano Fri, 9 Jul 2010 00:27:43 +0000 (17:27 -0700)

Fix "read-tree -m A B" priming the cache-tree

In 456156d a shortcut to priming the index tree reference was
introduced, but the justification for it was completely bogus.

"read-tree -m A B" is to take the index (and the working tree)
that is largely based on (but does not have to match exactly) A
and update it to B, while carrying the local change that does
not overlap the difference between A and B, so there is no reason
to expect that the resulting index should match the tree B.

Noticed and test provided by Heiko Voigt.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Reorganize `git-log' man page to clarify common diff... Eli Barzilay Thu, 8 Jul 2010 02:14:31 +0000 (22:14 -0400)

Reorganize `git-log' man page to clarify common diff options.

This will reduce considerably the common confusion where people miss the
`--follow' option, and wonder why `-M'/`-C' is not working.

* Move the diff options include to after the log-specific flags, and add
a "Common diff options" subtitle before them. (These options apply
only when patches are shown, which is not a common use case among
newbies, so having them first is confusing.)

* Move the `--follow' description to the top of the listed options. The
options before that seem less important: `--full-diff' applies only
when patches are shown, `--source' and `--decorate' are less useful
with many common commit specifications.

* Clarify that `--follow' works only for a single path argument.

Signed-off-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9118 (git-svn): prevent early failure from taking... Jonathan Nieder Thu, 8 Jul 2010 13:36:02 +0000 (08:36 -0500)

t9118 (git-svn): prevent early failure from taking down later tests

When test #2 fails, the cwd is project/, causing all the
remaining tests in the same script to get confused and fail.

So in the spirit of v1.7.1.1~53^2~10 (t5550-http-fetch: Use subshell
for repository operations, 2010-04-17), use a subshell for svn
working copy operations. This way, the cwd will reliably return
to the top of the trash directory and later tests can still be run
when a command has failed.

Reported-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

t9118: avoid PEG revision identifier in testsMichael J Gruber Thu, 8 Jul 2010 19:16:35 +0000 (21:16 +0200)

t9118: avoid PEG revision identifier in tests

@ is SVN's identifier for PEG revisions. But SVN's treatment of PEG
identifiers in copy target URLs changed in r954995/r952973, i.e. between
1.6.11 and 1.6.12. They get eaten now (which is considered the right
way).

Therefore, avoid the @ in the tests with funky branch names.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Eric Wong <normalperson@yhbt.net>

grep -O: Do not pass color sequences as filenames to... Nazri Ramliy Sat, 3 Jul 2010 02:55:06 +0000 (21:55 -0500)

grep -O: Do not pass color sequences as filenames to pager

With a .gitconfig like this:

[color]
ui = auto
[color "grep"]
filename = magenta

if stdout is a terminal, the grep machinery will output the color
sequence \e[36m before each filename in its output.

In the case of "git grep -O foo", output is argv for the pager.
Disable color when calling the grep machinery in this case.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.2-rc2 v1.7.2-rc2Junio C Hamano Wed, 7 Jul 2010 18:19:42 +0000 (11:19 -0700)

Git 1.7.2-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ab/tap'Junio C Hamano Wed, 7 Jul 2010 18:18:44 +0000 (11:18 -0700)

Merge branch 'ab/tap'

* ab/tap:
t/README: document more test helpers
t/README: proposed rewording...
t/README: Document the do's and don'ts of tests
t/README: Add a section about skipping tests
t/README: Document test_expect_code
t/README: Document test_external*
t/README: Document the prereq functions, and 3-arg test_*
t/README: Typo: paralell -> parallel
t/README: The trash is in 't/trash directory.$name'
t/t9700/test.pl: don't access private object members, use public access methods
t9700: Use Test::More->builder, not $Test::Builder::Test
tests: Say "pass" rather than "ok" on empty lines for TAP
tests: Skip tests in a way that makes sense under TAP
test-lib: output a newline before "ok" under a TAP harness
test-lib: Make the test_external_* functions TAP-aware
test-lib: Adjust output to be valid TAP format

Merge branch 'maint'Junio C Hamano Wed, 7 Jul 2010 18:18:26 +0000 (11:18 -0700)

Merge branch 'maint'

* maint:
backmerge a few more fixes to 1.7.1.X series
rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option
fix git branch -m in presence of cross devices

Conflicts:
RelNotes
builtin/rev-parse.c

backmerge a few more fixes to 1.7.1.X seriesJunio C Hamano Wed, 7 Jul 2010 17:36:19 +0000 (10:36 -0700)

backmerge a few more fixes to 1.7.1.X series

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.4' into maintJunio C Hamano Wed, 7 Jul 2010 18:13:40 +0000 (11:13 -0700)

Merge branch 'maint-1.6.4' into maint

* maint-1.6.4:
rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

rev-parse: fix --parse-opt --keep-dashdash --stop-at... Uwe Kleine-König Tue, 6 Jul 2010 14:46:05 +0000 (16:46 +0200)

rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

The ?: operator has a lower priority than |, so the implicit associativity
made the 6th argument of parse_options be PARSE_OPT_KEEP_DASHDASH if
keep_dashdash was true discarding PARSE_OPT_STOP_AT_NON_OPTION and
PARSE_OPT_SHELL_EVAL.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'mg/doc-rev-parse-treepath-syntax' into... Junio C Hamano Wed, 7 Jul 2010 17:34:04 +0000 (10:34 -0700)

Merge branch 'mg/doc-rev-parse-treepath-syntax' into maint

* mg/doc-rev-parse-treepath-syntax:
git-rev-parse.txt: Add more examples for caret and colon
git-rev-parse.txt: Document ":path" specifier

Merge branch 'tr/receive-pack-aliased-update-fix' into... Junio C Hamano Wed, 7 Jul 2010 17:25:15 +0000 (10:25 -0700)

Merge branch 'tr/receive-pack-aliased-update-fix' into maint

* tr/receive-pack-aliased-update-fix:
check_aliased_update: strcpy() instead of strcat() to copy
receive-pack: detect aliased updates which can occur with symrefs
receive-pack: switch global variable 'commands' to a parameter

Conflicts:
t/t5516-fetch-push.sh

Implement automatic fast-forward merge for submodulesHeiko Voigt Wed, 7 Jul 2010 13:39:13 +0000 (15:39 +0200)

Implement automatic fast-forward merge for submodules

This implements a simple merge strategy for submodule hashes. We check
whether one side of the merge candidates is already contained in the
other and then merge automatically.

If both sides contain changes we search for a merge in the submodule.
In case a single one exists we check that out and suggest it as the
merge resolution. A list of candidates is returned when we find multiple
merges that contain both sides of the changes.

This is useful for a workflow in which the developers can publish topic
branches in submodules and a separate maintainer merges them. In case
the developers always wait until their branch gets merged before tracking
them in the superproject all merges of branches that contain submodule
changes will be resolved automatically. If developers choose to track
their feature branch the maintainer might get a conflict but git will
search the submodule for a merge and suggest it/them as a resolution.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

setup_revisions(): Allow walking history in a submoduleHeiko Voigt Wed, 7 Jul 2010 13:39:12 +0000 (15:39 +0200)

setup_revisions(): Allow walking history in a submodule

By passing the path to a submodule in opt->submodule, the function can
be used to walk history in the named submodule repository, instead of
the toplevel repository.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Teach ref iteration module about submodulesHeiko Voigt Wed, 7 Jul 2010 13:39:11 +0000 (15:39 +0200)

Teach ref iteration module about submodules

We will use this in a later patch to extend setup_revisions() to
load revisions directly from a submodule.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fix git branch -m in presence of cross devicesPierre Habouzit Wed, 7 Jul 2010 07:47:20 +0000 (09:47 +0200)

fix git branch -m in presence of cross devices

When you have for example a bare repository stored on NFS, and that you
create new workdirs locally (using contrib's git-new-workdir), logs/refs
is a symlink to a different device. Hence when the reflogs are renamed,
all must happen below logs/refs or one gets cross device rename errors
like:

git branch -m foo
error: unable to move logfile logs/refs/heads/master to tmp-renamed-log: Invalid cross-device link
fatal: Branch rename failed

The fix is hence to use logs/refs/.tmp-renamed-log as a temporary log
name, instead of just tmp-renamed-log.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>