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

fix git branch -m in presence of cross devices

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

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

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

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

add missing && to submodule-merge testcaseHeiko Voigt Tue, 6 Jul 2010 19:34:31 +0000 (21:34 +0200)

add missing && to submodule-merge testcase

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

test-date: fix sscanf type conversionJeff King Tue, 6 Jul 2010 07:54:33 +0000 (03:54 -0400)

test-date: fix sscanf type conversion

Reading into a time_t isn't portable, since we don't know
the exact type. Instead, use an unsigned long, which is what
show_date wants, anyway.

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

xdiff: optimise for no whitespace difference when ignor... Dylan Reid Tue, 6 Jul 2010 03:11:17 +0000 (23:11 -0400)

xdiff: optimise for no whitespace difference when ignoring whitespace.

In xdl_recmatch, do the memcmp to check if the two lines are equal before
checking if whitespace flags are set. If the lines are identical, then
there is no need to check if they differ only in whitespace.
This makes the common case (there is no whitespace difference) faster.
It costs the case where lines are the same length and contain
whitespace differences, but the common case is more than 20% faster.

Signed-off-by: Dylan Reid <dgreid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t0006: test timezone parsingJeff King Sun, 4 Jul 2010 10:48:35 +0000 (06:48 -0400)

t0006: test timezone parsing

Previously, test-date simply ignored the parsed timezone and
told show_date() to use UTC. Instead, let's print out what
we actually parsed.

While we're at it, let's make it easy for tests to work in a specific
timezone.

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

rerere.txt: Document forget subcommandMichael J Gruber Mon, 5 Jul 2010 13:15:20 +0000 (15:15 +0200)

rerere.txt: Document forget subcommand

dea4562 (rerere forget path: forget recorded resolution, 2009-12-25)
introduced the forget subcommand for rerere.

Document it.

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

Documentation/git-gc.txt: add reference to githooksChris Packham Wed, 30 Jun 2010 20:41:27 +0000 (13:41 -0700)

Documentation/git-gc.txt: add reference to githooks

This advertises the existence of the 'pre-auto-gc' hook and adds a cross
reference to where the hook is documented.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.1.1 v1.7.1.1Junio C Hamano Tue, 29 Jun 2010 16:59:56 +0000 (09:59 -0700)

Git 1.7.1.1

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

t/t9001: use egrep when regular expressions are involvedBrandon Casey Mon, 28 Jun 2010 22:46:22 +0000 (17:46 -0500)

t/t9001: use egrep when regular expressions are involved

Supplying backslashed, extended regular expressions to grep is not
portable. Use egrep instead.

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

Update draft release notes to 1.7.1.1Junio C Hamano Tue, 29 Jun 2010 00:42:18 +0000 (17:42 -0700)

Update draft release notes to 1.7.1.1

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

Merge branch 'tr/send-email-8bit' into maintJunio C Hamano Mon, 28 Jun 2010 23:19:03 +0000 (16:19 -0700)

Merge branch 'tr/send-email-8bit' into maint

* tr/send-email-8bit:
send-email: ask about and declare 8bit mails

Merge branch 'pb/maint-perl-errmsg-no-dir' into maintJunio C Hamano Mon, 28 Jun 2010 23:18:58 +0000 (16:18 -0700)

Merge branch 'pb/maint-perl-errmsg-no-dir' into maint

* pb/maint-perl-errmsg-no-dir:
Git.pm: better error message

Merge branch 'js/maint-am-rebase-invalid-author' into... Junio C Hamano Mon, 28 Jun 2010 23:18:43 +0000 (16:18 -0700)

Merge branch 'js/maint-am-rebase-invalid-author' into maint

* js/maint-am-rebase-invalid-author:
am: use get_author_ident_from_commit instead of mailinfo when rebasing

Merge branch 'jc/maint-simpler-common-prefix' into... Junio C Hamano Mon, 28 Jun 2010 23:18:15 +0000 (16:18 -0700)

Merge branch 'jc/maint-simpler-common-prefix' into maint

* jc/maint-simpler-common-prefix:
common_prefix: simplify and fix scanning for prefixes

Merge branch 'bd/maint-unpack-trees-parawalk-fix' into... Junio C Hamano Mon, 28 Jun 2010 23:18:02 +0000 (16:18 -0700)

Merge branch 'bd/maint-unpack-trees-parawalk-fix' into maint

* bd/maint-unpack-trees-parawalk-fix:
unpack-trees: Make index lookahead less pessimal

notes: Initialise variable to appease gccRamsay Jones Mon, 21 Jun 2010 18:52:29 +0000 (19:52 +0100)

notes: Initialise variable to appease gcc

gcc version 3.4.4 thinks that the 'cmp' variable could be used
while uninitialised and complains thus:

