gitweb.git
revert: fix off by one read when searching the end... Christian Couder Thu, 22 Jul 2010 13:18:29 +0000 (15:18 +0200)

revert: fix off by one read when searching the end of a commit subject

A test case is added but the problem can only be seen when running
the test case with --valgrind.

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

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

t/README: clarify test_must_fail description

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

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

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

Check size of path buffer before writing into it

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

gitdir: (something really long)

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

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

update-server-info: Shorten read_pack_info_file()

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

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

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

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

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

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

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

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

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

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

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

gitmodules.5: url can be a relative path

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

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

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

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

gitweb: fix esc_url

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

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

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

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

It's already implemented, just undocumented.

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

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

format-patch: document the format.to configuration setting

[jc: with simplification from Jonathan Nieder]

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

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

Documentation: Spelling fix in protocol-capabilities.txt

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

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

checkout: accord documentation to what git does

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

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

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

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

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

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

backmerge a few more fixes to 1.7.1.X series

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

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

Merge branch 'maint-1.6.4' into maint

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

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

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

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

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

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

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

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

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

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

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

Conflicts:
t/t5516-fetch-push.sh

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>

git-rev-parse.txt: Add more examples for caret and... Michael J Gruber Mon, 28 Jun 2010 19:01:07 +0000 (21:01 +0200)

git-rev-parse.txt: Add more examples for caret and colon

Several items in the caret, colon and friends section contain examples
already. Make sure they all come with examples, and that examples come
early so that they serve as a visual guide, as well.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
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>

git-rev-parse.txt: Document ":path" specifierMichael J Gruber Sun, 27 Jun 2010 13:15:22 +0000 (15:15 +0200)

git-rev-parse.txt: Document ":path" specifier

The empty treeish in ":path" means "index". This is actually a special
case of the ":stage:path" syntax where it is documented, but mentioning
it also together with "treeish:path" is helpful, so do it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
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>

check_aliased_update: strcpy() instead of strcat()... Thomas Rast Thu, 10 Jun 2010 18:43:51 +0000 (20:43 +0200)

check_aliased_update: strcpy() instead of strcat() to copy

da3efdb (receive-pack: detect aliased updates which can occur with
symrefs, 2010-04-19) introduced two strcat() into uninitialized
strings. The intent was clearly make a copy of the static buffer used
by find_unique_abbrev(), so use strcpy() instead.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Tested-by: Ævar Arnfjörð Bjarmason <avarab@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>