gitweb.git
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>

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>

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>

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>

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

t5516: Use test_cmp when appropriateJunio C Hamano Fri, 12 Mar 2010 05:51:57 +0000 (21:51 -0800)

t5516: Use test_cmp when appropriate

Consistently using test_cmp would make debugging test scripts far easier,
as output from them run under "-v" option becomes readable.

Besides, some platforms' "diff" implementations lack "-q" option.

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

t9400: Use test_cmp when appropriateJunio C Hamano Fri, 12 Mar 2010 05:40:33 +0000 (21:40 -0800)

t9400: Use test_cmp when appropriate

Consistently using test_cmp would make debugging test scripts far easier,
as output from them run under "-v" option becomes readable.

Besides, some platforms' "diff" implementations lack "-q" option.

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

Merge branch 'sd/init-template'Junio C Hamano Wed, 10 Mar 2010 23:32:43 +0000 (15:32 -0800)

Merge branch 'sd/init-template'

* sd/init-template:
wrap-for-bin: do not export an empty GIT_TEMPLATE_DIR
t/t0001-init.sh: add test for 'init with init.templatedir set'
init: having keywords without value is not a global error.
Add a "TEMPLATE DIRECTORY" section to git-init[1].
Add `init.templatedir` configuration variable.

Merge branch 'sh/am-keep-cr'Junio C Hamano Wed, 10 Mar 2010 23:32:34 +0000 (15:32 -0800)

Merge branch 'sh/am-keep-cr'

* sh/am-keep-cr:
git-am: Add tests for `--keep-cr`, `--no-keep-cr` and `am.keepcr`
git-am: Add am.keepcr and --no-keep-cr to override it
git-am: Add command line parameter `--keep-cr` passing it to git-mailsplit
documentation: 'git-mailsplit --keep-cr' is not hidden anymore

Merge branch 'cp/add-u-pathspec'Junio C Hamano Wed, 10 Mar 2010 23:32:02 +0000 (15:32 -0800)

Merge branch 'cp/add-u-pathspec'

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

Makefile: update check-docs targetJunio C Hamano Wed, 10 Mar 2010 23:31:34 +0000 (15:31 -0800)

Makefile: update check-docs target

When we added bunch of git-remote-* helper backends, we should have
done this to squelch complaints that they do not have their own
manual pages. Also the entry for git-remote-helpers was not
properly marked as a non-command.

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

Merge branch 'lt/deepen-builtin-source'Junio C Hamano Wed, 10 Mar 2010 23:25:18 +0000 (15:25 -0800)

Merge branch 'lt/deepen-builtin-source'

* lt/deepen-builtin-source:
Move 'builtin-*' into a 'builtin/' subdirectory

Conflicts:
Makefile

show --first-parent/-m: do not default to --ccJunio C Hamano Tue, 9 Mar 2010 08:22:54 +0000 (00:22 -0800)

show --first-parent/-m: do not default to --cc

Given that "git show" always shows some diff and does not walk the history
by default, it is natural to expect "git show --first-parent" to show the
difference between the given commit and its first parent. It also would
be natural, given that "--cc" is the default, "git show -m" to show
pairwise difference from each of the parents.

We however always defaulted to --cc and there was no way to turn it off.

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

show -c: show patch textJunio C Hamano Tue, 9 Mar 2010 07:27:25 +0000 (23:27 -0800)

show -c: show patch text

Traditionally, "show" defaulted to "show --cc" (dense combined patch), but
asking for combined patch with "show -c" didn't turn the patch output
format on; the placement of this logic in setup_revisions() dates back to
cd2bdc5 (Common option parsing for "git log --diff" and friends,
2006-04-14).

This unfortunately cannot be done as a trivial change of "if dense
combined is asked, default to patch format" done in setup_revisions() to
"if any combined is asked, default to patch format", as "diff-tree -c"
needs to default to raw, while "diff-tree --cc" needs to default to patch,
and they share the codepath. These command specific defaults are now
handled in the new "tweak" callback that can be customized by individual
command implementations.

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

revision: introduce setup_revision_optJunio C Hamano Tue, 9 Mar 2010 06:58:09 +0000 (22:58 -0800)

revision: introduce setup_revision_opt

So far the last parameter to setup_revisions() was to specify the default
ref when the command line did not give any (typically "HEAD"). This changes
it to take a pointer to a structure so that we can add other information without
touching too many codepaths in later patches.

There is no functionality change.

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

t4013: add tests for log -p -m --first-parentJunio C Hamano Tue, 9 Mar 2010 05:11:40 +0000 (21:11 -0800)

t4013: add tests for log -p -m --first-parent

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

Documentation: improve description of "git reset -... Junio C Hamano Tue, 9 Mar 2010 01:51:16 +0000 (02:51 +0100)