notes.c: In function `write_each_non_note_until':
notes.c:719: warning: 'cmp' might be used uninitialized in \
this function

Note that gcc versions 4.1.2 and 4.4.0 do not issue this warning.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes: check number of parameters to "git notes copy"Jeff King Mon, 28 Jun 2010 08:59:07 +0000 (04:59 -0400)

notes: check number of parameters to "git notes copy"

Otherwise we may segfault with too few parameters.

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

msvc: Fix some compiler warningsRamsay Jones Wed, 23 Jun 2010 19:47:50 +0000 (20:47 +0100)

msvc: Fix some compiler warnings

In particular, using the normal (or production) compiler
warning level (-W3), msvc complains as follows:

.../sha1.c(244) : warning C4018: '<' : signed/unsigned mismatch
.../sha1.c(270) : warning C4244: 'function' : conversion from \
'unsigned __int64' to 'unsigned long', possible loss of data
.../sha1.c(271) : warning C4244: 'function' : conversion from \
'unsigned __int64' to 'unsigned long', possible loss of data

Note that gcc issues a similar complaint about line 244 when
compiling with -Wextra.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: grep: fix asciidoc problem with --Christian Couder Fri, 25 Jun 2010 02:16:24 +0000 (04:16 +0200)

Documentation: grep: fix asciidoc problem with --

Asciidoc interprets two dashes separated by spaces as a single big
dash. So let's escape the first dash, so that "\--" will properly
appear as "--".

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

msvc: Fix some "expr evaluates to function" compiler... Ramsay Jones Wed, 23 Jun 2010 19:40:19 +0000 (20:40 +0100)

msvc: Fix some "expr evaluates to function" compiler warnings

In particular, the following warning is issued while compiling
notes.c:

notes.c(927) : warning C4550: expression evaluates to a \
function which is missing an argument list

along with identical warnings on lines 928, 1016 and 1017.

In order to suppress the warning, we change the definition of
combine_notes_fn, so that the symbol type is an (explicit)
"pointer to function ...". As a result, several other
declarations need some minor fix-up to take account of the
new typedef.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.1.1Junio C Hamano Tue, 22 Jun 2010 16:18:55 +0000 (09:18 -0700)

Update draft release notes to 1.7.1.1

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

Merge branch 'ic/maint-rebase-i-abort' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)

Merge branch 'ic/maint-rebase-i-abort' into maint

* ic/maint-rebase-i-abort:
rebase -i: Abort cleanly if new base cannot be checked out

Merge branch 'cc/maint-commit-reflog-msg' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)

Merge branch 'cc/maint-commit-reflog-msg' into maint

* cc/maint-commit-reflog-msg:
commit: use value of GIT_REFLOG_ACTION env variable as reflog message

Merge branch 'jk/maint-advice-empty-amend' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)

Merge branch 'jk/maint-advice-empty-amend' into maint

* jk/maint-advice-empty-amend:
commit: give advice on empty amend

Merge branch 'tc/commit-abbrev-fix' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)

Merge branch 'tc/commit-abbrev-fix' into maint

* tc/commit-abbrev-fix:
commit::print_summary(): don't use format_commit_message()
t7502-commit: add summary output tests for empty and merge commits
t7502-commit: add tests for summary output

Merge branch 'jn/document-rebase-i-p-limitation' into... Junio C Hamano Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)

Merge branch 'jn/document-rebase-i-p-limitation' into maint

* jn/document-rebase-i-p-limitation:
rebase -i -p: document shortcomings

Merge branch 'jn/checkout-doc' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)

Merge branch 'jn/checkout-doc' into maint

* jn/checkout-doc:
Documentation/checkout: clarify description
Documentation/checkout: clarify description

Merge branch 'cc/maint-diff-CC-binary' into maintJunio C Hamano Tue, 22 Jun 2010 16:04:14 +0000 (09:04 -0700)

Merge branch 'cc/maint-diff-CC-binary' into maint

* cc/maint-diff-CC-binary:
diff: fix "git show -C -C" output when renaming a binary file

Conflicts:
diff.c

Merge branch 'jc/t9129-any-utf8' into maintJunio C Hamano Tue, 22 Jun 2010 15:31:53 +0000 (08:31 -0700)

Merge branch 'jc/t9129-any-utf8' into maint

* jc/t9129-any-utf8:
t9129: fix UTF-8 locale detection

Merge branch 'cb/ls-files-cdup' into maintJunio C Hamano Tue, 22 Jun 2010 15:31:46 +0000 (08:31 -0700)

Merge branch 'cb/ls-files-cdup' into maint

* cb/ls-files-cdup:
ls-files: allow relative pathspec
quote.c: separate quoting and relative path generation

Merge branch 'tc/merge-m-log' into maintJunio C Hamano Tue, 22 Jun 2010 15:31:25 +0000 (08:31 -0700)

Merge branch 'tc/merge-m-log' into maint

* tc/merge-m-log:
merge: --log appends shortlog to message if specified
fmt-merge-msg: add function to append shortlog only
fmt-merge-msg: refactor merge title formatting
fmt-merge-msg: minor refactor of fmt_merge_msg()
merge: rename variable
merge: update comment
t7604-merge-custom-message: show that --log doesn't append to -m
t7604-merge-custom-message: shift expected output creation

Merge branch 'ph/clone-message-reword' into maintJunio C Hamano Tue, 22 Jun 2010 15:31:20 +0000 (08:31 -0700)

Merge branch 'ph/clone-message-reword' into maint

* ph/clone-message-reword:
clone: reword messages to match the end-user perception

Merge branch 'jn/maint-amend-missing-name' into maintJunio C Hamano Tue, 22 Jun 2010 15:30:44 +0000 (08:30 -0700)

Merge branch 'jn/maint-amend-missing-name' into maint

* jn/maint-amend-missing-name:
commit --amend: cope with missing display name

Merge branch 'pc/remove-warn' into maintJunio C Hamano Tue, 22 Jun 2010 15:30:38 +0000 (08:30 -0700)

Merge branch 'pc/remove-warn' into maint

* pc/remove-warn:
Remove a redundant errno test in a usage of remove_path
Introduce remove_or_warn function
Implement the rmdir_or_warn function
Generalise the unlink_or_warn function

tests: remove unnecessary '^' from 'expr' regular expre... Junio C Hamano Mon, 21 Jun 2010 18:18:54 +0000 (11:18 -0700)

tests: remove unnecessary '^' from 'expr' regular expression

As Brandon noticed, a regular expression match given to 'expr' is already
anchored at the beginning. Some versions of expr even complain about this.

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

Update draft release notes to 1.7.1.1Junio C Hamano Mon, 21 Jun 2010 12:48:18 +0000 (05:48 -0700)

Update draft release notes to 1.7.1.1

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

Merge branch 'mc/maint-zoneparse' into maintJunio C Hamano Mon, 21 Jun 2010 12:41:03 +0000 (05:41 -0700)

Merge branch 'mc/maint-zoneparse' into maint

* mc/maint-zoneparse:
Add "Z" as an alias for the timezone "UTC"

Merge branch 'jk/diff-m-doc' into maintJunio C Hamano Mon, 21 Jun 2010 12:40:57 +0000 (05:40 -0700)

Merge branch 'jk/diff-m-doc' into maint

* jk/diff-m-doc:
docs: clarify meaning of -M for git-log

Merge branch 'jn/maint-doc-ignore' into maintJunio C Hamano Mon, 21 Jun 2010 12:40:53 +0000 (05:40 -0700)

Merge branch 'jn/maint-doc-ignore' into maint

* jn/maint-doc-ignore:
gitignore.5: Clarify matching rules

Merge branch 'bs/userdiff-php' into maintJunio C Hamano Mon, 21 Jun 2010 12:40:48 +0000 (05:40 -0700)

Merge branch 'bs/userdiff-php' into maint

* bs/userdiff-php:
diff: Support visibility modifiers in the PHP hunk header regexp

Merge branch 'jk/maint-sha1-file-name-fix' into maintJunio C Hamano Mon, 21 Jun 2010 12:40:41 +0000 (05:40 -0700)

Merge branch 'jk/maint-sha1-file-name-fix' into maint

* jk/maint-sha1-file-name-fix:
remove over-eager caching in sha1_file_name

Merge branch 'jk/maint-pull-dry-run-noop' into maintJunio C Hamano Mon, 21 Jun 2010 12:40:33 +0000 (05:40 -0700)

Merge branch 'jk/maint-pull-dry-run-noop' into maint

* jk/maint-pull-dry-run-noop:
pull: do nothing on --dry-run

Merge branch 'bw/diff-metainfo-color' into maintJunio C Hamano Mon, 21 Jun 2010 12:40:10 +0000 (05:40 -0700)

Merge branch 'bw/diff-metainfo-color' into maint

* bw/diff-metainfo-color:
diff: fix coloring of extended diff headers

Merge branch 'cb/assume-unchanged-fix' into maintJunio C Hamano Mon, 21 Jun 2010 12:39:23 +0000 (05:39 -0700)

Merge branch 'cb/assume-unchanged-fix' into maint

* cb/assume-unchanged-fix:
Documentation: git-add does not update files marked "assume unchanged"
do not overwrite files marked "assume unchanged"

Merge branch 'jn/notes-doc' into maintJunio C Hamano Mon, 21 Jun 2010 12:39:16 +0000 (05:39 -0700)

Merge branch 'jn/notes-doc' into maint

* jn/notes-doc:
Documentation/notes: nitpicks
Documentation/notes: clean up description of rewriting configuration
Documentation/notes: simplify treatment of default display refs
Documentation/log: add a CONFIGURATION section
Documentation/notes: simplify treatment of default notes ref
Documentation/notes: add configuration section
Documentation/notes: describe content of notes blobs
Documentation/notes: document format of notes trees

Merge branch 'ab/test-cleanup' into maintJunio C Hamano Mon, 21 Jun 2010 12:39:02 +0000 (05:39 -0700)

Merge branch 'ab/test-cleanup' into maint

* ab/test-cleanup:
Turn setup code in t2007-checkout-symlink.sh into a test
Move t6000lib.sh to lib-*

Merge branch 'rs/diff-no-minimal' into maintJunio C Hamano Mon, 21 Jun 2010 12:38:50 +0000 (05:38 -0700)

Merge branch 'rs/diff-no-minimal' into maint

* rs/diff-no-minimal:
git diff too slow for a file

Merge branch 'bg/apply-blank-trailing-context' into... Junio C Hamano Mon, 21 Jun 2010 12:38:36 +0000 (05:38 -0700)

Merge branch 'bg/apply-blank-trailing-context' into maint

* bg/apply-blank-trailing-context:
apply: Allow blank *trailing* context lines to match beyond EOF

gitweb/Makefile: fix typo in gitweb.min.css ruleJay Soffian Fri, 18 Jun 2010 21:01:25 +0000 (17:01 -0400)

gitweb/Makefile: fix typo in gitweb.min.css rule

This typo has been in place since the rule was originally added by
0e6ce21 (Gitweb: add support for minifying gitweb.css).

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

Git.pm: better error messagePhilippe Bruhat (BooK) Thu, 17 Jun 2010 23:47:31 +0000 (01:47 +0200)

Git.pm: better error message

Provide the bad directory name alongside with $!

Note: $! is set if there is "No such file or directory",
but isn't set if the file exists but is not a directory.

Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: ask about and declare 8bit mailsThomas Rast Thu, 17 Jun 2010 20:10:39 +0000 (22:10 +0200)

send-email: ask about and declare 8bit mails

git-send-email passes on an 8bit mail as-is even if it does not
declare a content-type. Because the user can edit email between
format-patch and send-email, such invalid mails are unfortunately not
very hard to come by.

Make git-send-email stop and ask about the encoding to use if it
encounters any such mail. Also provide a configuration setting to
permanently configure an encoding.

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

unpack-trees: Make index lookahead less pessimalBrian Downing Fri, 11 Jun 2010 02:59:07 +0000 (21:59 -0500)

unpack-trees: Make index lookahead less pessimal

When traversing trees with an index, the current index pointer
(o->cache_bottom) occasionally has to be temporarily advanced forwards to
match the traversal order of the tree, which is not the same as the sort
order of the index. The existing algorithm that did this (introduced in
730f72840cc50c523fe4cdd796ea2d2fc4571a28) would get "stuck" when the
cache_bottom was popped and then repeatedly check the same index entries
over and over. This represents a serious performance regression for
large repositories compared to the old "broken" traversal order.

This commit makes a simple change to mitigate this. Whenever
find_cache_pos sees that the current pos is also the cache_bottom, and
it has already been unpacked, it advances the cache_bottom as well as
the current pos. This prevents the above "sticking" behavior without
dramatically changing the algorithm.

In addition, this commit moves the unpacked check above the
ce_in_traverse_path() check. The simple bitmask check is cheaper, and
in the case described above will be firing quite a bit to advance the
cache_bottom after a tree pop.

This yields considerable performance improvements for large trees.
The following are the number of function calls for "git diff HEAD" on
the Linux kernel tree, with 33,307 files:

Symbol Calls Before Calls After
------------------- ------------ -----------
unpack_callback 35,332 35,332
find_cache_pos 37,357 37,357
ce_in_traverse_path 4,979,473 37,357
do_compare_entry 6,828,181 251,925
df_name_compare 6,828,181 251,925

And on a repository of 187,456 files:

Symbol Calls Before Calls After
------------------- ------------ -----------
unpack_callback 197,958 197,958
find_cache_pos 208,460 208,460
ce_in_traverse_path 37,308,336 208,460
do_compare_entry 156,950,469 2,690,626
df_name_compare 156,950,469 2,690,626

On the latter repository, user time for "git diff HEAD" was reduced from
5.58 to 0.42 seconds. This is compared to 0.30 seconds before the
traversal order fix was implemented.

Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Prepare draft release notes to 1.7.1.1Junio C Hamano Wed, 16 Jun 2010 23:56:53 +0000 (16:56 -0700)

Prepare draft release notes to 1.7.1.1

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

Merge branch 'cw/maint-exec-defpath' into maintJunio C Hamano Wed, 16 Jun 2010 23:33:47 +0000 (16:33 -0700)

Merge branch 'cw/maint-exec-defpath' into maint

* cw/maint-exec-defpath:
autoconf: Check if <paths.h> exists and set HAVE_PATHS_H
exec_cmd.c: replace hard-coded path list with one from <paths.h>

Merge branch 'sc/http-late-auth' into maintJunio C Hamano Wed, 16 Jun 2010 23:32:15 +0000 (16:32 -0700)

Merge branch 'sc/http-late-auth' into maint

* sc/http-late-auth:
Prompt for a username when an HTTP request 401s

Merge branch 'by/blame-doc-m-c' into maintJunio C Hamano Wed, 16 Jun 2010 23:23:51 +0000 (16:23 -0700)

Merge branch 'by/blame-doc-m-c' into maint

* by/blame-doc-m-c:
blame-options.txt: Add default value for `-M/-C` options.

Merge branch 'cb/maint-stash-orphaned-file' into maintJunio C Hamano Wed, 16 Jun 2010 23:23:48 +0000 (16:23 -0700)

Merge branch 'cb/maint-stash-orphaned-file' into maint

* cb/maint-stash-orphaned-file:
stash tests: stash can lose data in a file removed from the index
stash: Don't overwrite files that have gone from the index

Merge branch 'mg/advice-statushints' into maintJunio C Hamano Wed, 16 Jun 2010 23:23:42 +0000 (16:23 -0700)

Merge branch 'mg/advice-statushints' into maint

* mg/advice-statushints:
wt-status: take advice.statusHints seriously
t7508: test advice.statusHints

Merge branch 'jn/maint-bundle' into maintJunio C Hamano Wed, 16 Jun 2010 23:23:22 +0000 (16:23 -0700)

Merge branch 'jn/maint-bundle' into maint

* jn/maint-bundle:
fix "bundle --stdin" segfault
t5704 (bundle): add tests for bundle --stdin

Merge branch 'rr/doc-submitting' into maintJunio C Hamano Wed, 16 Jun 2010 23:23:14 +0000 (16:23 -0700)

Merge branch 'rr/doc-submitting' into maint

* rr/doc-submitting:
SubmittingPatches: Add new section about what to base work on

Merge branch 'jn/t7006-fixup' into maintJunio C Hamano Wed, 16 Jun 2010 23:22:57 +0000 (16:22 -0700)

Merge branch 'jn/t7006-fixup' into maint

* jn/t7006-fixup:
t7006: guard cleanup with test_expect_success

Merge branch 'jn/shortlog' into maintJunio C Hamano Wed, 16 Jun 2010 23:22:51 +0000 (16:22 -0700)

Merge branch 'jn/shortlog' into maint

* jn/shortlog:
pretty: Respect --abbrev option
shortlog: Document and test --format option
t4201 (shortlog): Test output format with multiple authors
t4201 (shortlog): guard setup with test_expect_success
Documentation/shortlog: scripted users should not rely on implicit HEAD

Merge branch 'np/index-pack-memsave' into maintJunio C Hamano Wed, 16 Jun 2010 23:22:23 +0000 (16:22 -0700)

Merge branch 'np/index-pack-memsave' into maint

* np/index-pack-memsave:
index-pack: smarter memory usage when appending objects
index-pack: rationalize unpack_entry_data()
index-pack: smarter memory usage when resolving deltas

Merge branch 'sp/maint-dumb-http-pack-reidx' into maintJunio C Hamano Wed, 16 Jun 2010 23:21:30 +0000 (16:21 -0700)

Merge branch 'sp/maint-dumb-http-pack-reidx' into maint

* sp/maint-dumb-http-pack-reidx:
http.c::new_http_pack_request: do away with the temp variable filename
http-fetch: Use temporary files for pack-*.idx until verified
http-fetch: Use index-pack rather than verify-pack to check packs
Allow parse_pack_index on temporary files
Extract verify_pack_index for reuse from verify_pack
Introduce close_pack_index to permit replacement
http.c: Remove unnecessary strdup of sha1_to_hex result
http.c: Don't store destination name in request structures
http.c: Drop useless != NULL test in finish_http_pack_request
http.c: Tiny refactoring of finish_http_pack_request
t5550-http-fetch: Use subshell for repository operations
http.c: Remove bad free of static block

Merge branch 'jc/am-3-show-corrupted-patch' into maintJunio C Hamano Wed, 16 Jun 2010 23:21:23 +0000 (16:21 -0700)

Merge branch 'jc/am-3-show-corrupted-patch' into maint

* jc/am-3-show-corrupted-patch:
am -3: recover the diagnostic messages for corrupt patches

Merge branch 'sp/maint-describe-tiebreak-with-tagger... Junio C Hamano Wed, 16 Jun 2010 23:21:15 +0000 (16:21 -0700)

Merge branch 'sp/maint-describe-tiebreak-with-tagger-date' into maint

* sp/maint-describe-tiebreak-with-tagger-date:
describe: Break annotated tag ties by tagger date
tag.c: Parse tagger date (if present)
tag.c: Refactor parse_tag_buffer to be saner to program
tag.h: Remove unused signature field
tag.c: Correct indentation

Merge branch 'np/malloc-threading' into maintJunio C Hamano Wed, 16 Jun 2010 23:21:06 +0000 (16:21 -0700)

Merge branch 'np/malloc-threading' into maint

* np/malloc-threading:
Thread-safe xmalloc and xrealloc needs a recursive mutex
Make xmalloc and xrealloc thread-safe

Merge branch 'bg/send-email-smtpdomain' into maintJunio C Hamano Wed, 16 Jun 2010 23:20:06 +0000 (16:20 -0700)

Merge branch 'bg/send-email-smtpdomain' into maint

* bg/send-email-smtpdomain:
send-email: Cleanup smtp-domain and add config
Document send-email --smtp-domain
send-email: Don't use FQDNs without a '.'
send-email: Cleanup { style

Merge branch 'rc/maint-curl-helper' into maintJunio C Hamano Wed, 16 Jun 2010 23:19:43 +0000 (16:19 -0700)

Merge branch 'rc/maint-curl-helper' into maint

* rc/maint-curl-helper:
remote-curl: ensure that URLs have a trailing slash
http: make end_url_with_slash() public
t5541-http-push: add test for URLs with trailing slash

Conflicts:
remote-curl.c

Merge branch 'hg/maint-attr-fix' into maintJunio C Hamano Wed, 16 Jun 2010 23:17:54 +0000 (16:17 -0700)

Merge branch 'hg/maint-attr-fix' into maint

* hg/maint-attr-fix:
attr: Expand macros immediately when encountered.
attr: Allow multiple changes to an attribute on the same line.
attr: Fixed debug output for macro expansion.

Merge branch 'mh/status-optionally-refresh' into maintJunio C Hamano Wed, 16 Jun 2010 23:16:40 +0000 (16:16 -0700)

Merge branch 'mh/status-optionally-refresh' into maint

* mh/status-optionally-refresh:
t7508: add a test for "git status" in a read-only repository
git status: refresh the index if possible
t7508: add test for "git status" refreshing the index

common_prefix: simplify and fix scanning for prefixesJunio C Hamano Tue, 15 Jun 2010 23:02:03 +0000 (01:02 +0200)

common_prefix: simplify and fix scanning for prefixes

common_prefix() scans backwards from the far end of each 'next'
pathspec, starting from 'len', shortening the 'prefix' using 'path' as
a reference.

However, there is a small opportunity for an out-of-bounds access
because len is unconditionally set to prefix-1 after a "direct match"
test failed. This means that if 'next' is shorter than prefix+2, we
read past it.

Instead of a minimal fix, simplify the loop: scan *forward* over the
'next' entry, remembering the last '/' where it matched the prefix
known so far. This is far easier to read and also has the advantage
that we only scan over each entry once.

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

am: use get_author_ident_from_commit instead of mailinf... Jay Soffian Wed, 16 Jun 2010 07:12:40 +0000 (03:12 -0400)

am: use get_author_ident_from_commit instead of mailinfo when rebasing

In certain situations, commit authorship can consist of an invalid
e-mail address. For example, this is the case when working with git svn
repos where the author email has had the svn repo UUID appended such as:

author@example.com <author@example.com@deadbeef-dead-beef-dead-beefdeadbeef>

Given such an address, mailinfo extracts the authorship incorrectly as
it assumes a valid domain. However, when rebasing the original
authorship should be preserved irrespective of its validity as an email
address.

Using get_author_ident_from_commit instead of mailinfo when rebasing
preserves the original authorship.

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

notes: Initialize variable to appease Sun StudioÆvar Arnfjörð Bjarmason Mon, 14 Jun 2010 23:40:05 +0000 (23:40 +0000)

notes: Initialize variable to appease Sun Studio

Sun Studio 12 Update 1 thinks that *t could be uninitialized,
ostensibly because it doesn't take rewrite_cmd into account in its
static analysis.

builtin/notes.c: In function `notes_copy_from_stdin':
builtin/notes.c:419: warning: 't' might be used uninitialized in this function

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

