gitweb.git
apply --whitespace=fix: fix tab-in-indentJohannes Sixt Tue, 30 Nov 2010 08:22:04 +0000 (09:22 +0100)

apply --whitespace=fix: fix tab-in-indent

When the whitespace rule tab-in-indent is enabled, apply --whitespace=fix
replaces tabs by the appropriate amount of blanks. The code used
"dst->len % 8" as the criterion to stop adding blanks. But it forgot that
dst holds more than just the current line. Consequently, the modulus was
computed correctly only for the first added line, but not for the second
and subsequent lines. Fix it.

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

whitespace: tests for git-apply --whitespace=fix with... Chris Webb Fri, 2 Apr 2010 23:37:37 +0000 (00:37 +0100)

whitespace: tests for git-apply --whitespace=fix with tab-in-indent

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

whitespace: add tab-in-indent support for --whitespace=fixChris Webb Fri, 2 Apr 2010 23:37:30 +0000 (00:37 +0100)

whitespace: add tab-in-indent support for --whitespace=fix

If tab-in-indent is set, --whitespace=fix will ensure that any stray tabs in
the initial indent are expanded to the correct number of space characters.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

whitespace: replumb ws_fix_copy to take a strbuf *dst... Chris Webb Fri, 2 Apr 2010 23:37:23 +0000 (00:37 +0100)

whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dst

To implement --whitespace=fix for tab-in-indent, we have to allow for the
possibility that whitespace can increase in size when it is fixed, expanding
tabs to to multiple spaces in the initial indent.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

whitespace: tests for git-diff --check with tab-in... Chris Webb Fri, 2 Apr 2010 23:37:15 +0000 (00:37 +0100)

whitespace: tests for git-diff --check with tab-in-indent error class

[jc: with test fixes from J6t]

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

whitespace: add tab-in-indent error classChris Webb Fri, 2 Apr 2010 23:37:08 +0000 (00:37 +0100)

whitespace: add tab-in-indent error class

Some projects and languages use coding style where no tab character is used to
indent the lines.

This only adds support and documentation for "apply --whitespace=warn" and
"diff --check"; later patches add "apply --whitespace=fix" and tests.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

whitespace: we cannot "catch all errors known to git... Junio C Hamano Fri, 2 Apr 2010 23:37:00 +0000 (00:37 +0100)

whitespace: we cannot "catch all errors known to git" anymore

Traditionally, "*.txt whitespace" in .gitattributes file has been an
instruction to catch _all_ classes of whitespace errors known to git.

This has to change, however, in order to introduce "tab-in-indent" which
is inherently incompatible with "indent-with-non-tab". As we do not want
to break configuration of existing users, add a mechanism to allow marking
selected rules to be excluded from "all rules known to git".

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 30 Mar 2010 04:29:24 +0000 (21:29 -0700)

Merge branch 'maint'

* maint:
format-patch: Squelch 'fatal: Not a range." error

format-patch: Squelch 'fatal: Not a range." errorKevin Ballard Tue, 30 Mar 2010 02:46:38 +0000 (19:46 -0700)

format-patch: Squelch 'fatal: Not a range." error

Don't output an error on `git format-patch --ignore-if-in-upstream HEAD`.
This matches the behavior of `git format-patch HEAD`.

Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.1Junio C Hamano Mon, 29 Mar 2010 04:57:59 +0000 (21:57 -0700)

Update draft release notes to 1.7.1

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

Merge branch 'cc/cherry-pick-ff'Junio C Hamano Mon, 29 Mar 2010 04:52:28 +0000 (21:52 -0700)

Merge branch 'cc/cherry-pick-ff'

* cc/cherry-pick-ff:
revert: fix tiny memory leak in cherry-pick --ff
rebase -i: use new --ff cherry-pick option
Documentation: describe new cherry-pick --ff option
cherry-pick: add tests for new --ff option
revert: add --ff option to allow fast forward when cherry-picking
builtin/merge: make checkout_fast_forward() non static
parse-options: add parse_options_concat() to concat options

Merge branch 'sb/notes-parse-opt'Junio C Hamano Mon, 29 Mar 2010 04:52:28 +0000 (21:52 -0700)

Merge branch 'sb/notes-parse-opt'

* sb/notes-parse-opt:
notes: rework subcommands and parse options

Conflicts:
builtin/notes.c

Merge branch 'maint'Junio C Hamano Mon, 29 Mar 2010 04:52:18 +0000 (21:52 -0700)

Merge branch 'maint'

* maint:
Prepare for 1.7.0.4

Conflicts:
RelNotes

rebase -i: make post-rewrite work for 'edit'Thomas Rast Sun, 28 Mar 2010 19:36:00 +0000 (21:36 +0200)

rebase -i: make post-rewrite work for 'edit'

The post-rewrite support, in the form of the call to
'record_in_rewritten', was hidden in the arm where we have to record a
new commit for the user. This meant that it was never invoked in the
case where the user has already amended the commit by herself.

[The test is designed to exercise both arms of the 'if' in question.]

Furthermore, recording the stopped-sha (the SHA1 of the commit before
the editing) suffered from a cut&paste error from die_with_patch and
used the wrong variable, hence it never recorded anything.

Noticed by Junio.

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

Prepare for 1.7.0.4Junio C Hamano Mon, 29 Mar 2010 04:32:25 +0000 (21:32 -0700)

Prepare for 1.7.0.4

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

