gitweb.git
Merge branch 'hm/maint-imap-send-crlf' into maint-1.6.6Junio C Hamano Sun, 7 Mar 2010 22:53:57 +0000 (14:53 -0800)

Merge branch 'hm/maint-imap-send-crlf' into maint-1.6.6

* hm/maint-imap-send-crlf:
git-imap-send: Convert LF to CRLF before storing patch to draft box

Merge branch 'gf/maint-sh-setup-nongit-ok' into maint... Junio C Hamano Sun, 7 Mar 2010 22:53:53 +0000 (14:53 -0800)

Merge branch 'gf/maint-sh-setup-nongit-ok' into maint-1.6.6

* gf/maint-sh-setup-nongit-ok:
require_work_tree broken with NONGIT_OK

Merge branch 'jk/maint-rmdir-fix' into maint-1.6.6Junio C Hamano Sun, 7 Mar 2010 22:53:50 +0000 (14:53 -0800)

Merge branch 'jk/maint-rmdir-fix' into maint-1.6.6

* jk/maint-rmdir-fix:
rm: fix bug in recursive subdirectory removal

Merge branch 'rs/optim-text-wrap' into maint-1.6.6Junio C Hamano Sun, 7 Mar 2010 22:53:45 +0000 (14:53 -0800)

Merge branch 'rs/optim-text-wrap' into maint-1.6.6

* rs/optim-text-wrap:
utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text()
utf8.c: remove strbuf_write()
utf8.c: remove print_spaces()
utf8.c: remove print_wrapped_text()

Merge branch 'tr/maint-cherry-pick-list' into maint... Junio C Hamano Sun, 7 Mar 2010 22:53:40 +0000 (14:53 -0800)

Merge branch 'tr/maint-cherry-pick-list' into maint-1.6.6

* tr/maint-cherry-pick-list:
cherry_pick_list: quit early if one side is empty

Merge branch 'cc/maint-bisect-paths' into maint-1.6.6Junio C Hamano Sun, 7 Mar 2010 22:53:35 +0000 (14:53 -0800)

Merge branch 'cc/maint-bisect-paths' into maint-1.6.6

* cc/maint-bisect-paths:
bisect: error out when passing bad path parameters

Merge branch 'maint-1.6.5' into maint-1.6.6Junio C Hamano Fri, 5 Mar 2010 06:24:19 +0000 (22:24 -0800)

Merge branch 'maint-1.6.5' into maint-1.6.6

* maint-1.6.5:
Remove extra '-' from git-am(1)

Remove extra '-' from git-am(1)Michal Sojka Thu, 4 Mar 2010 12:08:28 +0000 (13:08 +0100)

Remove extra '-' from git-am(1)

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: error out when passing bad path parametersChristian Couder Sun, 28 Feb 2010 22:19:09 +0000 (23:19 +0100)

bisect: error out when passing bad path parameters

As reported by Mark Lodato, "git bisect", when it was started with
path parameters that match no commit was kind of working without
taking account of path parameters and was reporting something like:

Bisecting: -1 revisions left to test after this (roughly 0 steps)

It is more correct and safer to just error out in this case, before
displaying the revisions left, so this patch does just that.

Note that this bug is very old, it exists at least since v1.5.5.
And it is possible to detect that case earlier in the bisect
algorithm, but it is not clear that it would be an improvement to
error out earlier, on the contrary it may change the behavior of
"git rev-list --bisect-all" for example, which is currently correct.

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

t3301-notes: insert a shbang line in ./fake_editor.shJohannes Sixt Thu, 25 Feb 2010 10:39:50 +0000 (11:39 +0100)

t3301-notes: insert a shbang line in ./fake_editor.sh

This is required on Windows because git-notes is now a built-in
rather than a shell script.

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

cherry_pick_list: quit early if one side is emptyThomas Rast Sat, 20 Feb 2010 11:42:04 +0000 (12:42 +0100)

cherry_pick_list: quit early if one side is empty

The --cherry-pick logic starts by counting the commits on each side,
so that it can filter away commits on the bigger one. However, so
far it missed an opportunity for optimization: it doesn't need to do
any work if either side is empty.

This in particular helps the common use-case 'git rebase -i HEAD~$n':
it internally uses --cherry-pick, but since HEAD~$n is a direct
ancestor the left side is always empty.

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

utf8.c: speculatively assume utf-8 in strbuf_add_wrappe... René Scharfe Fri, 19 Feb 2010 22:20:44 +0000 (23:20 +0100)

utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text()

is_utf8() works by calling utf8_width() for each character at the
supplied location. In strbuf_add_wrapped_text(), we do that anyway
while wrapping the lines. So instead of checking the encoding
beforehand, optimistically assume that it's utf-8 and wrap along
until an invalid character is hit, and when that happens start over.

This pays off if the text consists only of valid utf-8 characters.
The following command was run against the Linux kernel repo with
git 1.7.0:

$ time git log --format='%b' v2.6.32 >/dev/null

real 0m2.679s
user 0m2.580s
sys 0m0.100s

$ time git log --format='%w(60,4,8)%b' >/dev/null

real 0m4.342s
user 0m4.230s
sys 0m0.110s

And with this patch series:

$ time git log --format='%w(60,4,8)%b' >/dev/null

real 0m3.741s
user 0m3.630s
sys 0m0.110s

So the cost of wrapping is reduced to 70% in this case.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

utf8.c: remove strbuf_write()René Scharfe Fri, 19 Feb 2010 22:16:45 +0000 (23:16 +0100)

utf8.c: remove strbuf_write()

The patch before the previous one made sure that all callers of
strbuf_add_wrapped_text() supply a strbuf. Replace all calls of
strbuf_write() with regular strbuf functions and remove it.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

utf8.c: remove print_spaces()René Scharfe Fri, 19 Feb 2010 22:15:55 +0000 (23:15 +0100)

utf8.c: remove print_spaces()

The previous patch made sure that strbuf_add_wrapped_text() (and thus
strbuf_add_indented_text(), too) always get a strbuf. Make use of
this fact by adding strbuf_addchars(), a small helper that adds a
char the specified number of times to a strbuf, and use it to replace
print_spaces().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

utf8.c: remove print_wrapped_text()René Scharfe Fri, 19 Feb 2010 22:15:01 +0000 (23:15 +0100)

utf8.c: remove print_wrapped_text()

strbuf_add_wrapped_text() is called only from print_wrapped_text()
without a strbuf (in which case it writes its results to stdout).

At its only callsite, supply a strbuf, call strbuf_add_wrapped_text()
directly and remove the wrapper function.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rm: fix bug in recursive subdirectory removalJeff King Fri, 19 Feb 2010 05:57:21 +0000 (00:57 -0500)

rm: fix bug in recursive subdirectory removal

If we remove a path in a/deep/subdirectory, we should try to
remove as many trailing components as possible (i.e.,
subdirectory, then deep, then a). However, the test for the
return value of rmdir was reversed, so we only ever deleted
at most one level.

The fix is in remove_path, so "apply" and "merge-recursive"
also are fixed.

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

require_work_tree broken with NONGIT_OKGabriel Filion Wed, 17 Feb 2010 04:18:50 +0000 (23:18 -0500)

require_work_tree broken with NONGIT_OK

With NONGIT_OK set, require_work_tree function outside a git repository
gives a syntax error. This is caused by an incorrect use of "test" that
didn't anticipate $(git rev-parse --is-inside-work-tree) may return an
empty string.

Properly quote the argument to "test", and send the standard error stream
to /dev/null to avoid giving duplicate error messages.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.5' into maint-1.6.6Junio C Hamano Tue, 16 Feb 2010 23:04:55 +0000 (15:04 -0800)

Merge branch 'maint-1.6.5' into maint-1.6.6

* maint-1.6.5:
dwim_ref: fix dangling symref warning
stash pop: remove 'apply' options during 'drop' invocation
diff: make sure --output=/bad/path is caught

dwim_ref: fix dangling symref warningJeff King Tue, 16 Feb 2010 07:03:16 +0000 (02:03 -0500)

dwim_ref: fix dangling symref warning

If we encounter a symref that is dangling, in most cases we will warn
about it. The one exception is a dangling HEAD, as that indicates a
branch yet to be born.

