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

Git 1.6.5.8

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

rev-parse --branches/--tags/--remotes=patternIlari Liusvaara Wed, 20 Jan 2010 09:48:26 +0000 (11:48 +0200)

rev-parse --branches/--tags/--remotes=pattern

Since local branch, tags and remote tracking branch namespaces are
most often used, add shortcut notations for globbing those in
manner similar to --glob option.

With this, one can express the "what I have but origin doesn't?"
as:

'git log --branches --not --remotes=origin'

Original-idea-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rev-parse --globIlari Liusvaara Wed, 20 Jan 2010 09:48:25 +0000 (11:48 +0200)

rev-parse --glob

Add --glob=<glob-pattern> option to rev-parse and everything that
accepts its options. This option matches all refs that match given
shell glob pattern (complete with some DWIM logic).

Example:

'git log --branches --not --glob=remotes/origin'

To show what you have that origin doesn't.

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

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

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

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

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

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

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

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

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

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

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

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

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

Teach @{upstream} syntax to strbuf_branchanme()Junio C Hamano Wed, 20 Jan 2010 07:17:11 +0000 (23:17 -0800)

Teach @{upstream} syntax to strbuf_branchanme()

This teaches @{upstream} syntax to interpret_branch_name(), instead
of dwim_ref() machinery.

There are places in git UI that behaves differently when you give a local
branch name and when you give an extended SHA-1 expression that evaluates
to the commit object name at the tip of the branch. The intent is that
the special syntax such as @{-1} can stand in as if the user spelled the
name of the branch in such places.