Merge branch 'cp/add-u-pathspec' into maintJunio C Hamano Mon, 29 Mar 2010 04:21:42 +0000 (21:21 -0700)

Merge branch 'cp/add-u-pathspec' into maint

* cp/add-u-pathspec:
test for add with non-existent pathspec
git add -u: die on unmatched pathspec

Merge branch 'maint'Junio C Hamano Mon, 29 Mar 2010 00:42:58 +0000 (17:42 -0700)

Merge branch 'maint'

* maint:
t9350: fix careless use of "cd"
difftool: Fix '--gui' when diff.guitool is unconfigured
fast-export: don't segfault when marks file cannot be opened

t9350: fix careless use of "cd"Junio C Hamano Mon, 29 Mar 2010 00:42:11 +0000 (17:42 -0700)

t9350: fix careless use of "cd"

Upon failure of any of these tests (or when a test that is marked as
expecting a failure is fixed), we will end up running later tests in
random places.

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

difftool: Fix '--gui' when diff.guitool is unconfiguredDavid Aguilar Sat, 27 Mar 2010 21:58:09 +0000 (14:58 -0700)

difftool: Fix '--gui' when diff.guitool is unconfigured

When diff.guitool is unconfigured and "--gui" is specified
git-difftool dies with the following error message:

config diff.guitool: command returned error: 1

Catch the error so that the "--gui" flag is a no-op when
diff.guitool is unconfigured.

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

fast-export: don't segfault when marks file cannot... Sverre Rabbelier Sun, 28 Mar 2010 05:42:48 +0000 (00:42 -0500)

fast-export: don't segfault when marks file cannot be opened

The error function only prints an error message, resulting in a
segfault if we later on try to fprintf to a NULL handle.

Fix this by using die_errno instead.

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

imap-send: suppress warning about cleartext password... Chris Webb Sat, 27 Mar 2010 15:00:19 +0000 (15:00 +0000)

imap-send: suppress warning about cleartext password with CRAM-MD5

If a CRAM-MD5 challenge-response is used to authenticate to the IMAP server,
git imap-send shouldn't warn about the password being sent in the clear.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jh/maint-submodule-status-in-void'Junio C Hamano Wed, 24 Mar 2010 23:55:37 +0000 (16:55 -0700)

Merge branch 'jh/maint-submodule-status-in-void'

* jh/maint-submodule-status-in-void:
git submodule summary: Handle HEAD as argument when on an unborn branch
submodule summary: do not fail before the first commit

Merge branch 'tr/notes-display'Junio C Hamano Wed, 24 Mar 2010 23:26:43 +0000 (16:26 -0700)

Merge branch 'tr/notes-display'

* tr/notes-display:
git-notes(1): add a section about the meaning of history
notes: track whether notes_trees were changed at all
notes: add shorthand --ref to override GIT_NOTES_REF
commit --amend: copy notes to the new commit
rebase: support automatic notes copying
notes: implement helpers needed for note copying during rewrite
notes: implement 'git notes copy --stdin'
rebase -i: invoke post-rewrite hook
rebase: invoke post-rewrite hook
commit --amend: invoke post-rewrite hook
Documentation: document post-rewrite hook
Support showing notes from more than one notes tree
test-lib: unset GIT_NOTES_REF to stop it from influencing tests

Conflicts:
git-am.sh
refs.c

Merge branch 'jl/submodule-diff-dirtiness'Junio C Hamano Wed, 24 Mar 2010 23:25:43 +0000 (16:25 -0700)

Merge branch 'jl/submodule-diff-dirtiness'

* jl/submodule-diff-dirtiness:
git status: ignoring untracked files must apply to submodules too
git status: Fix false positive "new commits" output for dirty submodules
Refactor dirty submodule detection in diff-lib.c
git status: Show detailed dirty status of submodules in long format
git diff --submodule: Show detailed dirty status of submodules

Merge branch 'pb/log-first-parent-p-m'Junio C Hamano Wed, 24 Mar 2010 23:25:39 +0000 (16:25 -0700)

Merge branch 'pb/log-first-parent-p-m'

* pb/log-first-parent-p-m:
show --first-parent/-m: do not default to --cc
show -c: show patch text
revision: introduce setup_revision_opt
t4013: add tests for log -p -m --first-parent
git log -p -m: document -m and honor --first-parent

Merge branch 'jc/maint-refs-dangling'Junio C Hamano Wed, 24 Mar 2010 23:25:34 +0000 (16:25 -0700)

Merge branch 'jc/maint-refs-dangling'

* jc/maint-refs-dangling:
refs: ref entry with NULL sha1 is can be a dangling symref

Merge branch 'maint'Junio C Hamano Wed, 24 Mar 2010 23:24:21 +0000 (16:24 -0700)

Merge branch 'maint'

* maint:
Documentation: explain the meaning of "-g" in git-describe output

Merge branch 'jc/color-attrs' into maintJunio C Hamano Wed, 24 Mar 2010 23:24:13 +0000 (16:24 -0700)

Merge branch 'jc/color-attrs' into maint

* jc/color-attrs:
color: allow multiple attributes

Merge branch 'jk/maint-add-ignored-dir' into maintJunio C Hamano Wed, 24 Mar 2010 23:24:03 +0000 (16:24 -0700)

Merge branch 'jk/maint-add-ignored-dir' into maint