However, the check in dwim_ref was not quite right. If we were fed
something like "HEAD^0" we would try to resolve "HEAD", see that it is
dangling, and then check whether the _original_ string we got was
"HEAD" (which it wasn't in this case). And that makes no sense; the
dangling thing we found was not "HEAD^0" but rather "HEAD".

Fixing this squelches a scary warning from "submodule summary HEAD" (and
consequently "git status" with status.submodulesummary set) in an empty
repo, as the submodule script calls "git rev-parse -q --verify HEAD^0".

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

stash pop: remove 'apply' options during 'drop' invocationThomas Rast Mon, 15 Feb 2010 16:05:46 +0000 (17:05 +0100)

stash pop: remove 'apply' options during 'drop' invocation

The 'git stash pop' option parsing used to remove the first argument
in --index mode. At the time this was implemented, this first
argument was always --index. However, since the invention of the -q
option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can
cause an internal invocation of

git stash drop --index

by running

git stash pop -q --index

which then of course fails because drop doesn't know --index.

To handle this, instead let 'git stash apply' decide what the future
argument to 'drop' should be.

Warning: this means that 'git stash apply' must parse all options that
'drop' can take, and deal with them in the same way. This is
currently true for its only option -q.

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

diff: make sure --output=/bad/path is caughtLarry D'Anna Tue, 16 Feb 2010 04:10:45 +0000 (23:10 -0500)

diff: make sure --output=/bad/path is caught

The return value from fopen wasn't being checked.

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove hyphen from "git-command" in two error messagesPete Harlan Mon, 15 Feb 2010 23:33:18 +0000 (15:33 -0800)

Remove hyphen from "git-command" in two error messages

Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fix minor memory leak in get_tree_entry()René Scharfe Sun, 14 Feb 2010 09:56:46 +0000 (10:56 +0100)

fix minor memory leak in get_tree_entry()

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix typo in 1.6.6.2 release notesJunio C Hamano Fri, 12 Feb 2010 23:40:01 +0000 (15:40 -0800)

Fix typo in 1.6.6.2 release notes

Of course, these are changes since 1.6.6.1; changes since 1.6.6.2
would have been nil.

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

Re-fix check-ref-format documentation mark-upJunio C Hamano Fri, 12 Feb 2010 23:39:03 +0000 (15:39 -0800)

Re-fix check-ref-format documentation mark-up

It is not double-backslash we forbid; backslashes are forbidden since
a4c2e699 (Disallow '\' in ref names, 2009-05-08)

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

git-imap-send: Convert LF to CRLF before storing patch... Hitoshi Mitake Fri, 12 Feb 2010 11:36:12 +0000 (20:36 +0900)

git-imap-send: Convert LF to CRLF before storing patch to draft box

When storing a message over IMAP (RFC 3501 6.3.11), the message should be
in the format of an RFC 2822 message; most notably, CRLF must be used as
a line terminator.

Convert "\n" line endings in the payload to CRLF before feeding it to
IMAP APPEND command.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: Fix error message for --prune-empty... Jacob Helwig Fri, 12 Feb 2010 02:46:22 +0000 (18:46 -0800)

filter-branch: Fix error message for --prune-empty --commit-filter

Running filter-branch with --prune-empty and --commit-filter reports:

"Cannot set --prune-empty and --filter-commit at the same time".

Change it to use the correct option name: --commit-filter

Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.6.6.2 v1.6.6.2Junio C Hamano Wed, 10 Feb 2010 21:44:11 +0000 (13:44 -0800)

Git 1.6.6.2

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

Merge branch 'maint-1.6.5' into maintJunio C Hamano Wed, 10 Feb 2010 21:42:48 +0000 (13:42 -0800)

Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
t8003: check exit code of command and error message separately

t8003: check exit code of command and error message... Junio C Hamano Tue, 9 Feb 2010 18:06:33 +0000 (10:06 -0800)

t8003: check exit code of command and error message separately

Shell reports exit status only from the most downstream command
in a pipeline. In these tests, we want to make sure that the
command fails in a controlled way, and produces a correct error
message.

This issue was known by Jay who submitted the patch, and also was
pointed out by Hannes during the review process, but I forgot to
fix it up before applying. Sorry about that.

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

Merge branch 'sp/maint-fast-import-large-blob' into... Junio C Hamano Wed, 10 Feb 2010 21:32:20 +0000 (13:32 -0800)

Merge branch 'sp/maint-fast-import-large-blob' into maint

* sp/maint-fast-import-large-blob:
fast-import: Stream very large blobs directly to pack

Merge branch 'gp/maint-cvsserver' into maintJunio C Hamano Wed, 10 Feb 2010 21:02:52 +0000 (13:02 -0800)

Merge branch 'gp/maint-cvsserver' into maint

* gp/maint-cvsserver:
git-cvsserver: allow regex metacharacters in CVSROOT

Merge branch 'jc/maint-reflog-bad-timestamp' into maintJunio C Hamano Wed, 10 Feb 2010 21:02:43 +0000 (13:02 -0800)

Merge branch 'jc/maint-reflog-bad-timestamp' into maint

* jc/maint-reflog-bad-timestamp:
t0101: use a fixed timestamp when searching in the reflog
Update @{bogus.timestamp} fix not to die()
approxidate_careful() reports errorneous date string

Merge branch 'il/maint-xmallocz' into maintJunio C Hamano Wed, 10 Feb 2010 21:02:16 +0000 (13:02 -0800)

Merge branch 'il/maint-xmallocz' into maint

* il/maint-xmallocz:
Fix integer overflow in unpack_compressed_entry()
Fix integer overflow in unpack_sha1_rest()
Fix integer overflow in patch_delta()
Add xmallocz()

Merge branch 'jh/maint-config-file-prefix' into maintJunio C Hamano Wed, 10 Feb 2010 21:02:05 +0000 (13:02 -0800)

Merge branch 'jh/maint-config-file-prefix' into maint

* jh/maint-config-file-prefix:
builtin-config: Fix crash when using "-f <relative path>" from non-root dir

Merge branch 'nd/include-termios-for-osol' into maintJunio C Hamano Wed, 10 Feb 2010 21:01:55 +0000 (13:01 -0800)

Merge branch 'nd/include-termios-for-osol' into maint

* nd/include-termios-for-osol:
Add missing #include to support TIOCGWINSZ on Solaris

Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge... Junio C Hamano Wed, 10 Feb 2010 20:54:15 +0000 (12:54 -0800)

Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge' into maint

* jc/maint-1.6.1-checkout-m-custom-merge:
checkout -m path: fix recreating conflicts

Conflicts:
t/t7201-co.sh

Merge branch 'rs/maint-archive-match-pathspec' into... Junio C Hamano Wed, 10 Feb 2010 20:52:39 +0000 (12:52 -0800)

Merge branch 'rs/maint-archive-match-pathspec' into maint

* rs/maint-archive-match-pathspec:
archive: complain about path specs that don't match anything

check-ref-format documentation: fix enumeration mark-upJunio C Hamano Wed, 10 Feb 2010 18:18:55 +0000 (10:18 -0800)

check-ref-format documentation: fix enumeration mark-up

The last item in the enumerated refname rule was mistakenly made into
a sub-item of the 7th one. It should be the 8th one in the list on its
own.

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

Merge branch 'maint-1.6.5' into maintJunio C Hamano Tue, 9 Feb 2010 05:53:54 +0000 (21:53 -0800)

Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
blame: prevent a segv when -L given start > EOF

blame: prevent a segv when -L given start > EOFJay Soffian Tue, 9 Feb 2010 03:48:13 +0000 (22:48 -0500)

blame: prevent a segv when -L given start > EOF

blame would segv if given -L <lineno> with <lineno> past the end of the file.
While we're fixing the bug, add test cases for an invalid <start> when called
as -L <start>,<end> or -L<start>.

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

Merge branch 'jc/maint-push-doc-status' into maintJunio C Hamano Tue, 9 Feb 2010 00:49:22 +0000 (16:49 -0800)

Merge branch 'jc/maint-push-doc-status' into maint

* jc/maint-push-doc-status:
git-push: document all the status flags used in the output

git-push: document all the status flags used in the... Junio C Hamano Tue, 9 Feb 2010 00:45:21 +0000 (16:45 -0800)

git-push: document all the status flags used in the output

We didn't talk about '-' (deletion), '*' (addition), nor '+' (forced).

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

Merge branch 'jc/maint-imap-config-parse' into maintJunio C Hamano Mon, 8 Feb 2010 23:09:19 +0000 (15:09 -0800)

Merge branch 'jc/maint-imap-config-parse' into maint

* jc/maint-imap-config-parse:
Fix parsing of imap.preformattedHTML and imap.sslverify

Fix parsing of imap.preformattedHTML and imap.sslverifyJunio C Hamano Sat, 6 Feb 2010 19:26:35 +0000 (11:26 -0800)

Fix parsing of imap.preformattedHTML and imap.sslverify

These two variables are boolean and can lack "= value" in the
configuration file. Do not reject such input early in the
parser callback function.

Also the key are downcased before being given to the callback,
so we should run strcmp() with keyword spelled in all-lowercase.

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

Merge branch 'jc/maint-doc-git-add-example' into maintJunio C Hamano Mon, 8 Feb 2010 20:13:56 +0000 (12:13 -0800)

Merge branch 'jc/maint-doc-git-add-example' into maint

* jc/maint-doc-git-add-example:
git-add documentation: Fix shell quoting example

git-add documentation: Fix shell quoting exampleJunio C Hamano Mon, 8 Feb 2010 20:12:41 +0000 (12:12 -0800)

git-add documentation: Fix shell quoting example

When 921177f (Documentation: improve "add", "pull" and "format-patch"
examples, 2008-05-07) converted this from enumeration header to displayed
text, it failed to adjust for the AsciiDoc's rule to quote backslashes.
In displayed text, backslash is shown verbatim, while in enumeration
header, we need to double it.

We have a similar construct in git-rm.txt documentation, and need to be
careful when somebody wants to update it to match the style of the "git
add" example.

Noticed by: Greg Bacon <gbacon@dbresearch.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

archive: simplify archive format guessingRené Scharfe Sun, 7 Feb 2010 23:30:20 +0000 (00:30 +0100)

archive: simplify archive format guessing

The code to guess an output archive's format consumed any --format
options and built a new one. Jonathan noticed that it does so in an
unsafe way, risking to overflow the static buffer fmt_opt.

Change the code to keep the existing --format options intact and to only
add a new one if a format could be guessed based on the output file name.
The new option is added as the first one, allowing the existing ones to
overrule it, i.e. explicit --format options given on the command line win
over format guesses, as before.

To simplify the code further, format_from_name() is changed to return the
full --format option, thus no potentially dangerous sprintf() calls are
needed any more.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update git fsck --full short description to mention... Wesley J. Landaker Fri, 5 Feb 2010 19:58:50 +0000 (12:58 -0700)

Update git fsck --full short description to mention packs

The '--full' option to git fsck does two things:

1) Check objects in packs
2) Check alternate objects

