gitweb.git
Merge branch 'jc/maint-1.6.0-blank-at-eof' (early part... Junio C Hamano Tue, 15 Sep 2009 10:28:08 +0000 (03:28 -0700)

Merge branch 'jc/maint-1.6.0-blank-at-eof' (early part) into jc/maint-blank-at-eof

* 'jc/maint-1.6.0-blank-at-eof' (early part):
diff --whitespace: fix blank lines at end
core.whitespace: split trailing-space into blank-at-{eol,eof}
diff --color: color blank-at-eof
diff --whitespace=warn/error: fix blank-at-eof check
diff --whitespace=warn/error: obey blank-at-eof
diff.c: the builtin_diff() deals with only two-file comparison
apply --whitespace: warn blank but not necessarily empty lines at EOF
apply --whitespace=warn/error: diagnose blank at EOF
apply.c: split check_whitespace() into two
apply --whitespace=fix: detect new blank lines at eof correctly
apply --whitespace=fix: fix handling of blank lines at the eof

diff --whitespace: fix blank lines at endJunio C Hamano Tue, 15 Sep 2009 05:05:57 +0000 (22:05 -0700)

diff --whitespace: fix blank lines at end

The earlier logic tried to colour any and all blank lines that were added
beyond the last blank line in the original, but this was very wrong. If
you added 96 blank lines, a non-blank line, and then 3 blank lines at the
end, only the last 3 lines should trigger the error, not the earlier 96
blank lines.

We need to also make sure that the lines are after the last non-blank line
in the postimage as well before deciding to paint them.

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

Merge branch 'rc/maint-http-no-head-pack-check' into... Junio C Hamano Mon, 14 Sep 2009 21:48:20 +0000 (14:48 -0700)

Merge branch 'rc/maint-http-no-head-pack-check' into maint

* rc/maint-http-no-head-pack-check:
http.c: avoid freeing an uninitialized pointer

http.c: avoid freeing an uninitialized pointerJunio C Hamano Mon, 14 Sep 2009 21:48:15 +0000 (14:48 -0700)

http.c: avoid freeing an uninitialized pointer

An earlier 59b8d38 (http.c: remove verification of remote packs) left
the variable "url" uninitialized; "goto cleanup" codepath can free it
which is not very nice.

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

GIT 1.6.4.3 v1.6.4.3Junio C Hamano Sun, 13 Sep 2009 08:04:23 +0000 (01:04 -0700)

GIT 1.6.4.3

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

svn: properly escape arguments for authors-progMark Lodato Sun, 13 Sep 2009 00:33:23 +0000 (20:33 -0400)

svn: properly escape arguments for authors-prog

Previously, the call to authors-prog was not properly escaped, so any
special characters in the Subversion username, such as spaces and
semi-colons, would be interpreted by the shell rather than being passed
in as the first argument. Now all unsafe characters are escaped using
"git rev-parse --sq-quote"

[ew: switched from "\Q..\E" to "rev-parse --sq-quote"]

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cb/maint-1.6.3-grep-relative-up' into... Junio C Hamano Sun, 13 Sep 2009 08:24:20 +0000 (01:24 -0700)

Merge branch 'cb/maint-1.6.3-grep-relative-up' into maint

* cb/maint-1.6.3-grep-relative-up:
grep: accept relative paths outside current working directory
grep: fix exit status if external_grep() punts

Conflicts:
t/t7002-grep.sh

http.c: remove verification of remote packsTay Ray Chuan Wed, 9 Sep 2009 12:33:50 +0000 (20:33 +0800)

http.c: remove verification of remote packs

Make http.c::fetch_pack_index() no longer check for the remote pack
with a HEAD request before fetching the corresponding pack index file.

Not only does sending a HEAD request before we do a GET incur a
performance penalty, it does not offer any significant error-
prevention advantages (pack fetching in the *_http_pack_request()
methods is capable of handling any errors on its own).

This addresses an issue raised elsewhere:

http://code.google.com/p/msysgit/issues/detail?id=323
http://support.github.com/discussions/repos/957-cant-clone-over-http-or-git

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-pull: do not mention --quiet and --verbose twiceEmmanuel Trillaud Mon, 7 Sep 2009 12:34:35 +0000 (14:34 +0200)

git-pull: do not mention --quiet and --verbose twice

git-pull.txt includes fetch-options.txt and merge-options.txt, both of
which document the --quiet and --verbose.

Supress the ones from fetch-options.txt.

Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

githooks.txt: put hooks into subsectionsBert Wesarg Sun, 6 Sep 2009 10:22:58 +0000 (12:22 +0200)

githooks.txt: put hooks into subsections

All hooks are currently in its own section. Which may confuse users,
because the section name serves as the hook file name and sections are
all caps for man pages. Putting them into a new HOOKS section and each
hook into a subsection keeps the case to lower case.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep: accept relative paths outside current working... Clemens Buchacher Sat, 5 Sep 2009 12:31:17 +0000 (14:31 +0200)

grep: accept relative paths outside current working directory

"git grep" would barf at relative paths pointing outside the current
working directory (or subdirectories thereof). Use quote_path_relative(),
which can handle such cases just fine.

[jc: added tests.]

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep: fix exit status if external_grep() puntsClemens Buchacher Mon, 7 Sep 2009 08:48:01 +0000 (10:48 +0200)

grep: fix exit status if external_grep() punts

If external_grep() is called and punts, grep_cache() mistakenly reported a
hit, even if there were none. The bug can be triggered by calling "git
grep --no-color" from a subdirectory.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push: re-flow non-fast-forward messageJeff King Sun, 6 Sep 2009 06:47:20 +0000 (02:47 -0400)

push: re-flow non-fast-forward message

The extreme raggedness of the right edge make this jarring
to read. Let's re-flow the text to fill the lines in a more
even way.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push: fix english in non-fast-forward messageJeff King Sun, 6 Sep 2009 06:46:25 +0000 (02:46 -0400)

push: fix english in non-fast-forward message

We must use an article when referring to the section
because it is a non-proper noun, and it must be the definite
article because we are referring to a specific section.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

core.whitespace: split trailing-space into blank-at... Junio C Hamano Sun, 6 Sep 2009 05:21:17 +0000 (22:21 -0700)

core.whitespace: split trailing-space into blank-at-{eol,eof}

People who configured trailing-space depended on it to catch both extra
white space at the end of line, and extra blank lines at the end of file.
Earlier attempt to introduce only blank-at-eof gave them an escape hatch
to keep the old behaviour, but it is a regression until they explicitly
specify the new error class.

This introduces a blank-at-eol that only catches extra white space at the
end of line, and makes the traditional trailing-space a convenient synonym
to catch both blank-at-eol and blank-at-eof. This way, people who used
trailing-space continue to catch both classes of errors.

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

diff --color: color blank-at-eofJunio C Hamano Fri, 4 Sep 2009 07:41:15 +0000 (00:41 -0700)

diff --color: color blank-at-eof

Since the coloring logic processed the patch output one line at a time, we
couldn't easily color code the new blank lines at the end of file.

Reuse the adds_blank_at_eof() function to find where the runs of such
blank lines start, keep track of the line number in the preimage while
processing the patch output one line at a time, and paint the new blank
lines that appear after that line to implement this.

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

diff --whitespace=warn/error: fix blank-at-eof checkJunio C Hamano Fri, 4 Sep 2009 06:39:43 +0000 (23:39 -0700)

diff --whitespace=warn/error: fix blank-at-eof check

The "diff --check" logic used to share the same issue as the one fixed for
"git apply" earlier in this series, in that a patch that adds new blank
lines at end could appear as

@@ -l,5 +m,7 @@$
_context$
_context$
-deleted$
+$
+$
+$
_$
_$

where _ stands for SP and $ shows a end-of-line. Instead of looking at
each line in the patch in the callback, simply count the blank lines from
the end in two versions, and notice the presence of new ones.

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

diff --whitespace=warn/error: obey blank-at-eofJunio C Hamano Fri, 4 Sep 2009 05:30:27 +0000 (22:30 -0700)

diff --whitespace=warn/error: obey blank-at-eof

The "diff --check" code used to conflate trailing-space whitespace error
class with this, but now we have a proper separate error class, we should
check it under blank-at-eof, not trailing-space.

The whitespace error is not about _having_ blank lines at end, but about
adding _new_ blank lines. To keep the message consistent with what is
given by "git apply", call whitespace_error_string() to generate it,
instead of using a hardcoded custom message.

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

diff.c: the builtin_diff() deals with only two-file... Junio C Hamano Fri, 4 Sep 2009 06:59:25 +0000 (23:59 -0700)

diff.c: the builtin_diff() deals with only two-file comparison

The combined diff is implemented in combine_diff() and fn_out_consume()
codepath never has to deal with anything but two-file comparision.

Drop nparents from the emit_callback structure and simplify the code.

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

apply --whitespace: warn blank but not necessarily... Junio C Hamano Fri, 4 Sep 2009 09:25:57 +0000 (02:25 -0700)

apply --whitespace: warn blank but not necessarily empty lines at EOF

The whitespace error of adding blank lines at the end of file should
trigger if you added a non-empty line at the end, if the contents of the
line is full of whitespaces.

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

apply --whitespace=warn/error: diagnose blank at EOFJunio C Hamano Thu, 3 Sep 2009 23:02:32 +0000 (16:02 -0700)

apply --whitespace=warn/error: diagnose blank at EOF

"git apply" strips new blank lines at EOF under --whitespace=fix option,
but neigher --whitespace=warn nor --whitespace=error paid any attention to
these errors.

Introduce a new whitespace error class, blank-at-eof, to make the
whitespace error handling more consistent.

The patch adds a new "linenr" field to the struct fragment in order to
record which line the hunk started in the input file, but this is needed
solely for reporting purposes. The detection of this class of whitespace
errors cannot be done while parsing a patch like we do for all the other
classes of whitespace errors. It instead has to wait until we find where
to apply the hunk, but at that point, we do not have an access to the
original line number in the input file anymore, hence the new field.

Depending on your point of view, this may be a bugfix that makes warn and
error in line with fix. Or you could call it a new feature. The line
between them is somewhat fuzzy in this case.

Strictly speaking, triggering more errors than before is a change in
behaviour that is not backward compatible, even though the reason for the
change is because the code was not checking for an error that it should
have. People who do not want added blank lines at EOF to trigger an error
can disable the new error class.

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

apply.c: split check_whitespace() into twoJunio C Hamano Fri, 4 Sep 2009 05:26:33 +0000 (22:26 -0700)

apply.c: split check_whitespace() into two

This splits the logic to record the presence of whitespace errors out of
the check_whitespace() function, which checks and then records. The new
function, record_ws_error(), can be used by the blank-at-eof check that
does not use ws_check() logic to report its findings in the same output
format.

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

apply --whitespace=fix: detect new blank lines at eof... Junio C Hamano Thu, 3 Sep 2009 21:08:20 +0000 (14:08 -0700)

apply --whitespace=fix: detect new blank lines at eof correctly

The command tries to strip blank lines at the end of the file added by a
patch. It is done by first detecting if a hunk in patch has additional
blank lines at the end of itself, and if so checking if such a hunk
applies at the end of file. This patch addresses a bug in the logic to
implement the former (the previous one addressed a bug in the latter).

If the original ends with blank lines, often the patch hunk ends like
this:

@@ -l,5 +m,7 @@$
_context$
_context$
-deleted$
+$
+$
+$
_$
_$

where _ stands for SP and $ shows a end-of-line. This example patch adds
three trailing blank lines, but the code fails to notice it, because it
only pays attention to added blank lines at the very end of the hunk. In
this example, the three added blank lines do not appear textually at the
end in the patch, even though you can see that they are indeed added at
the end, if you rearrange the diff like this:

@@ -l,5 +m,7 @@$
_context$
_context$
-deleted$
_$
_$
+$
+$
+$

The fix is not to reset the number of (candidate) added blank lines at the
end when the loop sees a context line that is empty.

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

apply --whitespace=fix: fix handling of blank lines... Junio C Hamano Fri, 4 Sep 2009 08:41:47 +0000 (01:41 -0700)

apply --whitespace=fix: fix handling of blank lines at the eof

b94f2ed (builtin-apply.c: make it more line oriented, 2008-01-26) broke
the logic used to detect if a hunk adds blank lines at the end of the
file. With the new code after that commit:

- img holds the contents of the file that the hunk is being applied to;

- preimage has the lines the hunk expects to be in img; and

- postimage has the lines the hunk wants to update the part in img that
corresponds to preimage with.

and we need to compare if the last line of preimage (not postimage)
matches the last line of img to see if the hunk applies at the end of the
file.

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

Merge branch 'maint-1.6.3' into maintJunio C Hamano Thu, 3 Sep 2009 16:42:56 +0000 (09:42 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
git-clone: add missing comma in --reference documentation
git-cvsserver: no longer use deprecated 'git-subcommand' commands
clone: disconnect transport after fetching

Merge branch 'maint-1.6.2' into maint-1.6.3Junio C Hamano Thu, 3 Sep 2009 16:42:38 +0000 (09:42 -0700)

Merge branch 'maint-1.6.2' into maint-1.6.3

* maint-1.6.2:
git-clone: add missing comma in --reference documentation
clone: disconnect transport after fetching

git-clone: add missing comma in --reference documentationMiklos Vajna Thu, 3 Sep 2009 11:24:16 +0000 (13:24 +0200)

git-clone: add missing comma in --reference documentation

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

git-cvsserver: no longer use deprecated 'git-subcommand... Gerrit Pape Wed, 2 Sep 2009 09:23:10 +0000 (09:23 +0000)

git-cvsserver: no longer use deprecated 'git-subcommand' commands

git-cvsserver still references git commands like 'git-config', which
is depcrecated. This commit changes git-cvsserver to use the
'git subcommand' form.

Sylvain Beucler reported the problem through
http://bugs.debian.org/536067

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

clone: disconnect transport after fetchingJeff King Wed, 2 Sep 2009 06:36:47 +0000 (02:36 -0400)

clone: disconnect transport after fetching

The current code just leaves the transport in whatever state
it was in after performing the fetch. For a non-empty clone
over the git protocol, the transport code already
disconnects at the end of the fetch.

But for an empty clone, we leave the connection hanging, and
eventually close the socket when clone exits. This causes
the remote upload-pack to complain "the remote end hung up
unexpectedly". While this message is harmless to the clone
itself, it is unnecessarily scary for a user to see and may
pollute git-daemon logs.

This patch just explicitly calls disconnect after we are
done with the remote end, which sends a flush packet to
upload-pack and cleanly disconnects, avoiding the error
message.

Other transports are unaffected or slightly improved:

- for a non-empty repo over the git protocol, the second
disconnect is a no-op (since we are no longer connected)

- for "walker" transports (like HTTP or FTP), we actually
free some used memory (which previously just sat until
the clone process exits)

- for "rsync", disconnect is always a no-op anyway

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

GIT 1.6.4.2 v1.6.4.2Junio C Hamano Sat, 29 Aug 2009 21:31:01 +0000 (14:31 -0700)

GIT 1.6.4.2

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

Remove unused t/t8005/iso8859-5.txtNanako Shiraishi Sat, 29 Aug 2009 07:49:32 +0000 (00:49 -0700)

Remove unused t/t8005/iso8859-5.txt

This file is no longer used since 54bc13c (t8005: Nobody writes Russian in
shift_jis, 2009-06-18).

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'rc/maint-http-fix' into maintJunio C Hamano Sat, 29 Aug 2009 02:34:16 +0000 (19:34 -0700)

Merge branch 'rc/maint-http-fix' into maint

* rc/maint-http-fix:
http.c: don't assume that urls don't end with slash

http.c: set slot callback members to NULL when releasin... Tay Ray Chuan Wed, 26 Aug 2009 12:20:53 +0000 (20:20 +0800)

http.c: set slot callback members to NULL when releasing object

Set the members callback_func and callback_data of freq->slot to NULL
when releasing a http_object_request. release_active_slot() is also
invoked on the slot to remove the curl handle associated with the slot
from the multi stack (CURLM *curlm in http.c).

These prevent the callback function and data from being used in http
methods (like http.c::finish_active_slot()) after a
http_object_request has been free'd.

Noticed by Ali Polatel, who later tested this patch to verify that it
fixes the problem he saw; Dscho helped to identify the problem spot.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.3' into maintJunio C Hamano Fri, 28 Aug 2009 03:42:42 +0000 (20:42 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
Fix overridable written with an extra 'e'
Documentation: git-archive: mark --format as optional in summary
Round-down years in "years+months" relative date view

Merge branch 'maint-1.6.2' into maint-1.6.3Junio C Hamano Fri, 28 Aug 2009 03:42:38 +0000 (20:42 -0700)

Merge branch 'maint-1.6.2' into maint-1.6.3

* maint-1.6.2:
Fix overridable written with an extra 'e'
Documentation: git-archive: mark --format as optional in summary
Round-down years in "years+months" relative date view

Conflicts:
Documentation/git-archive.txt

Fix overridable written with an extra 'e'Nanako Shiraishi Fri, 28 Aug 2009 03:18:49 +0000 (12:18 +0900)

Fix overridable written with an extra 'e'

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Fri, 28 Aug 2009 03:41:37 +0000 (20:41 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
Documentation: git-archive: mark --format as optional in summary

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Fri, 28 Aug 2009 03:41:31 +0000 (20:41 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
Documentation: git-archive: mark --format as optional in summary

Documentation: git-archive: mark --format as optional... Wesley J. Landaker Fri, 28 Aug 2009 02:55:43 +0000 (20:55 -0600)

Documentation: git-archive: mark --format as optional in summary

The --format option was made optional in 8ff21b1 (git-archive: make
tar the default format, 2007-04-09), but it was not marked as optional
in the summary. This trival patch just changes the summary to match
the rest of the documentation.

Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.5.6' into maint-1.6.0Junio C Hamano Fri, 28 Aug 2009 03:03:35 +0000 (20:03 -0700)

Merge branch 'maint-1.5.6' into maint-1.6.0

* maint-1.5.6:
revision traversal and pack: notice and die on missing commit

Round-down years in "years+months" relative date viewDavid Reiss Thu, 27 Aug 2009 23:39:38 +0000 (16:39 -0700)

Round-down years in "years+months" relative date view

Previously, a commit from 1 year and 7 months ago would display as
"2 years, 7 months ago".

Signed-off-by: David Reiss <dreiss@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-log: allow --decorate[=short|full]Lars Hjemli Sat, 15 Aug 2009 14:23:12 +0000 (16:23 +0200)

git-log: allow --decorate[=short|full]

Commit de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.

This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Minor improvement to the write-tree documentationDavid Kågedal Wed, 26 Aug 2009 14:04:54 +0000 (16:04 +0200)

Minor improvement to the write-tree documentation

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-bisect: call the found commit "*the* first bad... Nanako Shiraishi Wed, 26 Aug 2009 08:38:50 +0000 (17:38 +0900)

git-bisect: call the found commit "*the* first bad commit"

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'js/maint-cover-letter-non-ascii' into... Junio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'js/maint-cover-letter-non-ascii' into maint

* js/maint-cover-letter-non-ascii:
Correctly mark cover letters' encodings if they are not pure ASCII
Expose the has_non_ascii() function

Merge branch 'jc/maint-clean-nested-dir-safety' into... Junio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'jc/maint-clean-nested-dir-safety' into maint

* jc/maint-clean-nested-dir-safety:
clean: require double -f options to nuke nested git repository and work tree

Merge branch 'jk/maint-merge-msg-fix' into maintJunio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'jk/maint-merge-msg-fix' into maint

* jk/maint-merge-msg-fix:
merge: indicate remote tracking branches in merge message
merge: fix incorrect merge message for ambiguous tag/branch
add tests for merge message headings

Merge branch 'jc/apply-epoch-patch' into maintJunio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'jc/apply-epoch-patch' into maint

* jc/apply-epoch-patch:
apply: notice creation/removal patches produced by GNU diff

Merge branch 'jp/symlink-dirs' into maintJunio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'jp/symlink-dirs' into maint

* jp/symlink-dirs:
t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite
git-checkout: be careful about untracked symlinks
lstat_cache: guard against full match of length of 'name' parameter
Demonstrate bugs when a directory is replaced with a symlink

Merge branch 'maint-1.6.3' into maintJunio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
add -p: do not attempt to coalesce mode changes
git add -p: demonstrate failure when staging both mode and hunk

Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into... Junio C Hamano Wed, 26 Aug 2009 18:22:00 +0000 (11:22 -0700)

Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into maint-1.6.3

* tr/maint-1.6.3-add-p-modeonly-fix:
add -p: do not attempt to coalesce mode changes
git add -p: demonstrate failure when staging both mode and hunk

GIT 1.6.4.1 v1.6.4.1Junio C Hamano Fri, 21 Aug 2009 19:02:25 +0000 (12:02 -0700)

GIT 1.6.4.1

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

Merge branch 'bc/maint-am-email' into maintJunio C Hamano Sat, 22 Aug 2009 01:51:30 +0000 (18:51 -0700)

Merge branch 'bc/maint-am-email' into maint

* bc/maint-am-email:
git-am: print fair error message when format detection fails
am: allow individual e-mail files as input

Merge branch 'jc/maint-merge-recursive-fix' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:24 +0000 (11:34 -0700)

Merge branch 'jc/maint-merge-recursive-fix' into maint

* jc/maint-merge-recursive-fix:
merge-recursive: don't segfault while handling rename clashes

Merge branch 'zf/maint-gitweb-acname' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:17 +0000 (11:34 -0700)

Merge branch 'zf/maint-gitweb-acname' into maint

* zf/maint-gitweb-acname:
gitweb: parse_commit_text encoding fix

Merge branch 'np/maint-limit-delta-cache' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:02 +0000 (11:34 -0700)

Merge branch 'np/maint-limit-delta-cache' into maint

* np/maint-limit-delta-cache:
don't let the delta cache grow unbounded in 'git repack'

Merge branch 'jk/maint-show-tag' into maintJunio C Hamano Fri, 21 Aug 2009 18:33:54 +0000 (11:33 -0700)

Merge branch 'jk/maint-show-tag' into maint

* jk/maint-show-tag:
show: add space between multiple items
show: suppress extra newline when showing annotated tag

Merge branch 'sb/maint-pull-rebase' into maintJunio C Hamano Fri, 21 Aug 2009 18:33:08 +0000 (11:33 -0700)

Merge branch 'sb/maint-pull-rebase' into maint

* sb/maint-pull-rebase:
pull: support rebased upstream + fetch + pull --rebase
t5520-pull: Test for rebased upstream + fetch + pull --rebase

http.c: don't assume that urls don't end with slashTay Ray Chuan Mon, 17 Aug 2009 09:09:43 +0000 (17:09 +0800)

http.c: don't assume that urls don't end with slash

Make append_remote_object_url() (and by implication,
get_remote_object_url) use end_url_with_slash() to ensure that the url
ends with a slash.

Previously, they assumed that the url did not end with a slash and
as a result appended a slash, sometimes errorneously.

This fixes an issue introduced in 5424bc5 ("http*: add helper methods
for fetching objects (loose)"), where the append_remote_object_url()
implementation in http-push.c, which assumed that urls end with a
slash, was replaced by another one in http.c, which assumed urls did
not end with a slash.

The above issue was raised by Thomas Schlichter:

http://marc.info/?l=git&m=125043105231327

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Tested-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: make the usage string fit on 80 chars... Matthieu Moy Tue, 18 Aug 2009 09:51:00 +0000 (11:51 +0200)

filter-branch: make the usage string fit on 80 chars terminals.

It used to be a single, huge line, badly wrapped by xterm.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: add an example how to add ACKs to a... Johannes Schindelin Mon, 17 Aug 2009 20:38:46 +0000 (22:38 +0200)

filter-branch: add an example how to add ACKs to a range of commits

When you have to add certain lines like ACKs (or for that matter,
Signed-off-by:s) to a range of commits starting with HEAD, you might
be tempted to use 'git rebase -i -10', but that is a waste of your
time.

It is better to use 'git filter-branch' with an appropriate message
filter, and this commit adds an example how to do so to
filter-branch's man page.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

docs: describe impact of repack on "clone -s"Jeff King Mon, 17 Aug 2009 06:19:17 +0000 (02:19 -0400)

docs: describe impact of repack on "clone -s"

The effects of repacking on a repository with alternates are a bit
subtle. The two main things users will want are:

1. Not to waste disk space by accidentally copying objects which could
be shared.

2. Copying all objects explicitly to break the dependency on the source
repo.

This patch describes both under the "clone -s" documentation. It makes
sense to put it there rather than in git-repack.txt for both cases.

For (1), we are warning the user who is using "clone -s" about what _not_
to do, so we need to get their attention when reading about "clone -s".

For (2), we are telling them how git-repack can be used to accomplish a
task, but until they know that git-repack is the right tool, they have no
reason to look at the repack documentation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add -p: do not attempt to coalesce mode changesThomas Rast Sat, 15 Aug 2009 13:56:39 +0000 (15:56 +0200)

add -p: do not attempt to coalesce mode changes

In 0392513 (add-interactive: refactor mode hunk handling, 2009-04-16),
we merged the interaction loops for mode changes and hunk staging.
This was fine at the time, because 0beee4c (git-add--interactive:
remove hunk coalescing, 2008-07-02) removed hunk coalescing.

However, in 7a26e65 (Revert "git-add--interactive: remove hunk
coalescing", 2009-05-16), we resurrected it. Since then, the code
would attempt in vain to merge mode changes with diff hunks,
corrupting both in the process.

We add a check to the coalescing loop to ensure it only looks at diff
hunks, thus skipping mode changes.

Noticed-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git add -p: demonstrate failure when staging both mode... Kirill Smelkov Sat, 15 Aug 2009 12:26:49 +0000 (16:26 +0400)

git add -p: demonstrate failure when staging both mode and hunk

When trying to stage changes to file which has also pending `chmod +x`,
`git add -p` produces lots of 'Use of uninitialized value ...' warnings
and fails to do the job:

$ echo content >> file
$ chmod +x file
$ git add -p
diff --git a/file b/file
index e69de29..d95f3ad
--- a/file
+++ b/file
old mode 100644
new mode 100755
Stage mode change [y,n,q,a,d,/,j,J,g,?]? y
@@ -0,0 +1 @@
+content
Stage this hunk [y,n,q,a,d,/,K,g,e,?]? y
Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776.
Use of uninitialized value $ofs in numeric le (<=) at .../git-add--interactive line 806.
Use of uninitialized value $o0_ofs in concatenation (.) or string at .../git-add--interactive line 830.
Use of uninitialized value $n0_ofs in concatenation (.) or string at .../git-add--interactive line 830.
Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776.
fatal: corrupt patch at line 5
diff --git a/file b/file
index e69de29..d95f3ad
--- a/file
+++ b/file
@@ -,0 + @@
+content

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.3' into maintJunio C Hamano Wed, 12 Aug 2009 23:15:55 +0000 (16:15 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
Change mentions of "git programs" to "git commands"
Documentation: merge: one <remote> is required
help.c: give correct structure's size to memset()

push: point to 'git pull' and 'git push --force' in... Matthieu Moy Sat, 8 Aug 2009 07:51:08 +0000 (09:51 +0200)

push: point to 'git pull' and 'git push --force' in case of non-fast forward

'git push' failing because of non-fast forward is a very common situation,
and a beginner does not necessarily understand "fast forward" immediately.

Add a new section to the git-push documentation and refer them to it.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: add: <filepattern>... is optionalPaul Bolle Tue, 11 Aug 2009 13:03:10 +0000 (15:03 +0200)

Documentation: add: <filepattern>... is optional

<filepattern>... is optional (e.g. when the --all or --update
options are used) so use square brackets in the synopsis.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Change mentions of "git programs" to "git commands"Ori Avtalion Fri, 7 Aug 2009 14:24:21 +0000 (17:24 +0300)

Change mentions of "git programs" to "git commands"

Most of the docs and printouts refer to "commands" when discussing what
the end users call via the "git" top-level program. We should refer them
as "git programs" when we discuss the fact that the commands are
implemented as separate programs, but in other contexts, it is better to
use the term "git commands" consistently.

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: merge: one <remote> is requiredPaul Bolle Tue, 11 Aug 2009 13:03:58 +0000 (15:03 +0200)

Documentation: merge: one <remote> is required

merge only requires one <remote>, so "<remote>..." should be used in the
synopsis (and not "<remote> <remote>...").

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

help.c: give correct structure's size to memset()Johan Herland Tue, 11 Aug 2009 10:10:21 +0000 (12:10 +0200)

help.c: give correct structure's size to memset()

These two structures are of the same type, but we'd better be consistent.

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

Merge branch 'maint-1.6.3' into maintJunio C Hamano Tue, 11 Aug 2009 05:23:48 +0000 (22:23 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
Fix typos in git-remote.txt and git-symbolic-ref.txt

Fix typos in git-remote.txt and git-symbolic-ref.txtŠtěpán Němec Tue, 11 Aug 2009 00:52:07 +0000 (02:52 +0200)

Fix typos in git-remote.txt and git-symbolic-ref.txt

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am: print fair error message when format detection... Nicolas Sebrecht Fri, 7 Aug 2009 01:08:13 +0000 (20:08 -0500)

git-am: print fair error message when format detection fails

Avoid git ending with this message:
"Patch format is not supported."

With improved error message in the format detection failure case by
Giuseppe Bilotta.

Signed-off-by: Nicolas Sebrecht <ni.s@laposte.net>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: allow individual e-mail files as inputJunio C Hamano Fri, 7 Aug 2009 01:08:12 +0000 (20:08 -0500)

am: allow individual e-mail files as input

We traditionally allowed a mbox file or a directory name of a maildir (but
never an individual file inside a maildir) to be given to "git am". Even
though an individual file in a maildir (or more generally, a piece of
RFC2822 e-mail) is not a mbox file, it contains enough information to
create a commit out of it, so there is no reason to reject one. Running
mailsplit on such a file feels stupid, but it does not hurt.

This builds on top of a5a6755 (git-am foreign patch support: introduce
patch_format, 2009-05-27) that introduced mailbox format detection. The
codepath to deal with a mbox requires it to begin with "From " line and
also allows it to begin with "From: ", but a random piece of e-mail can
and often do begin with any valid RFC2822 header lines.

Instead of checking the first line, we extract all the lines up to the
first empty line, and make sure they look like e-mail headers.

A test is added to t4150 to demonstrate this feature.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Correctly mark cover letters' encodings if they are... Johannes Schindelin Mon, 10 Aug 2009 16:22:22 +0000 (18:22 +0200)

Correctly mark cover letters' encodings if they are not pure ASCII

If your name is, say, Üwë, you want your cover letters to appear
correctly. Convince format-patch to mark it as 8-bit.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Expose the has_non_ascii() functionJohannes Schindelin Mon, 10 Aug 2009 16:22:18 +0000 (18:22 +0200)

Expose the has_non_ascii() function

This function is useful outside of log-tree.c, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-instaweb: fix mod_perl detection for apache2Mark A Rada Sat, 8 Aug 2009 22:24:02 +0000 (18:24 -0400)

git-instaweb: fix mod_perl detection for apache2

The script was looking for something that matched the '^our $gitbin'
regex, which no longer exists in gitweb.cgi.

Now it looks for 'MOD_PERL', which should be on the line that checks
to see if the script is running in a mod_perl environment.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge: indicate remote tracking branches in merge messageJeff King Sun, 9 Aug 2009 10:02:51 +0000 (06:02 -0400)

merge: indicate remote tracking branches in merge message

Previously when merging directly from a local tracking
branch like:

git merge origin/master

The merge message said:

Merge commit 'origin/master'

* commit 'origin/master':
...

Instead, let's be more explicit about what we are merging:

Merge remote branch 'origin/master'

* origin/master:
...

We accomplish this by recognizing remote tracking branches
in git-merge when we build the simulated FETCH_HEAD output
that we feed to fmt-merge-msg.

In addition to a new test in t7608, we have to tweak the
expected output of t3409, which does such a merge.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge: fix incorrect merge message for ambiguous tag... Jeff King Sun, 9 Aug 2009 10:02:24 +0000 (06:02 -0400)

merge: fix incorrect merge message for ambiguous tag/branch

If we have both a tag and a branch named "foo", then calling
"git merge foo" will warn about the ambiguous ref, but merge
the tag.

When generating the commit message, though, we simply
checked whether "refs/heads/foo" existed, and if it did,
assumed it was a branch. This led to the statement "Merge
branch 'foo'" in the commit message, which is quite wrong.

Instead, we should use dwim_ref to find the actual ref used,
and describe it appropriately.

In addition to the test in t7608, we must also tweak the
expected output of t4202, which was accidentally triggering
this bug.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add tests for merge message headingsJeff King Sun, 9 Aug 2009 10:01:48 +0000 (06:01 -0400)

add tests for merge message headings

When calling "git merge $X", we automatically generate a
commit message containing something like "Merge branch
'$X'". This test script checks that those messages say what
they should, and exposes a failure when merging a refname
that is ambiguous between a tag and a branch.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6035-merge-dir-to-symlink depends on SYMLINKS prerequisiteJohannes Sixt Sun, 9 Aug 2009 15:35:02 +0000 (17:35 +0200)

t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite

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

Merge branch 'maint-1.6.3' into maintJunio C Hamano Sat, 8 Aug 2009 03:44:26 +0000 (20:44 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
verify-pack -v: do not report "chain length 0"
t5510: harden the way verify-pack is used

Merge branch 'maint-1.6.2' into maint-1.6.3Junio C Hamano Sat, 8 Aug 2009 03:44:15 +0000 (20:44 -0700)

Merge branch 'maint-1.6.2' into maint-1.6.3

* maint-1.6.2:
verify-pack -v: do not report "chain length 0"
t5510: harden the way verify-pack is used

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Sat, 8 Aug 2009 03:44:09 +0000 (20:44 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
verify-pack -v: do not report "chain length 0"
t5510: harden the way verify-pack is used

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sat, 8 Aug 2009 03:44:02 +0000 (20:44 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
verify-pack -v: do not report "chain length 0"
t5510: harden the way verify-pack is used

verify-pack -v: do not report "chain length 0"Junio C Hamano Fri, 7 Aug 2009 22:36:31 +0000 (15:36 -0700)

verify-pack -v: do not report "chain length 0"

When making a histogram of delta chain length in the pack, the program
collects number of objects whose delta depth exceeds the MAX_CHAIN limit
in histogram[0], and showed it as the number of items that exceeds the
limit correctly. HOWEVER, it also showed the same number labeled as
"chain length = 0".

In fact, we are not showing the number of objects whose chain length is
zero, i.e. the base objects. Correct this.

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

t5510: harden the way verify-pack is usedJunio C Hamano Sat, 8 Aug 2009 03:12:13 +0000 (20:12 -0700)

t5510: harden the way verify-pack is used

The test ignored the exit status from verify pack command, and also relied
on not seeing any delta chain statistics.

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

don't let the delta cache grow unbounded in 'git repack'Nicolas Pitre Wed, 5 Aug 2009 20:55:07 +0000 (16:55 -0400)

don't let the delta cache grow unbounded in 'git repack'

I have 4GB of RAM on my system which should, in theory, be quite enough
to repack a 600 MB repository. However the unbounded delta cache size
always pushes it into swap, at which point everything virtually comes to
a halt. So unbounded caches are never a good idea.

A default of 256MB should be a good compromize between memory usage and
speed where medium sized repositories are still likely to fit in the
cache with a reasonable memory usage, and larger repositories are going
to take quite some time to repack already anyway.

While at it, clarify the associated config variable documentation
entries a bit.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.3' into maintJunio C Hamano Wed, 5 Aug 2009 19:37:24 +0000 (12:37 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
Better usage string for reflog.
hg-to-git: don't import the unused popen2 module
send-email: remove debug trace
config: Keep inner whitespace verbatim

gitweb: parse_commit_text encoding fixZoltán Füzesi Sun, 2 Aug 2009 07:42:24 +0000 (09:42 +0200)

gitweb: parse_commit_text encoding fix

Call to_utf8 when parsing author and committer names, otherwise they will appear
with bad encoding if they written by using chop_and_escape_str.

Signed-off-by: Zoltán Füzesi <zfuzesi@eaglet.hu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb/README: Document $base_urlJakub Narebski Tue, 4 Aug 2009 15:54:32 +0000 (17:54 +0200)

gitweb/README: Document $base_url

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: git submodule: add missing options to... Jens Lehmann Sat, 1 Aug 2009 18:49:47 +0000 (20:49 +0200)

Documentation: git submodule: add missing options to synopsis

The option --merge was missing for submodule update and --cached for
submodule summary.

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

Better usage string for reflog.Matthieu Moy Wed, 5 Aug 2009 15:36:28 +0000 (17:36 +0200)

Better usage string for reflog.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

hg-to-git: don't import the unused popen2 moduleMiklos Vajna Mon, 3 Aug 2009 16:41:34 +0000 (18:41 +0200)

hg-to-git: don't import the unused popen2 module

Importing the popen2 module in Python-2.6 results in the
"DeprecationWarning: The popen2 module is deprecated. Use the
subprocess module." message. The module itself isn't used in fact, so
just removing it solves the problem.

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

send-email: remove debug traceErik Faye-Lund Tue, 4 Aug 2009 21:57:34 +0000 (21:57 +0000)

send-email: remove debug trace

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>

config: Keep inner whitespace verbatimBjörn Steinbrink Thu, 30 Jul 2009 11:41:57 +0000 (13:41 +0200)

config: Keep inner whitespace verbatim

Configuration values are expected to be quoted when they have leading or
trailing whitespace, but inner whitespace should be kept verbatim even if
the value is not quoted. This is already documented in git-config(1), but
the code caused inner whitespace to be collapsed to a single space,
breaking, for example, clones from a path that has two consecutive spaces
in it, as future fetches would only see a single space.

Reported-by: John te Bokkel <tanj.tanj@gmail.com>
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-recursive: don't segfault while handling rename... Junio C Hamano Fri, 31 Jul 2009 00:38:15 +0000 (17:38 -0700)

merge-recursive: don't segfault while handling rename clashes

When a branch moves A to B while the other branch created B (or moved C to
B), the code tried to rename one of them to B~something to preserve both
versions, and failed to register temporary resolution for the original
path B at stage#0 during virtual ancestor computation. This left the
index in unmerged state and caused a segfault.

A better solution is to merge these two versions of B's in place and use
the (potentially conflicting) result as the intermediate merge result in
the virtual ancestor.

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

git-checkout: be careful about untracked symlinksLinus Torvalds Thu, 30 Jul 2009 03:22:25 +0000 (20:22 -0700)

git-checkout: be careful about untracked symlinks

This fixes the case where an untracked symlink that points at a directory
with tracked paths confuses the checkout logic, demostrated in t6035.

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

lstat_cache: guard against full match of length of... Kjetil Barvik Sun, 14 Jun 2009 13:08:28 +0000 (15:08 +0200)

lstat_cache: guard against full match of length of 'name' parameter

longest_path_match() in symlinks.c does exactly what it's name says,
but in some cases that match can be too long, since the
has_*_leading_path() functions assumes that the match will newer be as
long as the name string given to the function.

fix this by adding an extra if test which checks if the match length
is equal to the 'len' parameter.

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

Demonstrate bugs when a directory is replaced with... Pickens, James E Wed, 29 Jul 2009 21:02:39 +0000 (14:02 -0700)

Demonstrate bugs when a directory is replaced with a symlink

This test creates two directories, a/b and a/b-2, then replaces a/b with
a symlink to a/b-2, then merges that change into the 'baseline' commit,
which contains an unrelated change.

There are two bugs:
1. 'git checkout' incorrectly deletes work tree file a/b-2/d.
2. 'git merge' incorrectly deletes work tree file a/b-2/d.

The test goes on to create another branch in which a/b-2 is replaced
with a symlink to a/b (i.e., the reverse of what was done the first
time), and merge it into the 'baseline' commit.

There is a different bug:
3. The merge should be clean, but git reports a conflict.

Signed-off-by: James Pickens <james.e.pickens@intel.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>