* jk/maint-add-ignored-dir:
tests for "git add ignored-dir/file" without -f
dir: fix COLLECT_IGNORED on excluded prefixes
t0050: mark non-working test as such

Merge branch 'bg/apply-fix-blank-at-eof' into maintJunio C Hamano Wed, 24 Mar 2010 23:23:50 +0000 (16:23 -0700)

Merge branch 'bg/apply-fix-blank-at-eof' into maint

* bg/apply-fix-blank-at-eof:
t3417: Add test cases for "rebase --whitespace=fix"
t4124: Add additional tests of --whitespace=fix
apply: Allow blank context lines to match beyond EOF
apply: Remove the quick rejection test
apply: Don't unnecessarily update line lengths in the preimage

Documentation: explain the meaning of "-g" in git-descr... Markus Heidelberg Mon, 22 Mar 2010 20:45:33 +0000 (21:45 +0100)

Documentation: explain the meaning of "-g" in git-describe output

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with Git 1.7.0.3Junio C Hamano Mon, 22 Mar 2010 00:01:55 +0000 (17:01 -0700)

Sync with Git 1.7.0.3

* maint:
Git 1.7.0.3
.mailmap: Map the the first submissions of MJG by e-mail
Documentation/git-clone: Transform description list into item list
Documentation/urls: Remove spurious example markers
Documentation/gitdiffcore: Remove misleading date in heading
Documentation/git-reflog: Fix formatting of command lists

Git 1.7.0.3 v1.7.0.3Junio C Hamano Mon, 22 Mar 2010 00:01:22 +0000 (17:01 -0700)

Git 1.7.0.3

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

Merge branch 'maint-1.6.6' into maintJunio C Hamano Mon, 22 Mar 2010 00:00:22 +0000 (17:00 -0700)

Merge branch 'maint-1.6.6' into maint

* maint-1.6.6:
Documentation/git-clone: Transform description list into item list
Documentation/urls: Remove spurious example markers
Documentation/gitdiffcore: Remove misleading date in heading
Documentation/git-reflog: Fix formatting of command lists

.mailmap: Map the the first submissions of MJG by e... Michael J Gruber Sun, 21 Mar 2010 13:43:47 +0000 (14:43 +0100)

.mailmap: Map the the first submissions of MJG by e-mail

so that git shortlog with '-e' coalesces all my commits.

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

Documentation/git-clone: Transform description list... Michael J Gruber Sun, 21 Mar 2010 17:30:19 +0000 (18:30 +0100)

Documentation/git-clone: Transform description list into item list

so that the list of examples is formatted in the same way as for
git-fetch, and, more importantly, the different identation for the
code blocks in the examples (compared to the immediately preceding code
blocks from url.txt) doesn't look like misformatted, but is clarified by
the items' bullets.

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

Documentation/urls: Remove spurious example markersMichael J Gruber Sun, 21 Mar 2010 17:30:18 +0000 (18:30 +0100)

Documentation/urls: Remove spurious example markers

In urls.txt (which is included from git-{clone,fetch,push}.txt)
several item lists are surrounded by example block markers. This is
problematic for two reasons:

- None of these lists are example lists, so they should not be marked as
such semantically.
- The html output looks weird (bulleted list with left sidebar).

Therefore, remove the example block markers. Output by the man backend
is unaffected.

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

Documentation/gitdiffcore: Remove misleading date in... Michael J Gruber Sun, 21 Mar 2010 17:30:17 +0000 (18:30 +0100)

Documentation/gitdiffcore: Remove misleading date in heading

Ever since the automatic conversion into man form, the heading
contained a misidentified subheading reading "June 2005".
Remove this since the documentation is more recent, and the correct
date is in the footer.

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

Documentation/git-reflog: Fix formatting of command... Michael J Gruber Sun, 21 Mar 2010 17:30:16 +0000 (18:30 +0100)

Documentation/git-reflog: Fix formatting of command lists

A misplaced list continuation mark appears literally in the
rendered doc. Fix this by removing it.

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

revert: fix tiny memory leak in cherry-pick --ffJonathan Nieder Sun, 21 Mar 2010 02:01:20 +0000 (21:01 -0500)

revert: fix tiny memory leak in cherry-pick --ff

We forgot to free defmsg when returning early for a fast-forward.

Fixing this should reduce noise during test suite runs with valgrind.
More importantly, once cherry-pick learns to pick multiple commits,
the amount of memory leaked would start to add up.

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

Update draft release notes to 1.7.1Junio C Hamano Sat, 20 Mar 2010 18:42:34 +0000 (11:42 -0700)

Update draft release notes to 1.7.1

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

Merge branch 'jk/maint-add-ignored-dir'Junio C Hamano Sat, 20 Mar 2010 18:29:36 +0000 (11:29 -0700)

Merge branch 'jk/maint-add-ignored-dir'

* jk/maint-add-ignored-dir:
tests for "git add ignored-dir/file" without -f
dir: fix COLLECT_IGNORED on excluded prefixes
t0050: mark non-working test as such

Merge branch 'ml/color-grep'Junio C Hamano Sat, 20 Mar 2010 18:29:36 +0000 (11:29 -0700)

Merge branch 'ml/color-grep'

* ml/color-grep:
grep: Colorize selected, context, and function lines
grep: Colorize filename, line number, and separator
Add GIT_COLOR_BOLD_* and GIT_COLOR_BG_*