git-mailinfo documentation: clarify -u/--encodingZhang Le Sun, 13 Jun 2010 18:49:47 +0000 (02:49 +0800)

git-mailinfo documentation: clarify -u/--encoding

Instead of talking about hardcoded UTF-8, describe i18n.commitencoding
and the --encoding option, and state that they default to UTF-8.

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add-interactive: Clarify “remaining hunks in the file”Jonathan Nieder Sun, 13 Jun 2010 03:32:51 +0000 (22:32 -0500)

add-interactive: Clarify “remaining hunks in the file”

The "a" and "d" commands to ‘add --patch’ (accept/reject rest of file)
interact with "j", "g", and "/" (skip some hunks) in a perhaps
confusing way: after accepting or rejecting all _later_ hunks in the
file, they return to the earlier, skipped hunks and prompt the user
about them again.

This behavior can be very useful in practice. One can still accept or
reject _all_ undecided hunks in a file by using the "g" command to
move to hunk #1 first.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: use value of GIT_REFLOG_ACTION env variable... Christian Couder Sat, 12 Jun 2010 16:05:12 +0000 (18:05 +0200)

commit: use value of GIT_REFLOG_ACTION env variable as reflog message

The environment variable GIT_REFLOG_ACTION was used by git-commit.sh,
but when it was converted to a builtin
(f5bbc3225c4b073a7ff3218164a0c820299bc9c6, Port git commit to C,
Nov 8 2007) this was lost.