The name of the branch "frotz" to switch to ("git checkout frotz"), and
the name of the branch "nitfol" to fork a new branch "frotz" from ("git
checkout -b frotz nitfol"), are examples of such places. These places
take only the name of the branch (e.g. "frotz"), and they are supposed to
act differently to an equivalent refname (e.g. "refs/heads/frotz"), so
hooking the @{upstream} and @{-N} syntax to dwim_ref() is insufficient
when we want to deal with cases a local branch is forked from another
local branch and use "forked@{upstream}" to name the forkee branch.

The "upstream" syntax "forked@{u}" is to specify the ref that "forked" is
configured to merge with, and most often the forkee is a remote tracking
branch, not a local branch. We cannot simply return a local branch name,
but that does not necessarily mean we have to returns the full refname
(e.g. refs/remotes/origin/frotz, when returning origin/frotz is enough).
This update calls shorten_unambiguous_ref() to do so.

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

t1506: more test for @{upstream} syntaxJunio C Hamano Wed, 20 Jan 2010 09:08:48 +0000 (01:08 -0800)

t1506: more test for @{upstream} syntax

This adds a few more tests that exercises @{upstream} syntax by commands
that operate differently when they are given branch name as opposed to a
refname (i.e. where "master" and "refs/heads/master" makes a difference).

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

Fix "checkout A..." synonym for "checkout A...HEAD... Junio C Hamano Wed, 20 Jan 2010 03:30:06 +0000 (19:30 -0800)

Fix "checkout A..." synonym for "checkout A...HEAD" on Windows

When switching to a different commit, we first see the named rev exists
as a commit using lookup_commit_reference_gently(), and set new.path to
a string "refs/heads/" followed by the name the user gave us (but after
taking into special short-hands like @{-1} == "previous branch" and
"@{upstream}" == "the branch we merge with" into account). If the
resulting string names an existsing ref, then we are switching to that
branch (and will be building new commits on top of it); otherwise we are
detaching HEAD at that commit.

When the "master..." syntax is used as a short-hand for "master...HEAD",
we do want to detach HEAD at the merge base. However, on Windows, when
asked if ".git/refs/heads/master..." exists, the filesystem happily says
"it does" when ".git/refs/heads/master" exists.

Work this issue around by first calling check_ref_format(new.path) to see
if the string can possibly be a valid ref under "refs/heads/", before
asking resolve_ref().

We used to run another lookup_commit_reference(rev) even though we know it
succeeded and we have a good commit in new.commit already; this has been
with us from 782c2d6 (Build in checkout, 2008-02-07), the first version we
had "git checkout" implemented in C. Drop it.

Noticed by Alex Riesen.

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

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

status: don't require the repository to be writable

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

Discovery and initial attempted fix by Dscho.

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

Merge branch 'maint'Junio C Hamano Wed, 20 Jan 2010 00:57:10 +0000 (16:57 -0800)

Merge branch 'maint'

* maint:
bisect: fix singular/plural grammar nit

Makefile: honor NO_CURL when setting REMOTE_CURL_*... Johannes Sixt Tue, 19 Jan 2010 15:39:12 +0000 (16:39 +0100)

Makefile: honor NO_CURL when setting REMOTE_CURL_* variables

Previously, these variables were set before there was a chance to set
NO_CURL.

This made a difference only during 'make install', because by installing
$(REMOTE_CURL_ALIASES), the rule tries to access $(REMOTE_CURL_PRIMARY),
which was never installed. On Windows, this fails; on Unix, stale symbolic
links are created.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ident.c: replace fprintf with fputs to suppress compile... Tarmigan Casebolt Sun, 17 Jan 2010 08:19:24 +0000 (00:19 -0800)

ident.c: replace fprintf with fputs to suppress compiler warning

Compiling today's pu gave
...
CC ident.o
CC levenshtein.o
ident.c: In function 'fmt_ident':
ident.c:206: warning: format not a string literal and no format arguments
CC list-objects.o
...

This warning seems to have appeared first in 18e95f279ec6 (ident.c:
remove unused variables) which removed additional fprintf arguments.

Suppress this warning by using fputs instead of fprintf.

Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rm: only refresh entries that we may touchNguyễn Thái Ngọc Duy Sun, 17 Jan 2010 08:43:13 +0000 (15:43 +0700)

rm: only refresh entries that we may touch

This gets rid of the whole tree cache refresh. Instead only path that
we touch will get refreshed. We may still lstat() more than needed,
but it'd be better playing safe.

This potentially reduces a large number of lstat() on big trees. Take
gentoo-x86 tree for example, which has roughly 80k files:

Unmodified Git:

$ time git rm --cached skel.ebuild
rm 'skel.ebuild'

real 0m1.441s
user 0m0.821s
sys 0m0.531s

Modified Git:

$ time ~/w/git/git rm --cached skel.ebuild
rm 'skel.ebuild'

real 0m0.941s
user 0m0.828s
sys 0m0.091s

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

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

bisect: fix singular/plural grammar nit

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

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

cvsimport: standarize system() calls to external git... Ben Walton Tue, 19 Jan 2010 19:03:10 +0000 (14:03 -0500)

cvsimport: standarize system() calls to external git tools

This patch standardizes calls to system() where external git tools are
called. Instead of system("git foo ... "), use system(qw(git foo ...)).
All calls are made without the use of an 'sh -c' process to split the
arguments.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsimport: standarize open() calls to external git... Ben Walton Tue, 19 Jan 2010 19:03:09 +0000 (14:03 -0500)

cvsimport: standarize open() calls to external git tools

Standardize calls to open() where external git tools are used as
part of a pipeline. Instead of open(X, "git foo ... |)", use
open(X, "-|", qw(git foo ...)). All calls are made without the
use of an 'sh -c' process to split the arguments.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsimport: modernize callouts to git subcommandsBen Walton Tue, 19 Jan 2010 19:03:08 +0000 (14:03 -0500)

cvsimport: modernize callouts to git subcommands

This patch updates all calling conventions for external git tools. to
use the modern calling convention (eg: git foo instead of git-foo).
This is almost entierly a s/git-/git / operation, with deviations only
as required to keep tests passing.

Reported-by: Alexander Maier <amaier@opencsw.org>
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

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

Merge branch 'maint-1.6.4' into maint-1.6.5

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

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

Merge branch 'maint-1.6.3' into maint-1.6.4

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

Conflicts:
builtin-commit.c

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

Merge branch 'maint-1.6.2' into maint-1.6.3

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

Conflicts:
diff.c

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

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

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

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

Fix mis-backport of t7002

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

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

This should fix it.

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

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

Update draft release notes to 1.7.0

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

Merge branch 'maint'Junio C Hamano Tue, 19 Jan 2010 02:16:19 +0000 (18:16 -0800)

Merge branch 'maint'

* maint:
Update draft release notes to 1.6.6.1
grep: NUL terminate input from a file
fast-import: tag may point to any object type

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

Update draft release notes to 1.6.6.1

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

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

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

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

Merge branch 'jc/rerere'Junio C Hamano Tue, 19 Jan 2010 02:13:01 +0000 (18:13 -0800)

Merge branch 'jc/rerere'

* jc/rerere:
Teach --[no-]rerere-autoupdate option to merge, revert and friends

Merge branch 'pc/uninteresting-submodule-disappear... Junio C Hamano Tue, 19 Jan 2010 02:12:57 +0000 (18:12 -0800)

Merge branch 'pc/uninteresting-submodule-disappear-upon-switch-branches'

* pc/uninteresting-submodule-disappear-upon-switch-branches:
Remove empty directories when checking out a commit with fewer submodules

Merge branch 'nd/include-termios-for-osol'Junio C Hamano Tue, 19 Jan 2010 02:12:53 +0000 (18:12 -0800)

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

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

Merge branch 'js/windows'Junio C Hamano Tue, 19 Jan 2010 02:12:49 +0000 (18:12 -0800)

Merge branch 'js/windows'

* js/windows:
Do not use date.c:tm_to_time_t() from compat/mingw.c
MSVC: Windows-native implementation for subset of Pthreads API
MSVC: Fix an "incompatible pointer types" compiler warning
Windows: avoid the "dup dance" when spawning a child process
Windows: simplify the pipe(2) implementation
Windows: boost startup by avoiding a static dependency on shell32.dll
Windows: disable Python

branch: warn and refuse to set a branch as a tracking... Matthieu Moy Mon, 18 Jan 2010 20:44:12 +0000 (22:44 +0200)

branch: warn and refuse to set a branch as a tracking branch of itself.

Previous patch allows commands like "git branch --set-upstream foo foo",
which doesn't make much sense. Warn the user and don't change the
configuration in this case. Don't die to let the caller finish its job in
such case.

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

Performance optimization for detection of modified... Jens Lehmann Mon, 18 Jan 2010 20:26:18 +0000 (21:26 +0100)

Performance optimization for detection of modified submodules

In the worst case is_submodule_modified() got called three times for
each submodule. The information we got from scanning the whole
submodule tree the first time can be reused instead.

New parameters have been added to diff_change() and diff_addremove(),
the information is stored in a new member of struct diff_filespec. Its
value is then reused instead of calling is_submodule_modified() again.

When no explicit "-dirty" is needed in the output the call to
is_submodule_modified() is not necessary when the submodules HEAD
already disagrees with the ref of the superproject, as this alone
marks it as modified. To achieve that, get_stat_data() got an extra
argument.

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

Add branch --set-upstreamIlari Liusvaara Mon, 18 Jan 2010 20:44:11 +0000 (22:44 +0200)

Add branch --set-upstream

Add --set-upstream option to branch that works like --track, except that
when branch exists already, its upstream info is changed without changing
the ref value.

Based-on-patch-from: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-apply.c: fix the --- and +++ header filename... Andreas Gruenbacher Mon, 18 Jan 2010 21:37:38 +0000 (22:37 +0100)

builtin-apply.c: fix the --- and +++ header filename consistency check

gitdiff_verify_name() only did a filename prefix check because of an
off-by-one error.

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

Add git remote set-urlIlari Liusvaara Mon, 18 Jan 2010 17:18:02 +0000 (19:18 +0200)

Add git remote set-url

Add 'git remote set-url' for changing URL of remote repository with
one "porcelain-level" command.

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

Replace parse_blob() with an explanatory commentDaniel Barkalow Mon, 18 Jan 2010 18:06:28 +0000 (13:06 -0500)

Replace parse_blob() with an explanatory comment

parse_blob() has never actually been used; it has served simply to
avoid having a confusing gap in the API. Instead of leaving it, put in
a comment that explains what "parsing a blob" entails (making sure the
object is actually readable), and why code might care whether a blob
has been parsed or not.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

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

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

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

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

grep: NUL terminate input from a file

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

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

builtin-apply.c: Skip filenames without enough componentsAndreas Gruenbacher Sun, 17 Jan 2010 02:05:10 +0000 (03:05 +0100)

builtin-apply.c: Skip filenames without enough components

find_name() wrongly returned the whole filename for filenames without
enough leading pathname components (e.g., when applying a patch to a
top-level file with -p2).

Include the -p value used in the error message when no filenames can be
found.

[jc: squashed a test from Nanako Shiraishi]

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

symlinks.c: remove unused functionsJunio C Hamano Tue, 12 Jan 2010 05:18:20 +0000 (21:18 -0800)

symlinks.c: remove unused functions

invalidate_lstat_cache() and clear_lstat_cache() are not used anywhere.

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

object.c: remove unused functionsJunio C Hamano Tue, 12 Jan 2010 05:15:12 +0000 (21:15 -0800)

object.c: remove unused functions

object_list_append() and object_list_length}() are not used anywhere.

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

Document that merge strategies can now take their own... Junio C Hamano Fri, 18 Jul 2008 09:43:00 +0000 (02:43 -0700)

Document that merge strategies can now take their own options

Also document the recently added -Xtheirs, -Xours and -Xsubtree[=path]
options to the merge-recursive strategy.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Extend merge-subtree tests to test -Xsubtree=dir.Avery Pennarun Thu, 26 Nov 2009 02:23:59 +0000 (21:23 -0500)

Extend merge-subtree tests to test -Xsubtree=dir.

This tests the configurable -Xsubtree feature of merge-recursive.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make "subtree" part more orthogonal to the rest of... Junio C Hamano Tue, 1 Jul 2008 05:18:57 +0000 (22:18 -0700)

Make "subtree" part more orthogonal to the rest of merge-recursive.

This makes "subtree" more orthogonal to the rest of recursive merge, so
that you can use subtree and ours/theirs features at the same time. For
example, you can now say:

git merge -s subtree -Xtheirs other

to merge with "other" branch while shifting it up or down to match the
shape of the tree of the current branch, and resolving conflicts favoring
the changes "other" branch made over changes made in the current branch.

It also allows the prefix used to shift the trees to be specified using
the "-Xsubtree=$prefix" option. Giving an empty prefix tells the command
to figure out how much to shift trees automatically as we have always
done. "merge -s subtree" is the same as "merge -s recursive -Xsubtree="
(or "merge -s recursive -Xsubtree").

Based on an old patch done back in the days when git-merge was a script;
Avery ported the script part to builtin-merge.c. Bugs in shift_tree()
is mine.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull: Fix parsing of -X<option>Junio C Hamano Mon, 18 Jan 2010 06:31:38 +0000 (22:31 -0800)

pull: Fix parsing of -X<option>

As -X parameter can contain arbitrary $IFS characters, we need to
properly quote it from the shell while forming the command line.

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

Teach git-pull to pass -X<option> to git-mergeAvery Pennarun Thu, 26 Nov 2009 02:23:57 +0000 (21:23 -0500)

Teach git-pull to pass -X<option> to git-merge

This needs the usual sq then eval trick to allow IFS characters
in the option.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git merge -X<option>Avery Pennarun Thu, 26 Nov 2009 02:23:55 +0000 (21:23 -0500)

git merge -X<option>

Teach "-X <option>" command line argument to "git merge" that is passed to
strategy implementations. "ours" and "theirs" autoresolution introduced
by the previous commit can be asked to the recursive strategy.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.0Junio C Hamano Mon, 18 Jan 2010 00:47:48 +0000 (16:47 -0800)

Update draft release notes to 1.7.0

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

Merge branch 'tc/test-locate-httpd'Junio C Hamano Mon, 18 Jan 2010 00:00:13 +0000 (16:00 -0800)

Merge branch 'tc/test-locate-httpd'

* tc/test-locate-httpd:
t/lib-http.sh: Restructure finding of default httpd location

Merge branch 'jh/commit-status'Junio C Hamano Mon, 18 Jan 2010 00:00:07 +0000 (16:00 -0800)

Merge branch 'jh/commit-status'

* jh/commit-status:
t7502: test commit.status, --status and --no-status
commit: support commit.status, --status, and --no-status

Conflicts:
Documentation/git-commit.txt
builtin-commit.c

Merge branch 'jn/makefile'Junio C Hamano Sun, 17 Jan 2010 23:59:44 +0000 (15:59 -0800)

Merge branch 'jn/makefile'

* jn/makefile:
Makefile: consolidate .FORCE-* targets
Makefile: learn to generate listings for targets requiring special flags
Makefile: use target-specific variable to pass flags to cc
Makefile: regenerate assembler listings when asked

Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge'Junio C Hamano Sun, 17 Jan 2010 23:59:40 +0000 (15:59 -0800)

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

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

Conflicts:
t/t7201-co.sh

Merge branch 'tc/clone-v-progress'Junio C Hamano Sun, 17 Jan 2010 23:58:58 +0000 (15:58 -0800)

Merge branch 'tc/clone-v-progress'

* tc/clone-v-progress:
clone: use --progress to force progress reporting
clone: set transport->verbose when -v/--verbose is used
git-clone.txt: reword description of progress behaviour
check stderr with isatty() instead of stdout when deciding to show progress

Conflicts:
transport.c

Merge branch 'tc/smart-http-restrict'Junio C Hamano Sun, 17 Jan 2010 23:58:23 +0000 (15:58 -0800)

Merge branch 'tc/smart-http-restrict'

* tc/smart-http-restrict:
Test t5560: Fix test when run with dash
Smart-http tests: Test http-backend without curl or a webserver
Smart-http tests: Break test t5560-http-backend into pieces
Smart-http tests: Improve coverage in test t5560
Smart-http: check if repository is OK to export before serving it

Merge branch 'jk/run-command-use-shell'Junio C Hamano Sun, 17 Jan 2010 23:58:15 +0000 (15:58 -0800)

Merge branch 'jk/run-command-use-shell'

* jk/run-command-use-shell:
t4030, t4031: work around bogus MSYS bash path conversion
diff: run external diff helper with shell
textconv: use shell to run helper
editor: use run_command's shell feature
run-command: optimize out useless shell calls
run-command: convert simple callsites to use_shell
t0021: use $SHELL_PATH for the filter script
run-command: add "use shell" option

Merge branch 'sr/gfi-options'Junio C Hamano Sun, 17 Jan 2010 23:58:11 +0000 (15:58 -0800)

Merge branch 'sr/gfi-options'

* sr/gfi-options:
fast-import: add (non-)relative-marks feature
fast-import: allow for multiple --import-marks= arguments
fast-import: test the new option command
fast-import: add option command
fast-import: add feature command
fast-import: put marks reading in its own function
fast-import: put option parsing code in separate functions

git status: Show uncommitted submodule changes too... Jens Lehmann Sun, 17 Jan 2010 19:42:31 +0000 (20:42 +0100)

git status: Show uncommitted submodule changes too when enabled

When the configuration variable status.submodulesummary is not 0 or
false, "git status" shows the submodule summary of the staged submodule
commits. But it did not show the summary of those commits not yet
staged in the supermodule, making it hard to see what will not be
committed.

The output of "submodule summary --for-status" has been changed from
"# Modified submodules:" to "# Submodule changes to be committed:" for
the already staged changes. "# Submodules changed but not updated:" has
been added for changes that will not be committed. This is much clearer
and consistent with the output for regular files.

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

Update COPYING with GPLv2 with new FSF addressJunio C Hamano Sat, 16 Jan 2010 05:38:34 +0000 (21:38 -0800)

Update COPYING with GPLv2 with new FSF address

The mailing address of FSF changed quite a while ago. Also the expansion
of the acronym LGPL (which we don't use) is "Lesser GPL" not "Library GPL"
these days in recent copies of GPLv2. Update the copy we have with a
fresh download of <http://www.gnu.org/licenses/gpl-2.0.txt>.

This incidentally removes form-feeds in the text we retained for all these
years.

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

user_ident_sufficiently_given(): refactor the logic... Junio C Hamano Sun, 17 Jan 2010 21:59:36 +0000 (13:59 -0800)

user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere

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

user_ident_sufficiently_given(): refactor the logic... Junio C Hamano Sun, 17 Jan 2010 21:54:28 +0000 (13:54 -0800)

user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere

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

rerere: honor conflict-marker-size attributeJunio C Hamano Sun, 17 Jan 2010 07:28:46 +0000 (23:28 -0800)

rerere: honor conflict-marker-size attribute

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

rerere: prepare for customizable conflict marker lengthJunio C Hamano Sun, 17 Jan 2010 07:06:45 +0000 (23:06 -0800)

rerere: prepare for customizable conflict marker length

This still uses the hardcoded conflict marker length of 7 but otherwise
prepares the codepath to deal with customized marker length.

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

commit.c::print_summary: do not release the format... Junio C Hamano Sun, 17 Jan 2010 08:57:51 +0000 (00:57 -0800)

commit.c::print_summary: do not release the format string too early

When we are showing a clean merge, log_tree_commit() won't show the header
and we would need the format string to format the commit summary ourselves.

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

conflict-marker-size: new attributeJunio C Hamano Sat, 16 Jan 2010 06:37:32 +0000 (22:37 -0800)

conflict-marker-size: new attribute

This can be specified to set the length of the conflict marker (usually 7)
to a non-default value per path. Only the callers of ll_merge() that are
aware of the per-path attributes are modified.

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

rerere: use ll_merge() instead of using xdl_merge()Junio C Hamano Sat, 16 Jan 2010 06:50:01 +0000 (22:50 -0800)

rerere: use ll_merge() instead of using xdl_merge()

This allows us to pay attention to the attribute settings and custom
merge driver the user sets up.

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

merge-tree: use ll_merge() not xdl_merge()Junio C Hamano Sun, 17 Jan 2010 05:45:40 +0000 (21:45 -0800)

merge-tree: use ll_merge() not xdl_merge()

ll_merge() interface was designed to merge contents under git control
while taking per-path attributes into account. Update the three-way
merge implementation used by merge-tree to use it.

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

xdl_merge(): allow passing down marker_size in xmparam_tJunio C Hamano Sun, 17 Jan 2010 05:30:18 +0000 (21:30 -0800)

xdl_merge(): allow passing down marker_size in xmparam_t

This allows the callers of xdl_merge() to pass marker_size (defaults to 7)
in xmparam_t argument, to use conflict markers of non-default length.

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

xdl_merge(): introduce xmparam_t for merge specific... Junio C Hamano Sun, 17 Jan 2010 05:01:28 +0000 (21:01 -0800)

xdl_merge(): introduce xmparam_t for merge specific parameters

So far we have only needed to be able to pass an option that is generic to
xdiff family of functions to this function. Extend the interface so that
we can give it merge specific parameters.

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

git_attr(): fix function signatureJunio C Hamano Sun, 17 Jan 2010 04:39:59 +0000 (20:39 -0800)

git_attr(): fix function signature

The function took (name, namelen) as its arguments, but all the public
callers wanted to pass a full string.

Demote the counted-string interface to an internal API status, and allow
public callers to just pass the string to the function.

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

Do not use date.c:tm_to_time_t() from compat/mingw.cJohannes Sixt Fri, 15 Jan 2010 20:12:21 +0000 (21:12 +0100)

Do not use date.c:tm_to_time_t() from compat/mingw.c

To implement gettimeofday(), a broken-down UTC time was requested from the
system using GetSystemTime(), then tm_to_time_t() was used to convert it
to a time_t because it does not look at the current timezone, which
mktime() would do.

Use GetSystemTimeAsFileTime() and a different conversion path to avoid this
back-reference from the compatibility layer to the generic code.

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

MSVC: Windows-native implementation for subset of Pthre... Andrzej K. Haczewski Fri, 15 Jan 2010 20:12:20 +0000 (21:12 +0100)

MSVC: Windows-native implementation for subset of Pthreads API

This patch implements native to Windows subset of pthreads API used by Git.
It allows to remove Pthreads for Win32 dependency for MSVC, msysgit and
Cygwin.

[J6t: If the MinGW build was built as part of the msysgit build
environment, then threading was already enabled because the
pthreads-win32 package is available in msysgit. With this patch, we can now
enable threaded code unconditionally.]

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

Merge branch 'maint'Junio C Hamano Sun, 17 Jan 2010 01:30:18 +0000 (17:30 -0800)

Merge branch 'maint'

* maint:
Fix uninitialized variable in get_refs_via_rsync().
Document git-blame triple -C option

Merge branch 'cc/reset-more'Junio C Hamano Sun, 17 Jan 2010 01:18:01 +0000 (17:18 -0800)

Merge branch 'cc/reset-more'

* cc/reset-more:
t7111: fix bad HEAD in tests with unmerged entries

Documentation: Update git core tutorial clarifying... Ramkumar Ramachandra Sat, 16 Jan 2010 18:05:38 +0000 (23:35 +0530)

Documentation: Update git core tutorial clarifying reference to scripts

Back when the git core tutorial was written, porcelain commands were
shell scripts. This patch adds a paragraph explaining this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

MSVC: Fix an "incompatible pointer types" compiler... Ramsay Jones Fri, 15 Jan 2010 20:12:19 +0000 (21:12 +0100)

MSVC: Fix an "incompatible pointer types" compiler warning

In particular, the following warning is issued while compiling
compat/msvc.c:

...mingw.c(223) : warning C4133: 'function' : incompatible \
types - from '_stati64 *' to '_stat64 *'

which relates to a call of _fstati64() in the mingw_fstat()
function definition.

This is caused by various layers of macro magic and attempts to
avoid macro redefinition compiler warnings. For example, the call
to _fstati64() mentioned above is actually a call to _fstat64(),
and expects a pointer to a struct _stat64 rather than the struct
_stati64 which is passed to mingw_fstat().

The definition of struct _stati64 given in compat/msvc.h had the
same "shape" as the definition of struct _stat64, so the call to
_fstat64() does not actually cause any runtime errors, but the
structure types are indeed incompatible.

In order to avoid the compiler warning, we add declarations for the
mingw_lstat() and mingw_fstat() functions and supporting macros to
msvc.h, suppressing the corresponding declarations in mingw.h, so
that we can use the appropriate structure type (and function) names
from the msvc headers.

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

Windows: avoid the "dup dance" when spawning a child... Johannes Sixt Fri, 15 Jan 2010 20:12:18 +0000 (21:12 +0100)

Windows: avoid the "dup dance" when spawning a child process

When stdin, stdout, or stderr must be redirected for a child process that
on Windows is spawned using one of the spawn() functions of Microsoft's
C runtime, then there is no choice other than to

1. make a backup copy of fd 0,1,2 with dup
2. dup2 the redirection source fd into 0,1,2
3. spawn
4. dup2 the backup back into 0,1,2
5. close the backup copy and the redirection source

We used this idiom as well -- but we are not using the spawn() functions
anymore!

Instead, we have our own implementation. We had hardcoded that stdin,
stdout, and stderr of the child process were inherited from the parent's
fds 0, 1, and 2. But we can actually specify any fd.

With this patch, the fds to inherit are passed from start_command()'s
WIN32 section to our spawn implementation. This way, we can avoid the
backup copies of the fds.

The backup copies were a bug waiting to surface: The OS handles underlying
the dup()ed fds were inherited by the child process (but were not
associated with a file descriptor in the child). Consequently, the file or
pipe represented by the OS handle remained open even after the backup copy
was closed in the parent process until the child exited.

Since our implementation of pipe() creates non-inheritable OS handles, we
still dup() file descriptors in start_command() because dup() happens to
create inheritable duplicates. (A nice side effect is that the fd cleanup
in start_command is the same for Windows and Unix and remains unchanged.)

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

Windows: simplify the pipe(2) implementationJohannes Sixt Fri, 15 Jan 2010 20:12:17 +0000 (21:12 +0100)

Windows: simplify the pipe(2) implementation

Our implementation of pipe() must create non-inheritable handles for the
reason that when a child process is started, there is no opportunity to
close the unneeded pipe ends in the child (on POSIX this is done between
fork() and exec()).

Previously, we used the _pipe() function provided by Microsoft's C runtime
(which creates inheritable handles) and then turned the handles into
non-inheritable handles using the DuplicateHandle() API.

Simplify the procedure by using the CreatePipe() API, which can create
non-inheritable handles right from the beginning.

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

Windows: boost startup by avoiding a static dependency... Johannes Sixt Fri, 15 Jan 2010 20:12:16 +0000 (21:12 +0100)

Windows: boost startup by avoiding a static dependency on shell32.dll

This DLL is only needed to invoke the browser in a "git help" call. By
looking up the only function that we need at runtime, we can avoid the
startup costs of this DLL.

DLL usage can be profiled with Microsoft's Dependency Walker. For example,
a call to "git diff-files" loaded

before: 19 DLLs
after: 9 DLLs

As a result, the runtime of 'make -j2 test' went down from 16:00min
to 12:40min on one of my boxes.

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

Windows: disable PythonErik Faye-Lund Fri, 15 Jan 2010 20:12:15 +0000 (21:12 +0100)

Windows: disable Python

Python is not commonly installed on Windows machines, so
we should disable it there by default.

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

Teach diff that modified submodule directory is dirtyJunio C Hamano Sat, 16 Jan 2010 17:42:53 +0000 (18:42 +0100)

Teach diff that modified submodule directory is dirty

A diff run in superproject only compares the name of the commit object
bound at the submodule paths. When we compare with a work tree and the
checked out submodule directory is dirty (e.g. has either staged or
unstaged changes, or has new files the user forgot to add to the index),
show the work tree side as "dirty".

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

Show submodules as modified when they contain a dirty... Jens Lehmann Sat, 16 Jan 2010 17:42:24 +0000 (18:42 +0100)

Show submodules as modified when they contain a dirty work tree

Until now a submodule only then showed up as modified in the supermodule
when the last commit in the submodule differed from the one in the index
or the diffed against commit of the superproject. A dirty work tree
containing new untracked or modified files in a submodule was
undetectable when looking at it from the superproject.

Now git status and git diff (against the work tree) in the superproject
will also display submodules as modified when they contain untracked or
modified files, even if the compared ref matches the HEAD of the
submodule.

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

Add push --set-upstreamIlari Liusvaara Sat, 16 Jan 2010 21:45:31 +0000 (23:45 +0200)

Add push --set-upstream

Frequent complaint is lack of easy way to set up upstream (tracking)
references for git pull to work as part of push command. So add switch
--set-upstream (-u) to do just that.

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

t7111: fix bad HEAD in tests with unmerged entriesChristian Couder Sat, 16 Jan 2010 09:20:26 +0000 (10:20 +0100)

t7111: fix bad HEAD in tests with unmerged entries

When testing what happens on unmerged entries, the HEAD is the
commit we are starting from before the merge that fails and create
the unmerged entries. It is not the commit before.

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

difftool: Update copyright notices to list each year... David Aguilar Sat, 16 Jan 2010 03:10:03 +0000 (19:10 -0800)

difftool: Update copyright notices to list each year separately

This is http://www.gnu.org/licenses/gpl-howto.html advises.

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

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

Fix uninitialized variable in get_refs_via_rsync().

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

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

Test t5560: Fix test when run with dashTarmigan Casebolt Fri, 15 Jan 2010 06:44:02 +0000 (22:44 -0800)

Test t5560: Fix test when run with dash

A command invocation preceded by variable assignments, i.e.

VAR1=VAL1 VAR2=VAL2 ... command args

are implemented by dash and ksh in such a way not to export these
variables, and keep the values after the command finishes, when the
command is a shell function. POSIX.1 "2.9.5 Function Definition Command"
specifies this behaviour.

Many shells however treat this construct the same way as they are calling
external commands. They export the variables during the duration of
command, and resets their values after command returns.

The test relied on the behaviour of the latter kind.

Reported-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

status: only touch path we may need to checkNguyễn Thái Ngọc Duy Thu, 14 Jan 2010 15:02:21 +0000 (22:02 +0700)

status: only touch path we may need to check

This patch gets rid of whole-tree cache refresh and untracked file
search. Instead only specified path will be looked at.

Again some numbers on gentoo-x86, ~80k files:

Unmodified Git:

$ time git st eclass/
nothing to commit (working directory clean)

real 0m3.211s
user 0m1.977s
sys 0m1.135s

Modified Git:

$ time ~/w/git/git st eclass/
nothing to commit (working directory clean)

real 0m1.587s
user 0m1.426s
sys 0m0.111s

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

difftool: Use eval to expand '--extcmd' expressionsDavid Aguilar Fri, 15 Jan 2010 22:03:44 +0000 (14:03 -0800)

difftool: Use eval to expand '--extcmd' expressions

It was not possible to pass quoted commands to '--extcmd'.
By using 'eval' we ensure that expressions with spaces and
quotes are supported.

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

difftool: Add '-x' and as an alias for '--extcmd'David Aguilar Fri, 15 Jan 2010 22:03:43 +0000 (14:03 -0800)

difftool: Add '-x' and as an alias for '--extcmd'

This adds '-x' as a shorthand for the '--extcmd' option.
Arguments to '--extcmd' can be specified separately, which
was not originally possible.

This also fixes the brief help text so that it mentions
both '-x' and '--extcmd'.

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

t7800-difftool.sh: Simplify the --extcmd testDavid Aguilar Fri, 15 Jan 2010 22:03:42 +0000 (14:03 -0800)

t7800-difftool.sh: Simplify the --extcmd test

Instead of running 'grep', 'echo', and 'wc' we simply compare
git-difftool's output against a known good value.

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

grep --no-index: allow use of "git grep" outside a... Junio C Hamano Fri, 15 Jan 2010 20:52:40 +0000 (12:52 -0800)

grep --no-index: allow use of "git grep" outside a git repository

Just like some people wanted diff features that are not found in
other people's diff implementations outside of a git repository
and added --no-index mode to the command, this adds --no-index mode
to the "git grep" command.

Also, inside a git repository, --no-index mode allows you to grep
in untracked (but not ignored) files.

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

grep: prepare to run outside of a work treeJunio C Hamano Fri, 15 Jan 2010 20:50:54 +0000 (12:50 -0800)

grep: prepare to run outside of a work tree

This moves the call to setup_git_directory() for running "grep" from
the "git" wrapper to the implementation of the "grep" subcommand. A
new variable "use_index" is always true at this stage in the series,
and when it is on, we require that we are in a directory that is under
git control. To make sure we die the same way, we make a second call
into setup_git_directory() when we detect this situation.

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

Document git-blame triple -C optionRamkumar Ramachandra Fri, 8 Jan 2010 18:48:07 +0000 (00:18 +0530)

Document git-blame triple -C option

Lift the explanation of -CCC option in the source to the documentation.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: tag may point to any object typeDmitry Potapov Thu, 14 Jan 2010 04:44:19 +0000 (07:44 +0300)

fast-import: tag may point to any object type

If you tried to export the official git repository, and then to import it
back then git-fast-import would die complaining that "Mark :1 not a commit".

Accordingly to a generated crash file, Mark 1 is not a commit but a blob,
which is pointed by junio-gpg-pub tag. Because git-tag allows to create such
tags, git-fast-import should import them.

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

commit: allow suppression of implicit identity adviceJeff King Wed, 13 Jan 2010 20:17:08 +0000 (15:17 -0500)

commit: allow suppression of implicit identity advice

We now nag the user with a giant warning when their identity
was pulled from the username, hostname, and gecos
information, in case it is not correct. Most users will
suppress this by simply setting up their information
correctly.

However, there may be some users who consciously want to use
that information, because having the value change from host
to host contains useful information. These users can now set
advice.implicitidentity to false to suppress the message.

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

commit: show interesting ident information in summaryJeff King Wed, 13 Jan 2010 17:39:51 +0000 (12:39 -0500)

commit: show interesting ident information in summary

There are a few cases of user identity information that we consider
interesting:

(1) When the author and committer identities do not match.

(2) When the committer identity was picked automatically from the
username, hostname and GECOS information.

In these cases, we already show the information in the commit
message template. However, users do not always see that template
because they might use "-m" or "-F". With this patch, we show these
interesting cases after the commit, along with the subject and
change summary. The new output looks like:

$ git commit \
-m "federalist papers" \
--author='Publius <alexander@hamilton.com>'
[master 3d226a7] federalist papers
Author: Publius <alexander@hamilton.com>
1 files changed, 1 insertions(+), 0 deletions(-)

for case (1), and:

$ git config --global --unset user.name
$ git config --global --unset user.email
$ git commit -m foo
[master 7c2a927] foo
Committer: Jeff King <peff@c-71-185-130-222.hsd1.va.comcast.net>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

git config --global user.name Your Name
git config --global user.email you@example.com

If the identity used for this commit is wrong, you can fix it with:

git commit --amend --author='Your Name <you@example.com>'

1 files changed, 1 insertions(+), 0 deletions(-)

for case (2).

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

strbuf: add strbuf_addbuf_percentquoteJeff King Wed, 13 Jan 2010 17:36:42 +0000 (12:36 -0500)

strbuf: add strbuf_addbuf_percentquote

This is handy for creating strings which will be fed to printf() or
strbuf_expand().

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

strbuf_expand: convert "%%" to "%"Jeff King Wed, 13 Jan 2010 17:35:31 +0000 (12:35 -0500)

strbuf_expand: convert "%%" to "%"

The only way to safely quote arbitrary text in a pretty-print user
format is to replace instances of "%" with "%x25". This is slightly
unreadable, and many users would expect "%%" to produce a single
"%", as that is what printf format specifiers do.

This patch converts "%%" to "%" for all users of strbuf_expand():

(1) git-daemon interpolated paths

(2) pretty-print user formats

(3) merge driver command lines

Case (1) was already doing the conversion itself outside of
strbuf_expand(). Case (2) is the intended beneficiary of this patch.
Case (3) users probably won't notice, but as this is user-facing
behavior, consistently providing the quoting mechanism makes sense.

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