This is documented in the git fsck manual; this patch reflects that in
the short git fsck option help message as well.

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

Merge branch 'jc/maint-limit-note-output' into maintJunio C Hamano Fri, 5 Feb 2010 18:59:05 +0000 (10:59 -0800)

Merge branch 'jc/maint-limit-note-output' into maint

* jc/maint-limit-note-output:
Fix "log --oneline" not to show notes
Fix "log" family not to be too agressive about showing notes

fast-import: Stream very large blobs directly to packShawn O. Pearce Mon, 1 Feb 2010 17:27:35 +0000 (09:27 -0800)

fast-import: Stream very large blobs directly to pack

If a blob is larger than the configured big-file-threshold, instead
of reading it into a single buffer obtained from malloc, stream it
onto the end of the current pack file. Streaming the larger objects
into the pack avoids the 4+ GiB memory footprint that occurs when
fast-import is processing 2+ GiB blobs.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'sb/maint-octopus' into maint-1.6.5Junio C Hamano Mon, 1 Feb 2010 08:06:11 +0000 (00:06 -0800)

Merge branch 'sb/maint-octopus' into maint-1.6.5

* sb/maint-octopus:
octopus: remove dead code
octopus: reenable fast-forward merges
octopus: make merge process simpler to follow

Merge branch 'bg/maint-add-all-doc' into maint-1.6.5Junio C Hamano Mon, 1 Feb 2010 08:04:12 +0000 (00:04 -0800)