Let's use it again as it is more user friendly when reverting or
cherry-picking to see "revert" or "cherry-pick" in the reflog rather
than to just see "commit".

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

commit::print_summary(): don't use format_commit_message()Tay Ray Chuan Sat, 12 Jun 2010 14:15:39 +0000 (22:15 +0800)

commit::print_summary(): don't use format_commit_message()

This attempts to fix a regression in git-commit, where non-abbreviated
SHA-1s were printed in the summary.

One possible fix would be to set ctx.abbrev to DEFAULT_ABBREV in the
`if` block, where format_commit_message() is used.

Instead, we do away with the format_commit_message() codeblock
altogether, replacing it with a re-run of log_tree_commit().

We re-run log_tree_commit() with rev.always_show_header set, to force
the invocation of show_log(). The effect of this flag can be seen from
this excerpt from log-tree.c:560, the only area that
rev.always_show_header is checked:

shown = log_tree_diff(opt, commit, &log);
if (!shown && opt->loginfo && opt->always_show_header) {
log.parent = NULL;
show_log(opt);
shown = 1;
}

We also set rev.use_terminator, so that a newline is appended at the end
of the log message. Note that callers in builtin/log.c that also set
rev.always_show_header don't have to set rev.use_terminator, but still
get a newline, because they are wrapped in a pager.

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