Documentation: improve description of "git reset --keep"

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

send-email: add --no-cc, --no-to, and --no-bccStephen Boyd Sun, 7 Mar 2010 22:46:48 +0000 (14:46 -0800)

send-email: add --no-cc, --no-to, and --no-bcc

There's no way to override the sendemail.to, sendemail.cc, and
sendemail.bcc config settings. Add options allowing the user to tell
git to ignore the config settings and take whatever is on the command
line.

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

format-patch: add --no-cc, --no-to, and --no-add-headersStephen Boyd Sun, 7 Mar 2010 22:46:47 +0000 (14:46 -0800)

format-patch: add --no-cc, --no-to, and --no-add-headers

These new options allow users to override their config settings for
format.cc, format.to and format.headers respectively. These options
only make git ignore the config settings and any previous command line
options, so you'll still have to add more command line options to add
extra headers. For example,

$ cat .git/config
[format]
to = Someone <someone@out.there>
$ git format-patch -1 --no-to --to="Someone Else <else@out.there>"

would format a patch addressed to "Someone Else" and not "Someone".

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

format-patch: use a string_list for headersStephen Boyd Sun, 7 Mar 2010 22:46:46 +0000 (14:46 -0800)

format-patch: use a string_list for headers

In the next patch we'll need to clear the header lists if the user
specifies --no-add-headers or --no-to or --no-cc. This actually cuts
down on the code a bit too.

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

Update draft release notes to 1.7.1Junio C Hamano Mon, 8 Mar 2010 08:54:05 +0000 (00:54 -0800)

Update draft release notes to 1.7.1

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

Merge branch 'maint'Junio C Hamano Mon, 8 Mar 2010 08:52:01 +0000 (00:52 -0800)

Merge branch 'maint'

* maint:
Merge accumulated fixes to prepare for 1.7.0.3

Conflicts:
RelNotes

Merge accumulated fixes to prepare for 1.7.0.3Junio C Hamano Mon, 8 Mar 2010 08:50:24 +0000 (00:50 -0800)

Merge accumulated fixes to prepare for 1.7.0.3

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

Merge branch 'mw/maint-gcc-warns-unused-write' into... Junio C Hamano Mon, 8 Mar 2010 08:36:02 +0000 (00:36 -0800)

Merge branch 'mw/maint-gcc-warns-unused-write' into maint

* mw/maint-gcc-warns-unused-write:
run-command.c: fix build warnings on Ubuntu

Merge branch 'fn/maint-mkdtemp-compat' into maintJunio C Hamano Mon, 8 Mar 2010 08:36:02 +0000 (00:36 -0800)

Merge branch 'fn/maint-mkdtemp-compat' into maint

* fn/maint-mkdtemp-compat:
Fix gitmkdtemp: correct test for mktemp() return value

Merge branch 'gb/maint-submodule-env' into maintJunio C Hamano Mon, 8 Mar 2010 08:36:02 +0000 (00:36 -0800)

Merge branch 'gb/maint-submodule-env' into maint

* gb/maint-submodule-env:
is_submodule_modified(): clear environment properly
submodules: ensure clean environment when operating in a submodule
shell setup: clear_local_git_env() function
rev-parse: --local-env-vars option
Refactor list of of repo-local env vars

Merge branch 'as/maint-expire' into maintJunio C Hamano Mon, 8 Mar 2010 08:36:01 +0000 (00:36 -0800)

Merge branch 'as/maint-expire' into maint

* as/maint-expire:
reflog: honor gc.reflogexpire=never
prune: honor --expire=never

Merge branch 'ml/maint-grep-doc' into maintJunio C Hamano Mon, 8 Mar 2010 08:36:01 +0000 (00:36 -0800)

Merge branch 'ml/maint-grep-doc' into maint

* ml/maint-grep-doc:
grep docs: document --no-index option
grep docs: --cached and <tree>... are incompatible
grep docs: use AsciiDoc literals consistently
grep docs: pluralize "Example" section

Merge branch 'jk/maint-push-tracking-wo-remote' into... Junio C Hamano Mon, 8 Mar 2010 08:36:01 +0000 (00:36 -0800)

Merge branch 'jk/maint-push-tracking-wo-remote' into maint

* jk/maint-push-tracking-wo-remote:
push: fix segfault for odd config

Merge branch 'jc/fetch-param' into maintJunio C Hamano Mon, 8 Mar 2010 08:36:00 +0000 (00:36 -0800)

Merge branch 'jc/fetch-param' into maint

* jc/fetch-param:
fetch --all/--multiple: keep all the fetched branch information
builtin-fetch --all/--multi: propagate options correctly
t5521: fix and modernize

Merge branch 'ne/pack-local-doc' into maintJunio C Hamano Mon, 8 Mar 2010 08:36:00 +0000 (00:36 -0800)