Merge branch 'bg/maint-add-all-doc' into maint-1.6.5

* bg/maint-add-all-doc:
git-rm doc: Describe how to sync index & work tree
git-add/rm doc: Consistently back-quote
Documentation: 'git add -A' can remove files

Merge branch 'maint-1.6.5' into maintJunio C Hamano Sat, 30 Jan 2010 07:36:13 +0000 (23:36 -0800)

Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
fix memcpy of overlapping area

fix memcpy of overlapping areaJeff King Fri, 29 Jan 2010 10:28:44 +0000 (05:28 -0500)

fix memcpy of overlapping area

Caught by valgrind in t5500, but it is pretty obvious from
reading the code that this is shifting elements of an array
to the left, which needs memmove.

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

bash: don't offer remote transport helpers as subcommandsSZEDER Gábor Fri, 22 Jan 2010 10:54:51 +0000 (11:54 +0100)

bash: don't offer remote transport helpers as subcommands

Since commits a2d725b7 (Use an external program to implement fetching
with curl, 2009-08-05) and c9e388bb (Make the
"traditionally-supported" URLs a special case, 2009-09-03) remote
transport helpers like 'remote-ftp' and 'remote-curl' are offered by the
completion script as available subcommands. Not good, since they are
helpers, therefore should not be offered, so filter them out.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t0101: use a fixed timestamp when searching in the... Junio C Hamano Wed, 27 Jan 2010 18:54:22 +0000 (10:54 -0800)

t0101: use a fixed timestamp when searching in the reflog

That will give us a better reproducibility during tests.

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

Update @{bogus.timestamp} fix not to die()Junio C Hamano Wed, 27 Jan 2010 18:53:09 +0000 (10:53 -0800)

Update @{bogus.timestamp} fix not to die()

The caller will say "It is not a valid object name" if it wants to, and
some callers may even try to see if it names an object and otherwise try to
see if it is a path.

Pointed out by Jeff King.

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

approxidate_careful() reports errorneous date stringJunio C Hamano Tue, 26 Jan 2010 19:58:00 +0000 (11:58 -0800)

approxidate_careful() reports errorneous date string

For a long time, the time based reflog syntax (e.g. master@{yesterday})
didn't complain when the "human readable" timestamp was misspelled, as
the underlying mechanism tried to be as lenient as possible. The funny
thing was that parsing of "@{now}" even relied on the fact that anything
not recognized by the machinery returned the current timestamp.

Introduce approxidate_careful() that takes an optional pointer to an
integer, that gets assigned 1 when the input does not make sense as a
timestamp.

As I am too lazy to fix all the callers that use approxidate(), most of
the callers do not take advantage of the error checking, but convert the
code to parse reflog to use it as a demonstration.

Tests are mostly from Jeff King.

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

Fix integer overflow in unpack_compressed_entry()Ilari Liusvaara Tue, 26 Jan 2010 18:24:15 +0000 (20:24 +0200)

Fix integer overflow in unpack_compressed_entry()

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix integer overflow in unpack_sha1_rest()Ilari Liusvaara Tue, 26 Jan 2010 18:24:14 +0000 (20:24 +0200)

Fix integer overflow in unpack_sha1_rest()

[jc: later NUL termination by the caller becomes unnecessary]

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix integer overflow in patch_delta()Ilari Liusvaara Tue, 26 Jan 2010 18:24:13 +0000 (20:24 +0200)

Fix integer overflow in patch_delta()

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add xmallocz()Ilari Liusvaara Tue, 26 Jan 2010 18:24:12 +0000 (20:24 +0200)

Add xmallocz()

Add routine for allocating NUL-terminated memory block without risking
integer overflow in addition of +1 for NUL byte.

[jc: with suggestion from Bill Lear]

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cvsserver: allow regex metacharacters in CVSROOTGerrit Pape Tue, 26 Jan 2010 14:47:16 +0000 (14:47 +0000)

git-cvsserver: allow regex metacharacters in CVSROOT

When run in a repository with a path name containing regex metacharacters
(e.g. +), git-cvsserver failed to split the client request into CVSROOT
and module. Now metacharacters are disabled for the value of CVSROOT in
the perl regex so that directory names containing metacharacters are
handled properly.

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

builtin-config: Fix crash when using "-f <relative... Johan Herland Tue, 26 Jan 2010 15:02:16 +0000 (16:02 +0100)

builtin-config: Fix crash when using "-f <relative path>" from non-root dir

When your current directory is not at the root of the working tree, and you
use the "-f" option with a relative path, the current code tries to read
from a wrong file, since argv[2] is now beyond the end of the rearranged
argument list.

This patch replaces the incorrect argv[2] with the variable holding the
given config file name.

The bug was introduced by d64ec16 (git config: reorganize to use parseopt).

[jc: added test]

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

Merge branch 'maint' of git://git.spearce.org/git-gui... Junio C Hamano Sun, 24 Jan 2010 19:16:26 +0000 (11:16 -0800)

Merge branch 'maint' of git://git.spearce.org/git-gui into maint