t/README: document --root optionThomas Rast Thu, 10 Jun 2010 18:24:46 +0000 (20:24 +0200)

t/README: document --root option

We've had this option since f423ef5 (tests: allow user to specify
trash directory location, 2009-08-09). Make it easier to look up :-)

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

Makefile: default pager on AIX to "more"Jeff King Thu, 10 Jun 2010 08:59:52 +0000 (04:59 -0400)

Makefile: default pager on AIX to "more"

AIX doesn't ship with "less" by default, and their "more" is
more featureful than average, so the latter is a more
sensible choice. People who really want less can set the
compile-time option themselves, or users can set $PAGER.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Tor Arntsen <tor@spacetec.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i: Abort cleanly if new base cannot be checked outIan Ward Comfort Tue, 8 Jun 2010 08:16:11 +0000 (01:16 -0700)

rebase -i: Abort cleanly if new base cannot be checked out

Untracked content in the working tree may prevent rebase -i from checking out
the new base onto which it wants to replay commits, if the new base commit
includes files at those (now untracked) paths. Currently, rebase -i dies
uncleanly in this situation, updating ORIG_HEAD and leaving a useless
.git/rebase-merge directory, with which the user can do nothing useful except
rebase --abort. Make rebase -i abort the procedure itself instead, as
non-interactive rebase already does, and add a test for this behavior.