Merge branch 'ne/pack-local-doc' into maint

* ne/pack-local-doc:
pack-objects documentation: Fix --honor-pack-keep as well.
pack-objects documentation: reword "objects that appear in the standard input"
Documentation: pack-objects: Clarify --local's semantics.

Merge branch 'jk/maint-add--interactive-delete' into... Junio C Hamano Mon, 8 Mar 2010 08:36:00 +0000 (00:36 -0800)

Merge branch 'jk/maint-add--interactive-delete' into maint

* jk/maint-add--interactive-delete:
add-interactive: fix bogus diff header line ordering

Merge branch 'mm/mkstemps-mode-for-packfiles' into... Junio C Hamano Mon, 8 Mar 2010 08:36:00 +0000 (00:36 -0800)

Merge branch 'mm/mkstemps-mode-for-packfiles' into maint

* mm/mkstemps-mode-for-packfiles:
Use git_mkstemp_mode instead of plain mkstemp to create object files
git_mkstemps_mode: don't set errno to EINVAL on exit.
Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.
git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.
Move gitmkstemps to path.c
Add a testcase for ACL with restrictive umask.

Merge branch 'jc/maint-fix-mailinfo-strip' into maintJunio C Hamano Mon, 8 Mar 2010 08:35:59 +0000 (00:35 -0800)

Merge branch 'jc/maint-fix-mailinfo-strip' into maint

* jc/maint-fix-mailinfo-strip:
mailinfo: do not strip leading spaces even for a header line

Merge branch 'jc/grep-author-all-match-implicit' into... Junio C Hamano Mon, 8 Mar 2010 08:35:59 +0000 (00:35 -0800)

Merge branch 'jc/grep-author-all-match-implicit' into maint

* jc/grep-author-all-match-implicit:
"log --author=me --grep=it" should find intersection, not union

Merge branch 'jc/checkout-detached' into maintJunio C Hamano Mon, 8 Mar 2010 08:35:59 +0000 (00:35 -0800)

Merge branch 'jc/checkout-detached' into maint

* jc/checkout-detached:
Reword "detached HEAD" notification

Merge branch 'maint-1.6.6' into maintJunio C Hamano Mon, 8 Mar 2010 08:35:58 +0000 (00:35 -0800)

Merge branch 'maint-1.6.6' into maint

* maint-1.6.6:

grep: Colorize selected, context, and function linesMark Lodato Sun, 7 Mar 2010 16:52:47 +0000 (11:52 -0500)

grep: Colorize selected, context, and function lines

Colorize non-matching text of selected lines, context lines, and
function name lines. The default for all three is no color, but they
can be configured using color.grep.<slot>. The first two are similar
to the corresponding options in GNU grep, except that GNU grep applies
the color to the entire line, not just non-matching text.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep: Colorize filename, line number, and separatorMark Lodato Sun, 7 Mar 2010 16:52:46 +0000 (11:52 -0500)

grep: Colorize filename, line number, and separator

Colorize the filename, line number, and separator in git grep output, as
GNU grep does. The colors are customizable through color.grep.<slot>.
The default is to only color the separator (in cyan), since this gives
the biggest legibility increase without overwhelming the user with
colors. GNU grep also defaults cyan for the separator, but defaults to
magenta for the filename and to green for the line number, as well.

There is one difference from GNU grep: When a binary file matches
without -a, GNU grep does not color the <file> in "Binary file <file>
matches", but we do.

Like GNU grep, if --null is given, the null separators are not colored.

For config.txt, use a a sub-list to describe the slots, rather than
a single paragraph with parentheses, since this is much more readable.

Remove the cast to int for `rm_eo - rm_so` since it is not necessary.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/maint-fix-test-perm' into maint-1.6.6Junio C Hamano Sun, 7 Mar 2010 22:54:05 +0000 (14:54 -0800)

Merge branch 'jc/maint-fix-test-perm' into maint-1.6.6

* jc/maint-fix-test-perm:
lib-patch-mode.sh: Fix permission
t6000lib: Fix permission

Merge branch 'sp/maint-push-sideband' into maint-1.6.6Junio C Hamano Sun, 7 Mar 2010 22:54:01 +0000 (14:54 -0800)

Merge branch 'sp/maint-push-sideband' into maint-1.6.6

* sp/maint-push-sideband:
receive-pack: Send internal errors over side-band #2
t5401: Use a bare repository for the remote peer
receive-pack: Send hook output over side band #2
receive-pack: Wrap status reports inside side-band-64k
receive-pack: Refactor how capabilities are shown to the client
send-pack: demultiplex a sideband stream with status data
run-command: support custom fd-set in async
run-command: Allow stderr to be a caller supplied pipe

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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