* 'maint' of git://git.spearce.org/git-gui:
git-gui: work from the .git dir
git-gui: Fix applying a line when all following lines are deletions
git-gui: Correct file_states when unstaging partly staged entry
git-gui: Fix gitk for branch whose name matches local file
git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync
git-gui: handle really long error messages in updateindex.
git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"
git-gui: Makefile: consolidate .FORCE-* targets

git-gui: work from the .git dirGiuseppe Bilotta Sat, 23 Jan 2010 10:03:36 +0000 (11:03 +0100)

git-gui: work from the .git dir

When git-gui is run from a .git dir, _gitdir would be set to "." by
rev-parse, something that confuses the worktree detection.

Fix by expanding the value of _gitdir to pwd in this special case.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Fix applying a line when all following lines... Jeff Epler Tue, 8 Dec 2009 00:22:42 +0000 (18:22 -0600)

git-gui: Fix applying a line when all following lines are deletions

If a diff looked like:

@@
context
-del1
-del2

and you wanted to stage the deletion 'del1', the generated patch
wouldn't apply because it was missing the line 'del2' converted to
context, but this line was counted in the @@-line

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Correct file_states when unstaging partly... Jens Lehmann Mon, 7 Dec 2009 20:35:59 +0000 (21:35 +0100)

git-gui: Correct file_states when unstaging partly staged entry

When unstaging a partly staged file or submodule, the file_states
list was not updated properly (unless unstaged linewise). Its
index_info part did not contain the former head_info as it should
have but kept its old value.

This seems not to have had any bad effects but diminishes the value
of the file_states list for future enhancements.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Fix gitk for branch whose name matches local... Peter Krefting Thu, 21 Jan 2010 12:15:17 +0000 (13:15 +0100)

git-gui: Fix gitk for branch whose name matches local file

When trying to run gitk on a branch name whose name matches a local
file, it will toss an error saying that the name is ambiguous. Adding
a pair of dashes will make gitk parse the options to the left of
it as branch names. Since wish eats the first pair of dashes we
throw at it, we need to add a second one to ensure they get through.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Keep repo_config(gui.recentrepos) and .gitconf... Christopher Beelby Sat, 23 Jan 2010 22:37:17 +0000 (14:37 -0800)

git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync

When the number of recent repo's gets to ten there can be a
situation where an item is removed from the .gitconfig file via
a call to git config --unset, but the internal representation of
that file (repo_config(gui.recentrepo)) is not updated. Then a
subsequent attempt to remove an item from the list fails because
git-gui attempts to call --unset on a value that has already
been removed. This leads to duplicates in the .gitconfig file,
which then also cause errors if the git-gui tries to --unset them
(rather than using --unset-all. --unset-all is not used because it
is not expected that duplicates should ever be allowed to exist.)

When loading the list of recent repositories (proc _get_recentrepos)
if a repo in the list is not considered a valid git reposoitory
then we should go ahead and remove it so it doesn't take up a slot
in the list (since we limit to 10 items). This will prevent a bunch
of invalid entries in the list (which are not shown) from making
valid entries dissapear off the list even when there are less than
ten valid entries.

See: http://code.google.com/p/msysgit/issues/detail?id=362
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: handle really long error messages in updateindex.Pat Thoyts Sun, 20 Dec 2009 02:02:03 +0000 (02:02 +0000)

git-gui: handle really long error messages in updateindex.