Signed-off-by: Ian Ward Comfort <icomfort@stanford.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: give advice on empty amendJeff King Mon, 7 Jun 2010 00:41:46 +0000 (20:41 -0400)

commit: give advice on empty amend

We generally disallow empty commits with "git commit". The
output produced by the wt_status functions is generally
sufficient to explain what happened.

With --amend commits, however, things are a little more
confusing. We would create an empty commit not if you
actually have staged changes _now_, but if your staged
changes match HEAD^. In this case, it is not immediately
obvious why "git commit" claims no changes, but "git status"
does not. Furthermore, we should point the user in the
direction of git reset, which would eliminate the empty
commit entirely.

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

Documentation/checkout: clarify descriptionJonathan Nieder Tue, 1 Jun 2010 07:25:23 +0000 (02:25 -0500)

Documentation/checkout: clarify description

git checkout can be used to switch branches and to retrieve files from
the index or an arbitrary tree. Split the description into
subsections corresponding to each mode to make each use easier to
understand.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i -p: document shortcomingsJonathan Nieder Tue, 1 Jun 2010 01:43:35 +0000 (20:43 -0500)

rebase -i -p: document shortcomings

The rebase --preserve-merges facility presents a list of commits
in its instruction sheet and uses a separate table to keep
track of their parents. Unfortunately, in practice this means
that with -p after most attempts to rearrange patches, some
commits have the "wrong" parent and the resulting history is
rarely what the caller expected.