Merge branch 'jc/color-attrs'Junio C Hamano Sat, 20 Mar 2010 18:29:36 +0000 (11:29 -0700)

Merge branch 'jc/color-attrs'

* jc/color-attrs:
color: allow multiple attributes

Merge branch 'cc/reset-keep'Junio C Hamano Sat, 20 Mar 2010 18:29:35 +0000 (11:29 -0700)

Merge branch 'cc/reset-keep'

* cc/reset-keep:
Documentation: improve description of "git reset --keep"
reset: disallow using --keep when there are unmerged entries
reset: disallow "reset --keep" outside a work tree
Documentation: reset: describe new "--keep" option
reset: add test cases for "--keep" option
reset: add option "--keep" to "git reset"

Merge branch 'fl/askpass'Junio C Hamano Sat, 20 Mar 2010 18:29:35 +0000 (11:29 -0700)

Merge branch 'fl/askpass'

* fl/askpass:
git-core: Support retrieving passwords with GIT_ASKPASS
git-svn: Support retrieving passwords with GIT_ASKPASS

Merge branch 'bg/apply-fix-blank-at-eof'Junio C Hamano Sat, 20 Mar 2010 18:29:35 +0000 (11:29 -0700)

Merge branch 'bg/apply-fix-blank-at-eof'

* bg/apply-fix-blank-at-eof:
t3417: Add test cases for "rebase --whitespace=fix"
t4124: Add additional tests of --whitespace=fix
apply: Allow blank context lines to match beyond EOF
apply: Remove the quick rejection test
apply: Don't unnecessarily update line lengths in the preimage

Merge branch 'bw/union-merge-refactor'Junio C Hamano Sat, 20 Mar 2010 18:29:34 +0000 (11:29 -0700)

Merge branch 'bw/union-merge-refactor'

* bw/union-merge-refactor:
merge-file: add option to select union merge favor
merge-file: add option to specify the marker size
refactor merge flags into xmparam_t
make union merge an xdl merge favor

Merge branch 'maint'Junio C Hamano Sat, 20 Mar 2010 18:29:19 +0000 (11:29 -0700)

Merge branch 'maint'

* maint:
Update draft release notes to 1.7.0.3
fetch: Fix minor memory leak
fetch: Future-proof initialization of a refspec on stack
fetch: Check for a "^{}" suffix with suffixcmp()
daemon: parse_host_and_port SIGSEGV if port is specified
Makefile: Fix CDPATH problem
pull: replace unnecessary sed invocation

Update draft release notes to 1.7.0.3Junio C Hamano Sat, 20 Mar 2010 18:29:13 +0000 (11:29 -0700)

Update draft release notes to 1.7.0.3

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

rebase -i: use new --ff cherry-pick optionChristian Couder Sat, 6 Mar 2010 20:34:46 +0000 (21:34 +0100)

rebase -i: use new --ff cherry-pick option

This simplifies rebase -i a little bit.

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

fetch: Fix minor memory leakAndreas Gruenbacher Mon, 15 Mar 2010 22:18:48 +0000 (23:18 +0100)

fetch: Fix minor memory leak

A temporary struct ref is allocated in store_updated_refs() but not
freed.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: Future-proof initialization of a refspec on... Andreas Gruenbacher Fri, 12 Mar 2010 22:27:33 +0000 (23:27 +0100)

fetch: Future-proof initialization of a refspec on stack

The open-coded version to initialize each and every member will break
when a new member is added to the structure.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: Check for a "^{}" suffix with suffixcmp()Andreas Gruenbacher Sat, 13 Mar 2010 17:17:04 +0000 (18:17 +0100)

fetch: Check for a "^{}" suffix with suffixcmp()

Otherwise, we will check random bytes for ref names < 3 characters.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix a spelling mistake in a git-p4 console messageBenjamin C Meyer Fri, 19 Mar 2010 04:39:10 +0000 (00:39 -0400)

Fix a spelling mistake in a git-p4 console message

Signed-off-by: Benjamin C Meyer <bmeyer@rim.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use test_expect_success for test setupsBrian Gernhardt Sat, 20 Mar 2010 08:29:11 +0000 (04:29 -0400)

Use test_expect_success for test setups

Several tests did not use test_expect_success for their setup
commands. Putting these start commands into the testing framework
means both that errors during setup will be caught quickly and that
non-error text will be suppressed without -v.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

daemon: parse_host_and_port SIGSEGV if port is specifiedImre Deak Sat, 20 Mar 2010 02:23:58 +0000 (04:23 +0200)

daemon: parse_host_and_port SIGSEGV if port is specified

This typo will lead to git-daemon dying any time the connect
string includes a port after the host= attribute. This can lead
for example to one of the following error messages on the client
side when someone tries git clone git://...:<port>.

When the daemon is running on localhost:
fatal: The remote end hung up unexpectedly

or when the daemon is connected through an ssh tunnel:
fatal: protocol error: bad line length character: erro

In the latter case 'erro' comes from the daemon's reply:
error: git-daemon died of signal 11

Signed-off-by: Imre Deak <imre.deak@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: Fix occasional GIT-CFLAGS breakageJonathan Nieder Sat, 20 Mar 2010 03:20:12 +0000 (22:20 -0500)

Makefile: Fix occasional GIT-CFLAGS breakage

GNU make’s target-specific variables facility has one weird facet: any
variables set for a given target apply to all of its dependencies,
too. For example, when running “make exec_cmd.o”, since exec_cmd.o
depends on GIT-CFLAGS, the variable assignment in

exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DPREFIX="$(prefix_SQ)"'

applies when refreshing GIT-CFLAGS, and the extra options get included
in the tracked compiler flags. If an object file like this is the
first target built, GIT-CFLAGS will appear to be out of date,
resulting in useless rebuilds and the dreaded “new build flags or
prefix” message.

This does not happen with every build because GIT-CFLAGS is only
refreshed once in a given “make” run, and usually the first target
does not set any variables. When this problem does rear its head, it
is very annoying.

So put target-specific flags in a separate EXTRA_CPPFLAGS variable
that is not included in $(TRACK_CFLAGS).

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

Makefile: Fix CDPATH problemJonathan Nieder Sat, 20 Mar 2010 00:06:15 +0000 (19:06 -0500)

Makefile: Fix CDPATH problem

If CDPATH is set, "cd" prints its destination to stdout, causing
the common (cd a && tar cf - .) | (cd b && tar xf -) idiom to fail.
For example:

make -C templates DESTDIR='' install
make[1]: Entering directory `/users/e477610/exptool/src/git-1.7.0.2/templates'
install -d -m 755 '/home/e477610/exptool/share/git-core/templates'
(cd blt && gtar cf - .) | \
(cd '/home/e477610/exptool/share/git-core/templates' && umask 022 && gtar xof -)
gtar: This does not look like a tar archive

Most git scripts already protect against use of CDPATH through
git-sh-setup, but the Makefile doesn’t.

Reported-by: Michael Cox <mhcox@bluezoosoftware.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes.c: remove inappropriate call to returnBrandon Casey Thu, 18 Mar 2010 15:03:43 +0000 (10:03 -0500)

notes.c: remove inappropriate call to return

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull: replace unnecessary sed invocationStephen Boyd Thu, 18 Mar 2010 05:10:45 +0000 (22:10 -0700)

pull: replace unnecessary sed invocation

Getting the shortened branch name is as easy as using the shell's
parameter expansion.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 17 Mar 2010 21:24:08 +0000 (14:24 -0700)

Merge branch 'maint'

* maint:
Documentation: receive.denyCurrentBranch defaults to 'refuse'
bash: complete *_HEAD refs if present

Documentation: receive.denyCurrentBranch defaults to... Thomas Rast Wed, 17 Mar 2010 11:14:57 +0000 (12:14 +0100)

Documentation: receive.denyCurrentBranch defaults to 'refuse'

acd2a45 (Refuse updating the current branch in a non-bare repository
via push, 2009-02-11) changed the default to refuse such a push, but
it forgot to update the docs.

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

bash: complete *_HEAD refs if presentIan Ward Comfort Wed, 17 Mar 2010 09:20:35 +0000 (02:20 -0700)

bash: complete *_HEAD refs if present

We already complete HEAD, of course, and might as well complete the other
common refs mentioned in the rev-parse man page: FETCH_HEAD, ORIG_HEAD, and
MERGE_HEAD.

Signed-off-by: Ian Ward Comfort <icomfort@stanford.edu>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 17 Mar 2010 02:30:37 +0000 (19:30 -0700)

Merge branch 'maint'

* maint:
Documentation/git-read-tree: clarify 2-tree merge
Documentation/git-read-tree: fix table layout

refs: ref entry with NULL sha1 is can be a dangling... Junio C Hamano Tue, 16 Mar 2010 05:12:55 +0000 (22:12 -0700)

refs: ref entry with NULL sha1 is can be a dangling symref

Brandon Casey noticed that t5505 had accidentally broken its && chain,
hiding inconsistency between the code that writes the warning to the
standard output and the test that expects to see the warning on the
standard error, which was introduced by f8948e2 (remote prune: warn
dangling symrefs, 2009-02-08).

It turns out that the issue is deeper than that. After f8948e2, a symref
that is dangling is marked with a NULL sha1, and the idea of using NULL
sha1 to mean a deleted ref was scrapped, but somehow a follow-up eafb452
(do_one_ref(): null_sha1 check is not about broken ref, 2009-07-22)
incorrectly reorganized do_one_ref(), still thinking NULL sha1 is never
used in the code.

Fix this by:

- adopt Brandon's fix to t5505 test;

- introduce REF_BROKEN flag to mark a ref that fails to resolve (dangling
symref);

- move the check for broken ref back inside the "if we are skipping
dangling refs" code block.

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

Documentation/git-read-tree: clarify 2-tree mergeMichael J Gruber Mon, 15 Mar 2010 10:54:46 +0000 (11:54 +0100)

Documentation/git-read-tree: clarify 2-tree merge

Clarify the description of the 2-tree merge by defining the terms
which are used in the table, and by applying some small linguistic
changes.

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

Documentation/git-read-tree: fix table layoutMichael J Gruber Mon, 15 Mar 2010 10:54:45 +0000 (11:54 +0100)

Documentation/git-read-tree: fix table layout

Asciidoc takes the first non-space character in the first line of the
paragraph as a reference point for preformatted layout, so adjust to
that to make the table align.

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

Merge branch 'sd/format-patch-to'Junio C Hamano Mon, 15 Mar 2010 07:58:55 +0000 (00:58 -0700)

Merge branch 'sd/format-patch-to'

* sd/format-patch-to:
send-email: add --no-cc, --no-to, and --no-bcc
format-patch: add --no-cc, --no-to, and --no-add-headers
format-patch: use a string_list for headers
Add 'git format-patch --to=' option and 'format.to' configuration variable.

Merge branch 'tc/http-cleanup'Junio C Hamano Mon, 15 Mar 2010 07:58:50 +0000 (00:58 -0700)

Merge branch 'tc/http-cleanup'

* tc/http-cleanup:
remote-curl: init walker only when needed
remote-curl: use http_fetch_ref() instead of walker wrapper
http: init and cleanup separately from http-walker
http-walker: cleanup more thoroughly
http-push: remove "|| 1" to enable verbose check
t554[01]-http-push: refactor, add non-ff tests
t5541-http-push: check that ref is unchanged for non-ff test

Merge branch 'tc/transport-verbosity'Junio C Hamano Mon, 15 Mar 2010 07:58:42 +0000 (00:58 -0700)

Merge branch 'tc/transport-verbosity'

* tc/transport-verbosity:
transport: update flags to be in running order
fetch and pull: learn --progress
push: learn --progress
transport->progress: use flag authoritatively
clone: support multiple levels of verbosity
push: support multiple levels of verbosity
fetch: refactor verbosity option handling into transport.[ch]
Documentation/git-push: put --quiet before --verbose
Documentation/git-pull: put verbosity options before merge/fetch ones
Documentation/git-clone: mention progress in -v

Conflicts:
transport.h

Merge branch 'ld/push-porcelain'Junio C Hamano Mon, 15 Mar 2010 07:58:24 +0000 (00:58 -0700)

Merge branch 'ld/push-porcelain'

* ld/push-porcelain:
t5516: Use test_cmp when appropriate
git-push: add tests for git push --porcelain
git-push: make git push --porcelain print "Done"
git-push: send "To <remoteurl>" messages to the standard output in --porcelain mode
git-push: fix an advice message so it goes to stderr

Conflicts:
transport.c

Merge branch 'jh/notes'Junio C Hamano Mon, 15 Mar 2010 07:52:06 +0000 (00:52 -0700)

Merge branch 'jh/notes'

* jh/notes: (33 commits)
Documentation: fix a few typos in git-notes.txt
notes: fix malformed tree entry
builtin-notes: Minor (mostly parse_options-related) fixes
builtin-notes: Add "copy" subcommand for copying notes between objects
builtin-notes: Misc. refactoring of argc and exit value handling
builtin-notes: Add -c/-C options for reusing notes
builtin-notes: Refactor handling of -F option to allow combining -m and -F
builtin-notes: Deprecate the -m/-F options for "git notes edit"
builtin-notes: Add "append" subcommand for appending to note objects
builtin-notes: Add "add" subcommand for adding notes to objects
builtin-notes: Add --message/--file aliases for -m/-F options
builtin-notes: Add "list" subcommand for listing note objects
Documentation: Generalize git-notes docs to 'objects' instead of 'commits'
builtin-notes: Add "prune" subcommand for removing notes for missing objects
Notes API: prune_notes(): Prune notes that belong to non-existing objects
t3305: Verify that removing notes triggers automatic fanout consolidation
builtin-notes: Add "remove" subcommand for removing existing notes
Teach builtin-notes to remove empty notes
Teach notes code to properly preserve non-notes in the notes tree
t3305: Verify that adding many notes with git-notes triggers increased fanout
...

Conflicts:
Makefile

tests for "git add ignored-dir/file" without -fJunio C Hamano Mon, 1 Mar 2010 03:12:31 +0000 (19:12 -0800)

tests for "git add ignored-dir/file" without -f

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

dir: fix COLLECT_IGNORED on excluded prefixesJeff King Thu, 11 Mar 2010 07:15:43 +0000 (02:15 -0500)

dir: fix COLLECT_IGNORED on excluded prefixes

As we walk the directory tree, if we see an ignored path, we
want to add it to the ignored list only if it matches any
pathspec that we were given. We used to check for the
pathspec to appear explicitly. E.g., if we see "subdir/file"
and it is excluded, we check to see if we have "subdir/file"
in our pathspec.

However, this interacts badly with the optimization to avoid
recursing into ignored subdirectories. If "subdir" as a
whole is ignored, then we never recurse, and consider only
whether "subdir" itself is in our pathspec. It would not
match a pathspec of "subdir/file" explicitly, even though it
is the reason that subdir/file would be excluded.

This manifests itself to the user as "git add subdir/file"
failing to correctly note that the pathspec was ignored.

This patch extends the in_pathspec logic to include prefix
directory case.

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

t0050: mark non-working test as suchJunio C Hamano Mon, 1 Mar 2010 07:31:21 +0000 (23:31 -0800)

t0050: mark non-working test as such

The test is to prepare an empty file "camelcase" in the index, remove
and replace it with another file "CamelCase" with "1" as its contents
in the working tree, and add it to the index, in a repository configured
to be case insensitive.

However, the test actually checked ls-files knows about a pathname that
matches "camelcase" case insensitively. It didn't check if the added
contents actually was the updated one.

Mark the test as non-working.

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

git status: ignoring untracked files must apply to... Jens Lehmann Sat, 13 Mar 2010 22:00:27 +0000 (23:00 +0100)

git status: ignoring untracked files must apply to submodules too

Since 1.7.0 submodules are considered dirty when they contain untracked
files. But when git status is called with the "-uno" option, the user
asked to ignore untracked files, so they must be ignored in submodules
too. To achieve this, the new flag DIFF_OPT_IGNORE_UNTRACKED_IN_SUBMODULES
is introduced.

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

Merge branch 'maint'Junio C Hamano Sun, 14 Mar 2010 05:31:42 +0000 (21:31 -0800)

Merge branch 'maint'

* maint:
don't use default revision if a rev was specified
for_each_recent_reflog_ent(): use strbuf, fix offset handling
t/Makefile: remove test artifacts upon "make clean"
blame: fix indent of line numbers

don't use default revision if a rev was specifiedDave Olszewski Sat, 13 Mar 2010 22:47:05 +0000 (14:47 -0800)

don't use default revision if a rev was specified

If a revision is specified, it happens not to have any commits, don't
use the default revision. By doing so, surprising and undesired
behavior can happen, such as showing the reflog for HEAD when a branch
was specified.

[jc: squashed a test from René]

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

for_each_recent_reflog_ent(): use strbuf, fix offset... René Scharfe Sat, 13 Mar 2010 17:37:50 +0000 (18:37 +0100)

for_each_recent_reflog_ent(): use strbuf, fix offset handling

As Vladimir reported, "git log -g refs/stash" surprisingly showed the reflog
of HEAD if the message in the reflog file was too long. To fix this, convert
for_each_recent_reflog_ent() to use strbuf_getwholeline() instead of fgets(),
for safety and to avoid any size limits for reflog entries.

Also reverse the logic of the part of the function that only looks at file
tails. It used to close the file if fgets() succeeded. The following
fgets() call in the while loop was likely to fail in this case, too, so
passing an offset to for_each_recent_reflog_ent() never worked. Change it to
error out if strbuf_getwholeline() fails instead.

Reported-by: Vladimir Panteleev <vladimir@thecybershadow.net>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/Makefile: remove test artifacts upon "make clean"Junio C Hamano Sat, 13 Mar 2010 20:41:20 +0000 (12:41 -0800)

t/Makefile: remove test artifacts upon "make clean"

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

blame: fix indent of line numbersRené Scharfe Sat, 13 Mar 2010 10:25:12 +0000 (11:25 +0100)

blame: fix indent of line numbers

Correct the calculation of the number of digits for line counts of the
form 10^n-1 (9, 99, ...) in lineno_width(). This makes blame stop
printing an extra space before the line numbers of files with that many
total lines.

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

Merge git://git.bogomips.org/git-svnJunio C Hamano Sat, 13 Mar 2010 20:02:54 +0000 (12:02 -0800)

Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
t9150,t9151: Add rewrite-root option to init
git-svn: Fix merge detecting with rewrite-root

t9150,t9151: Add rewrite-root option to initTuomas Suutari Wed, 24 Feb 2010 18:09:02 +0000 (20:09 +0200)

t9150,t9151: Add rewrite-root option to init

The rewrite-root option seems to be a bit problematic with merge
detecting, so it's better to have a merge detecting test with it
turned on.

Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: Fix merge detecting with rewrite-rootTuomas Suutari Wed, 24 Feb 2010 18:09:01 +0000 (20:09 +0200)

git-svn: Fix merge detecting with rewrite-root

Detecting of merges from svn:mergeinfo or svk merge tickets failed
with rewrite-root option. This fixes it.

Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

git status: Fix false positive "new commits" output... Jens Lehmann Fri, 12 Mar 2010 21:23:52 +0000 (22:23 +0100)

git status: Fix false positive "new commits" output for dirty submodules

Testing if the output "new commits" should appear in the long format of
"git status" is done by comparing the hashes of the diffpair. This always
resulted in printing "new commits" for submodules that contained untracked
or modified content, even if they did not contain new commits. The reason
was that match_stat_with_submodule() did set the "changed" flag for dirty
submodules, resulting in two->sha1 being set to the null_sha1 at the call
sites, which indicates that new commits are present. This is changed so
that when no new commits are present, the same object names are in the
sha1 field for both sides of the filepair, and the working tree side will
have the "dirty_submodule" flag set when appropriate. For a submodule to
be seen as modified even when it just has a dirty work tree, some
conditions had to be extended to also check for the "dirty_submodule"
flag.

Unfortunately the test case that should have found this bug had been
changed incorrectly too. It is fixed and extended to test for other
combinations too.

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

Refactor dirty submodule detection in diff-lib.cJens Lehmann Thu, 11 Mar 2010 21:50:25 +0000 (22:50 +0100)

Refactor dirty submodule detection in diff-lib.c

Moving duplicated code into the new function match_stat_with_submodule().
Replacing the implicit activation of detailed checks for the dirtiness of
submodules when DIFF_FORMAT_PATCH was selected with explicitly setting
the recently added DIFF_OPT_DIRTY_SUBMODULES option in diff_setup_done().

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

Merge branch 'maint'Junio C Hamano Sat, 13 Mar 2010 06:13:22 +0000 (22:13 -0800)

Merge branch 'maint'

* maint:
t9400: Use test_cmp when appropriate

notes: rework subcommands and parse optionsStephen Boyd Sat, 27 Feb 2010 08:59:22 +0000 (00:59 -0800)

notes: rework subcommands and parse options

Running 'git notes copy -h' is not very helfpul right now. It lists
the options for all the git notes subcommands and is rather confusing.
Fix this by splitting cmd_notes() into separate functions for each
subcommand (besides append and edit since they're very similar) and
only providing a usage message for the subcommand.

This has an added benefit of reducing the code complexity while making
it safer and easier to read. The downside is we get some code bloat
from similar setup and teardown needed for notes and options parsing.
We also get a bit stricter in options parsing by only allowing
the ref option to come before the subcommand.

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

git-notes(1): add a section about the meaning of historyThomas Rast Fri, 12 Mar 2010 17:04:37 +0000 (18:04 +0100)

git-notes(1): add a section about the meaning of history

To the displaying code, the only interesting thing about a notes ref
is that it has a tree of the required format. However, notes actually
have a history since they are recorded as successive commits.

Make a note about the existence of this history in the manpage, but
keep some doors open if we want to change the details.

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

notes: track whether notes_trees were changed at allThomas Rast Fri, 12 Mar 2010 17:04:36 +0000 (18:04 +0100)

notes: track whether notes_trees were changed at all

Currently, the notes copying is a bit wasteful since it always creates
new trees, even if no notes were copied at all.

Teach add_note() and remove_note() to flag the affected notes tree as
changed ('dirty'). Then teach builtin/notes.c to use this knowledge
and avoid committing trees that weren't changed.

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

notes: add shorthand --ref to override GIT_NOTES_REFThomas Rast Fri, 12 Mar 2010 17:04:35 +0000 (18:04 +0100)

notes: add shorthand --ref to override GIT_NOTES_REF

Adds a shorthand option that overrides the GIT_NOTES_REF variable, and
hence determines the notes tree that will be manipulated. It also
DWIMs a refs/notes/ prefix.

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

commit --amend: copy notes to the new commitThomas Rast Fri, 12 Mar 2010 17:04:34 +0000 (18:04 +0100)

commit --amend: copy notes to the new commit

Teaches 'git commit --amend' to copy notes. The catch is that this
must also be guarded by --no-post-rewrite, which we use to prevent
--amend from copying notes during a rebase -i 'edit'/'reword'.

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

rebase: support automatic notes copyingThomas Rast Fri, 12 Mar 2010 17:04:33 +0000 (18:04 +0100)

rebase: support automatic notes copying

Luckily, all the support already happens to be there.

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

notes: implement helpers needed for note copying during... Thomas Rast Fri, 12 Mar 2010 17:04:32 +0000 (18:04 +0100)

notes: implement helpers needed for note copying during rewrite

Implement helper functions to load the rewriting config, and to
actually copy the notes. Also document the config.

Secondly, also implement an undocumented --for-rewrite=<cmd> option to
'git notes copy' which is used like --stdin, but also puts the
configuration for <cmd> into effect. It will be needed to support the
copying in git-rebase.

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

notes: implement 'git notes copy --stdin'Thomas Rast Fri, 12 Mar 2010 17:04:31 +0000 (18:04 +0100)

notes: implement 'git notes copy --stdin'

This implements a mass-copy command that takes a sequence of lines in
the format

<from-sha1> SP <to-sha1> [ SP <rest> ] LF

on stdin, and copies each <from-sha1>'s notes to the <to-sha1>. The
<rest> is ignored. The intent, of course, is that this can read the
same input that the 'post-rewrite' hook gets.

The copy_note() function is exposed for everyone's and in particular
the next commit's use.

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

rebase -i: invoke post-rewrite hookThomas Rast Fri, 12 Mar 2010 17:04:30 +0000 (18:04 +0100)

rebase -i: invoke post-rewrite hook

Aside from the same issue that rebase also has (remembering the
original commit across a conflict resolution), rebase -i brings an
extra twist: We need to defer writing the rewritten list in the case
of {squash,fixup} because their rewritten result should be the last
commit in the squashed group.

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

rebase: invoke post-rewrite hookThomas Rast Fri, 12 Mar 2010 17:04:29 +0000 (18:04 +0100)

rebase: invoke post-rewrite hook

We have to deal with two separate code paths: a normal rebase, which
actually goes through git-am; and rebase {-m|-s}.

The only small issue with both is that they need to remember the
original sha1 across a possible conflict resolution. rebase -m
already puts this information in $dotest/current, and we just
introduce a similar file for git-am.

Note that in git-am, the hook really only runs when coming from
git-rebase: the code path that sets the $dotest/original-commit file
is guarded by a test for $dotest/rebasing.

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

commit --amend: invoke post-rewrite hookThomas Rast Fri, 12 Mar 2010 17:04:28 +0000 (18:04 +0100)

commit --amend: invoke post-rewrite hook

The rough structure of run_rewrite_hook() comes from
run_receive_hook() in receive-pack.

We introduce a --no-post-rewrite option and use it to avoid the hook
when called from git-rebase -i 'edit'. The next patch will add full
support in git-rebase, and we only want to invoke the hook once.

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

Documentation: document post-rewrite hookThomas Rast Fri, 12 Mar 2010 17:04:27 +0000 (18:04 +0100)

Documentation: document post-rewrite hook

This defines the behaviour of the post-rewrite hook support, which
will be implemented in the following patches.

We deliberately do not document how often the hook will be invoked per
rewriting command, but the interface is designed to keep that at
"once". This would currently not matter too much, since both rebase
and filter-branch are shellscripts and spawn many processes anyway.
However, when a fast sequencer in C is implemented, it will be
beneficial to only have to run the hook once.

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