As reported to msysGit (bug #340) it is possible to get some very
long error messages when updating the index. The use of a label to
display this prevents scrolling the output. This patch replaces the
label with a scrollable text widget configured to look like a label.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

ignore duplicated slashes in make_relative_path()Junio C Hamano Fri, 22 Jan 2010 03:05:19 +0000 (19:05 -0800)

ignore duplicated slashes in make_relative_path()

The function takes two paths, an early part of abs is supposed to match
base; otherwise abs is not a path under base and the function returns the
full path of abs. The caller can easily confuse the implementation by
giving duplicated and needless slashes in these path arguments.

Credit for test script, motivation and initial patch goes to Thomas Rast.
A follow-up fix (squashed) is by Hannes.

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

merge-recursive: do not return NULL only to cause segfaultJunio C Hamano Fri, 22 Jan 2010 00:38:56 +0000 (16:38 -0800)

merge-recursive: do not return NULL only to cause segfault

merge-recursive calls write_tree_from_memory() to come up with a virtual
tree, with possible conflict markers inside the blob contents, while
merging multiple common ancestors down. It is a bug to call the function
with unmerged entries in the index, even if the merge to come up with the
common ancestor resulted in conflicts. Otherwise the result won't be
expressible as a tree object.

We _might_ want to suggest the user to set GIT_MERGE_VERBOSITY to 5 and
re-run the merge in the message. At least we will know which part of
process_renames() or process_entry() functions is not correctly handling
the unmerged paths, and it might help us diagnosing the issue.

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

retry request without query when info/refs?query failsTay Ray Chuan Thu, 21 Jan 2010 14:41:00 +0000 (22:41 +0800)

retry request without query when info/refs?query fails

When "info/refs" is a static file and not behind a CGI handler, some
servers may not handle a GET request for it with a query string
appended (eg. "?foo=bar") properly.

If such a request fails, retry it sans the query string. In addition,
ensure that the "smart" http protocol is not used (a service has to be
specified with "?service=<service name>" to be conformant).

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Reported-and-tested-by: Yaroslav Halchenko <debian@onerussian.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix "log --oneline" not to show notesJunio C Hamano Thu, 21 Jan 2010 22:57:41 +0000 (14:57 -0800)

Fix "log --oneline" not to show notes

This option should be treated pretty much the same as --format="%h %s".

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

Merge branch 'jc/maint-refresh-index-is-optional-for... Junio C Hamano Thu, 21 Jan 2010 04:25:11 +0000 (20:25 -0800)

Merge branch 'jc/maint-refresh-index-is-optional-for-status' into maint

* jc/maint-refresh-index-is-optional-for-status:
status: don't require the repository to be writable

Fix "log" family not to be too agressive about showing... Junio C Hamano Wed, 20 Jan 2010 21:59:36 +0000 (13:59 -0800)

Fix "log" family not to be too agressive about showing notes

Giving "Notes" information in the default output format of "log" and
"show" is a sensible progress (the user has asked for it by having the
notes), but for some commands (e.g. "format-patch") spewing notes into the
formatted commit log message without being asked is too aggressive.

Enable notes output only for "log", "show", "whatchanged" by default and
only when the user didn't ask any specific --pretty/--format from the
command line; users can explicitly override this default with --show-notes
and --no-notes option.

Parts of tests are taken from Jeff King's fix.

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

Git 1.6.6.1 v1.6.6.1Junio C Hamano Wed, 20 Jan 2010 21:29:21 +0000 (13:29 -0800)

Git 1.6.6.1

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

Merge branch 'bg/maint-remote-update-default' into... Junio C Hamano Wed, 20 Jan 2010 21:23:59 +0000 (13:23 -0800)

Merge branch 'bg/maint-remote-update-default' into maint

* bg/maint-remote-update-default:
Fix "git remote update" with remotes.defalt set

Merge branch 'sb/maint-octopus' into maintJunio C Hamano Wed, 20 Jan 2010 21:02:24 +0000 (13:02 -0800)

Merge branch 'sb/maint-octopus' into maint

* sb/maint-octopus:
octopus: remove dead code
octopus: reenable fast-forward merges
octopus: make merge process simpler to follow

Conflicts:
git-merge-octopus.sh

Merge branch 'bg/maint-add-all-doc' into maintJunio C Hamano Wed, 20 Jan 2010 21:01:33 +0000 (13:01 -0800)

Merge branch 'bg/maint-add-all-doc' into maint

* bg/maint-add-all-doc:
git-rm doc: Describe how to sync index & work tree
git-add/rm doc: Consistently back-quote
Documentation: 'git add -A' can remove files

Merge branch 'maint-1.6.5' into maintJunio C Hamano Wed, 20 Jan 2010 21:01:19 +0000 (13:01 -0800)

Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
Git 1.6.5.8
Fix mis-backport of t7002
bash completion: factor submodules into dirty state
reset: unbreak hard resets with GIT_WORK_TREE

Conflicts:
Documentation/git.txt
GIT-VERSION-GEN
RelNotes

Git 1.6.5.8 v1.6.5.8Junio C Hamano Wed, 20 Jan 2010 20:44:59 +0000 (12:44 -0800)

Git 1.6.5.8

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

Merge branch 'jk/maint-1.6.5-reset-hard' into maint... Junio C Hamano Wed, 20 Jan 2010 20:22:58 +0000 (12:22 -0800)

Merge branch 'jk/maint-1.6.5-reset-hard' into maint-1.6.5

* jk/maint-1.6.5-reset-hard:
reset: unbreak hard resets with GIT_WORK_TREE

Merge branch 'tr/maint-1.6.5-bash-prompt-show-submodule... Junio C Hamano Wed, 20 Jan 2010 20:22:54 +0000 (12:22 -0800)

Merge branch 'tr/maint-1.6.5-bash-prompt-show-submodule-changes' into maint-1.6.5

* tr/maint-1.6.5-bash-prompt-show-submodule-changes:
bash completion: factor submodules into dirty state

Merge branch 'dp/maint-1.6.5-fast-import-non-commit... Junio C Hamano Wed, 20 Jan 2010 20:17:24 +0000 (12:17 -0800)

Merge branch 'dp/maint-1.6.5-fast-import-non-commit-tag' into maint-1.6.5

* dp/maint-1.6.5-fast-import-non-commit-tag:
fast-import: tag may point to any object type

Merge branch 'jm/maint-1.6.5-grep-NUL-terminate' into... Junio C Hamano Wed, 20 Jan 2010 20:16:46 +0000 (12:16 -0800)

Merge branch 'jm/maint-1.6.5-grep-NUL-terminate' into maint-1.6.5

* jm/maint-1.6.5-grep-NUL-terminate:
grep: NUL terminate input from a file

status: don't require the repository to be writableJunio C Hamano Wed, 20 Jan 2010 01:10:35 +0000 (17:10 -0800)

status: don't require the repository to be writable

We need to update the index before hooks run when actually making a
commit, but we shouldn't have to write the index when running "status".
If we can, then we have already spent cycles to refresh the index and
it is a waste not to write it out, but it is not a disaster if we cannot
write it out. The main reason the user is running "git status" is to get
the "status", and refreshing the index is a mere side effect that we can
do without.

Discovery and initial attempted fix by Dscho.

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

bisect: fix singular/plural grammar nitDavid Ripton Tue, 19 Jan 2010 15:13:33 +0000 (07:13 -0800)

bisect: fix singular/plural grammar nit

Remove the trailing 's' from "revisions" and "steps" when there is
only one.

Signed-off-by: David Ripton <dripton@ripton.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.4' into maint-1.6.5Junio C Hamano Tue, 19 Jan 2010 05:37:12 +0000 (21:37 -0800)

Merge branch 'maint-1.6.4' into maint-1.6.5

* maint-1.6.4:
Fix mis-backport of t7002
base85: Make the code more obvious instead of explaining the non-obvious
base85: encode_85() does not use the decode table
base85 debug code: Fix length byte calculation
checkout -m: do not try to fall back to --merge from an unborn branch
branch: die explicitly why when calling "git branch [-a|-r] branchname".
textconv: stop leaking file descriptors
commit: --cleanup is a message option
git count-objects: handle packs bigger than 4G
t7102: make the test fail if one of its check fails

Merge branch 'maint-1.6.3' into maint-1.6.4Junio C Hamano Tue, 19 Jan 2010 05:37:06 +0000 (21:37 -0800)

Merge branch 'maint-1.6.3' into maint-1.6.4

* maint-1.6.3:
base85: Make the code more obvious instead of explaining the non-obvious
base85: encode_85() does not use the decode table
base85 debug code: Fix length byte calculation
checkout -m: do not try to fall back to --merge from an unborn branch
branch: die explicitly why when calling "git branch [-a|-r] branchname".
textconv: stop leaking file descriptors
commit: --cleanup is a message option
git count-objects: handle packs bigger than 4G
t7102: make the test fail if one of its check fails

Conflicts:
builtin-commit.c

Merge branch 'maint-1.6.2' into maint-1.6.3Junio C Hamano Tue, 19 Jan 2010 05:29:47 +0000 (21:29 -0800)

Merge branch 'maint-1.6.2' into maint-1.6.3

* maint-1.6.2:
base85: Make the code more obvious instead of explaining the non-obvious
base85: encode_85() does not use the decode table
base85 debug code: Fix length byte calculation
checkout -m: do not try to fall back to --merge from an unborn branch
branch: die explicitly why when calling "git branch [-a|-r] branchname".
textconv: stop leaking file descriptors
commit: --cleanup is a message option
git count-objects: handle packs bigger than 4G
t7102: make the test fail if one of its check fails

Conflicts:
diff.c

Merge commit 'v1.6.4.4-8-g8de6518' into maint-1.6.4Junio C Hamano Tue, 19 Jan 2010 05:18:41 +0000 (21:18 -0800)

Merge commit 'v1.6.4.4-8-g8de6518' into maint-1.6.4

* commit 'v1.6.4.4-8-g8de6518':
Fix mis-backport of t7002

Fix mis-backport of t7002Junio C Hamano Tue, 19 Jan 2010 05:14:41 +0000 (21:14 -0800)

Fix mis-backport of t7002

The original patch that became cfe370c (grep: do not segfault when -f is
used, 2009-10-16), was made against "maint" or newer branch back then, but
the fix addressed the issue that was present as far as in 1.6.4 series.

The maintainer backported the patch to the 1.6.4 maintenance branch, but
failed to notice that the new tests assumed the setup done by the script
in "maint", which did quite a lot more than the same test script in 1.6.4
series, and the output didn't match the expected result.

This should fix it.

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

Update draft release notes to 1.6.6.1Junio C Hamano Tue, 19 Jan 2010 02:16:15 +0000 (18:16 -0800)

Update draft release notes to 1.6.6.1

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

Merge branch 'dp/maint-1.6.5-fast-import-non-commit... Junio C Hamano Tue, 19 Jan 2010 02:15:12 +0000 (18:15 -0800)

Merge branch 'dp/maint-1.6.5-fast-import-non-commit-tag' into maint

* dp/maint-1.6.5-fast-import-non-commit-tag:
fast-import: tag may point to any object type

Merge branch 'jm/maint-1.6.5-grep-NUL-terminate' into... Junio C Hamano Tue, 19 Jan 2010 01:03:34 +0000 (17:03 -0800)

Merge branch 'jm/maint-1.6.5-grep-NUL-terminate' into maint

* jm/maint-1.6.5-grep-NUL-terminate:
grep: NUL terminate input from a file

grep: NUL terminate input from a fileJim Meyering Mon, 18 Jan 2010 21:55:07 +0000 (22:55 +0100)

grep: NUL terminate input from a file

Internally "git grep" runs regexec(3) that expects its input string
to be NUL terminated. When searching inside blob data, read_sha1_file()
automatically gives such a buffer, but builtin-grep.c forgot to put
the NUL at the end, even though it allocated enough space for it.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix uninitialized variable in get_refs_via_rsync().Richard Weinberger Thu, 14 Jan 2010 23:28:59 +0000 (00:28 +0100)

Fix uninitialized variable in get_refs_via_rsync().

This fixes a crash when cloning via rsync://.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>