Yes, it would be nice to fix that. But first, add a warning to the
manual to help the uninitiated understand what is going on.

Reported-by: Jiří Paleček <jpalecek@web.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Change C99 comments to old-style C commentsTor Arntsen Fri, 4 Jun 2010 09:32:11 +0000 (11:32 +0200)

Change C99 comments to old-style C comments

Signed-off-by: Tor Arntsen <tor@spacetec.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit.txt: clarify how --author argument is usedJay Soffian Sun, 6 Jun 2010 23:31:34 +0000 (19:31 -0400)

commit.txt: clarify how --author argument is used

commit --author was added by 146ea06 (git commit --author=$name: look $name up
in existing commits), but its documentation was sorely lacking compared to its
excellent commit message. This commit tries to improve the documentation.

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

diff: fix "git show -C -C" output when renaming a binar... Christian Couder Wed, 26 May 2010 02:50:12 +0000 (04:50 +0200)

diff: fix "git show -C -C" output when renaming a binary file

A bug was introduced in 3e97c7c6af2901cec63bf35fcd43ae3472e24af8
(No diff -b/-w output for all-whitespace changes, Nov 19 2009)
that made the lines:

diff --git a/bar b/sub/bar
similarity index 100%
rename from bar
rename to sub/bar

disappear from "git show -C -C" output when file bar is a binary
file.

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

ls-files: allow relative pathspecClemens Buchacher Thu, 3 Jun 2010 13:39:18 +0000 (15:39 +0200)

ls-files: allow relative pathspec

git ls-files used to error out if given paths which point outside the current
working directory, such as '../'. We now allow such paths and the output is
analogous to git grep -l.

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

quote.c: separate quoting and relative path generationClemens Buchacher Thu, 3 Jun 2010 13:36:31 +0000 (15:36 +0200)

quote.c: separate quoting and relative path generation

This is in preparation of relative path support for ls-files, which
quotes a path only if the line terminator is not the NUL character.

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

setup: document prefixClemens Buchacher Sat, 5 Jun 2010 08:04:20 +0000 (10:04 +0200)

setup: document prefix

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

t9129: fix UTF-8 locale detectionJunio C Hamano Wed, 2 Jun 2010 19:15:48 +0000 (12:15 -0700)

t9129: fix UTF-8 locale detection

The UTF-8 prerequisite test checked explicitly for en_US.utf8 in the
output from "locale -a", but the tests that are actually protected by the
prerequisite were asking LC_ALL=en_US.UTF-8 from the system.

This inconsistency leads the tests to fail on platforms that do not know
both en_US.UTF-8 and en_US.utf8 (thanks you, Yann Droneaud, for bringing
this up with an initial patch).

Instead, pick a locale with ".UTF-8" (with or without hyphen, spelled in
either upper or lowercase) in its name from "locale -a" output, and use it
for running the test.

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

git-compat-util.h: use apparently more common __sgi... Gary V. Vaughan Wed, 2 Jun 2010 01:55:36 +0000 (20:55 -0500)

git-compat-util.h: use apparently more common __sgi macro to detect SGI IRIX

IRIX 6.5.26m does not define the 'sgi' macro, but it does define an '__sgi'
macro. Since later IRIX versions (6.5.29m) define both macros, and since
an underscore prefixed macro is preferred anyway, use '__sgi' to detect
compilation on SGI IRIX.

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

Documentation: A...B shortcut for checkout and rebaseMichael J Gruber Tue, 1 Jun 2010 15:16:42 +0000 (17:16 +0200)

Documentation: A...B shortcut for checkout and rebase

Describe the A...B shortcuts for checkout and rebase [-i] which were
introduced in these commits:

619a64e ("checkout A...B" switches to the merge base between A and B, 2009-10-18)
61dfa1b ("rebase --onto A...B" replays history on the merge base between A and B, 2009-11-20)
230a456 (rebase -i: teach --onto A...B syntax, 2010-01-07)

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

Documentation/pretty-{formats,options}: better referenc... Nazri Ramliy Tue, 1 Jun 2010 17:54:46 +0000 (01:54 +0800)

Documentation/pretty-{formats,options}: better reference for "format:<string>"

In "git help log" (and friends) it's not easy to find the possible
placeholder for <string> for the "--pretty=format:<string>" option
to git log.

This patch makes the placeholder easier to find by adding a reference
to the "PRETTY FORMATS" section and repeating the "format:<string>"
phrase.

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

Merge branch 'maint-1.7.0' into maintJunio C Hamano Tue, 1 Jun 2010 01:14:17 +0000 (18:14 -0700)

Merge branch 'maint-1.7.0' into maint

* maint-1.7.0:
Documentation/config: describe status.submodulesummary

gitignore.5: Clarify matching rulesJonathan Nieder Fri, 5 Mar 2010 15:56:39 +0000 (09:56 -0600)

gitignore.5: Clarify matching rules

Patterns containing a / are implicitly anchored to the directory
containing the relevant .gitignore file.

Patterns not containing a / are textual matches against the path
name relative to the directory containing .gitignore.

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

Documentation/SubmittingPatches: Fix typo in GMail... Tim Henigan Wed, 26 May 2010 12:36:10 +0000 (08:36 -0400)

Documentation/SubmittingPatches: Fix typo in GMail section

Commit e498257d introduced a typo while improving the GMail section
of SubmittingPatches.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/checkout: clarify descriptionJonathan Nieder Sun, 30 May 2010 08:41:53 +0000 (03:41 -0500)

Documentation/checkout: clarify description

To the first-time reader, it may not be obvious that ‘git checkout’
has two modes, nor that if no branch is specified it will read
from the index.

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

Documentation/config: describe status.submodulesummaryMichael J Gruber Thu, 20 May 2010 15:55:42 +0000 (17:55 +0200)

Documentation/config: describe status.submodulesummary

ac8d5af (builtin-status: submodule summary support, 2008-04-12)
intoduced this variable and described it in git-status[1].

Include this description in git-config[1], as well.

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

Merge branch 'maint-1.7.0' into maintJunio C Hamano Fri, 28 May 2010 23:59:36 +0000 (16:59 -0700)

Merge branch 'maint-1.7.0' into maint

* maint-1.7.0:
Makefile: reenable install with NO_CURL