gitweb.git
http: clear POSTFIELDS when initializing a slotJunio C Hamano Tue, 26 Apr 2011 15:04:49 +0000 (08:04 -0700)

http: clear POSTFIELDS when initializing a slot

After posting a short request using CURLOPT_POSTFIELDS, if the slot
is reused for posting a large payload, the slot ends up having both
POSTFIELDS (which now points at a random garbage) and READFUNCTION,
in which case the curl library tries to use the stale POSTFIELDS.

Clear it as part of the general slot initialization in get_active_slot().

Heavylifting-by: Shawn Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Shawn Pearce <spearce@spearce.org>

Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc... Junio C Hamano Mon, 25 Apr 2011 22:20:39 +0000 (15:20 -0700)

Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into js/maint-send-pack-stateless-rpc-deadlock-fix

* js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix:
send-pack: avoid deadlock when pack-object dies early

Evil merge to adjust the way the use of pthreads in sideband-demultiplexor
was decided (earlier it was "if we are not on Windows", now it is "if we
are not using pthreads").

send-pack: avoid deadlock when pack-object dies earlyJohannes Sixt Mon, 25 Apr 2011 21:04:10 +0000 (23:04 +0200)

send-pack: avoid deadlock when pack-object dies early

Send-pack deadlocks in two ways when pack-object dies early (for example,
because there is some repo corruption).

The first deadlock happens with the smart push protocol (--stateless-rpc).
After the initial rev-exchange, the remote is waiting for the pack data
to arrive, and the sideband demuxer at the local side continues trying to
stream data from the remote repository until it gets EOF. Meanwhile,
send-pack (in function pack_objects()) has noticed that pack-objects did
not produce output and died. Back in send_pack(), it now tries to clean
up the sideband demuxer using finish_async(). The demuxer, however, waits
for the remote end to close down, the remote waits for pack data, and
the reason that it still waits is that send-pack forgot to close the
outgoing channel. Add the missing close() in pack_objects().

The second deadlock happens in a similar constellation when the sideband
demuxer runs in a forked process (rather than in a thread). Again, the
remote end waits for pack data to arrive, the sideband demuxer waits for
the remote to shut down, and send-pack (in the regular clean-up) waits for
the demuxer to terminate. This time, the send-pack parent process closes
the writable end of the outgoing channel (in start_command() that spawned
pack-objects) so that after the death of the pack-objects process all
writable ends should have been closed and the remote repo should see EOF.
This does not happen, however, because when the sideband demuxer was forked
earlier, it also inherited a writable end; it remains open and keeps the
remote repo from seeing EOF. To break this deadlock, close the writable end
in the demuxer.

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

Git 1.7.5 v1.7.5Junio C Hamano Sun, 24 Apr 2011 06:36:32 +0000 (23:36 -0700)

Git 1.7.5

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

Fix "add -u" that sometimes fails to resolve unmerged... Junio C Hamano Thu, 21 Apr 2011 01:11:19 +0000 (18:11 -0700)

Fix "add -u" that sometimes fails to resolve unmerged paths

"git add -u" updates the index with the updated contents from the working
tree by internally running "diff-files" to grab the set of paths that are
different from the index. Then it updates the index entries for the paths
that are modified in the working tree, and deletes the index entries for
the paths that are deleted in the working tree.

It ignored the output from the diff-files that indicated that a path is
unmerged. For these paths, it instead relied on the fact that an unmerged
path is followed by the result of comparison between stage #2 (ours) and
the working tree, and used that to update or delete such a path when it is
used to record the resolution of a conflict.

As the result, when a path did not have stage #2 (e.g. "we deleted while
the other side added"), these unmerged stages were left behind, instead of
recording what the user resolved in the working tree.

Since we recently fixed "diff-files" to indicate if the corresponding path
exists on the working tree for an unmerged path, we do not have to rely on
the comparison with stage #2 anymore. We can instead tell the diff-files
not to compare with higher stages, and use the unmerged output to update
the index to reflect the state of the working tree.

The changes to the test vector in t2200 illustrates the nature of the bug
and the fix. The test expected stage #1 and #3 entries be left behind,
but it was codifying the buggy behaviour.

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

diff-files: show unmerged entries correctlyJunio C Hamano Fri, 22 Apr 2011 23:19:27 +0000 (16:19 -0700)

diff-files: show unmerged entries correctly

Earlier, e9c8409 (diff-index --cached --raw: show tree entry on the LHS
for unmerged entries., 2007-01-05) taught the command to show the object
name and the mode from the entry coming from the tree side when comparing
a tree with an unmerged index.

This is a belated companion patch that teaches diff-files to show the mode
from the entry coming from the working tree side, when comparing an
unmerged index and the working tree.

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

diff: remove often unused parameters from diff_unmerge()Junio C Hamano Fri, 22 Apr 2011 23:05:58 +0000 (16:05 -0700)

diff: remove often unused parameters from diff_unmerge()

e9c8409 (diff-index --cached --raw: show tree entry on the LHS for
unmerged entries., 2007-01-05) added a <mode, object name> pair as
parameters to this function, to store them in the pre-image side of an
unmerged file pair. Now the function is fixed to return the filepair it
queued, we can make the caller on the special case codepath to do so.

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

diff.c: return filepair from diff_unmerge()Junio C Hamano Fri, 22 Apr 2011 22:55:55 +0000 (15:55 -0700)

diff.c: return filepair from diff_unmerge()

The underlying diff_queue() returns diff_filepair so that the caller can
further add information to it, and the helper function diff_unmerge()
utilizes the feature itself, but does not expose it to its callers, which
was kind of selfish.

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

test: use $_z40 from test-libJunio C Hamano Sun, 24 Apr 2011 05:34:13 +0000 (22:34 -0700)

test: use $_z40 from test-lib

There is no need to duplicate the definition of $_z40 and $_x40 that
test-lib.sh supplies the test scripts.

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

sparse: Fix some "symbol not declared" warningsRamsay Jones Thu, 7 Apr 2011 18:49:33 +0000 (19:49 +0100)

sparse: Fix some "symbol not declared" warnings

In particular, sparse issues the "symbol 'a_symbol' was not declared.
Should it be static?" warnings for the following symbols:

attr.c:468:12: 'git_etc_gitattributes'
attr.c:476:5: 'git_attr_system'
vcs-svn/svndump.c:282:6: 'svndump_read'
vcs-svn/svndump.c:417:5: 'svndump_init'
vcs-svn/svndump.c:432:6: 'svndump_deinit'
vcs-svn/svndump.c:445:6: 'svndump_reset'

The symbols in attr.c only require file scope, so we add the static
modifier to their declaration.

The symbols in vcs-svn/svndump.c are external symbols, and they
already have extern declarations in the "svndump.h" header file,
so we simply include the header in svndump.c.

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

sparse: Fix errors due to missing target-specific variablesRamsay Jones Thu, 21 Apr 2011 19:14:42 +0000 (20:14 +0100)

sparse: Fix errors due to missing target-specific variables

In particular, sparse issues the following errors:

attr.c:472:43: error: undefined identifier 'ETC_GITATTRIBUTES'
config.c:821:43: error: undefined identifier 'ETC_GITCONFIG'
exec_cmd.c:14:37: error: undefined identifier 'PREFIX'
exec_cmd.c:83:28: error: undefined identifier 'GIT_EXEC_PATH'
builtin/help.c:328:46: error: undefined identifier 'GIT_MAN_PATH'
builtin/help.c:374:40: error: undefined identifier 'GIT_INFO_PATH'
builtin/help.c:382:45: error: undefined identifier 'GIT_HTML_PATH'
git.c:96:42: error: undefined identifier 'GIT_HTML_PATH'
git.c:241:35: error: invalid initializer
http.c:293:43: error: undefined identifier 'GIT_HTTP_USER_AGENT'

which is caused by not passing the target-specific additions to
the EXTRA_CPPFLAGS variable to cgcc.

In order to fix the problem, we define a new sparse target which
depends on a set of non-existent "sparse object" files (*.sp)
which correspond to the set of C source files. In addition to the
new target, we also provide a new pattern rule for "creating" the
sparse object files from the source files by running cgcc. This
allows us to add '*.sp' to the rules setting the target-specific
EXTRA_CPPFLAGS variable, which is then included in the new pattern
rule to run cgcc.

Also, we change the 'check' target to re-direct the user to the
new sparse target.

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

revisions: allow --glob and friends in parse_options... Jonathan Nieder Thu, 21 Apr 2011 10:48:24 +0000 (05:48 -0500)

revisions: allow --glob and friends in parse_options-enabled commands

As v1.6.0-rc2~42 (2008-07-31) explains, even pseudo-options like --not
and --glob that need to be parsed in order with revisions should be
marked handled by handle_revision_opt to avoid an error when
parse_revision_opt callers like "git shortlog" encounter them.

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

revisions: split out handle_revision_pseudo_opt functionJonathan Nieder Thu, 21 Apr 2011 10:45:07 +0000 (05:45 -0500)

revisions: split out handle_revision_pseudo_opt function

As v1.6.0-rc2~42 (Allow "non-option" revision options in
parse_option-enabled commands, 2008-07-31) explains, options handled
by setup_revisions fall into two categories:

1. global options like --topo-order handled by parse_revision_opt,
which can take detached arguments and can be parsed in advance;

2. pseudo-options that must be parsed in order with their revision
counterparts, like --not and --all.

The global options are taken care of by handle_revision_opt; the
pseudo-options are currently in a deeply indented portion of
setup_revisions. Give them their own function for easier reading.

The only goal is to make setup_revisions easier to read straight
through. No functional change intended.

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

date: avoid "X years, 12 months" in relative datesMichael J Gruber Wed, 20 Apr 2011 09:12:11 +0000 (11:12 +0200)

date: avoid "X years, 12 months" in relative dates

When relative dates are more than about a year ago, we start
writing them as "Y years, M months". At the point where we
calculate Y and M, we have the time delta specified as a
number of days. We calculate these integers as:

Y = days / 365
M = (days % 365 + 15) / 30

This rounds days in the latter half of a month up to the
nearest month, so that day 16 is "1 month" (or day 381 is "1
year, 1 month").

We don't round the year at all, though, meaning we can end
up with "1 year, 12 months", which is silly; it should just
be "2 years".

Implement this differently with months of size

onemonth = 365/12

so that

totalmonths = (long)( (days + onemonth/2)/onemonth )
years = totalmonths / 12
months = totalmonths % 12

In order to do this without floats, we write the first formula as

totalmonths = (days*12*2 + 365) / (365*2)

Tests and inspiration by Jeff King.

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

run-command: handle short writes and EINTR in die_childJonathan Nieder Wed, 20 Apr 2011 10:40:05 +0000 (05:40 -0500)

run-command: handle short writes and EINTR in die_child

If start_command fails after forking and before exec finishes, there
is not much use in noticing an I/O error on top of that.
finish_command will notice that the child exited with nonzero status
anyway. So as noted in v1.7.0.3~20^2 (run-command.c: fix build
warnings on Ubuntu, 2010-01-30) and v1.7.5-rc0~29^2 (2011-03-16), it
is safe to ignore errors from write in this codepath.

Even so, the result from write contains useful information: it tells
us if the write was cancelled by a signal (EINTR) or was only
partially completed (e.g., when writing to an almost-full pipe).
Let's use write_in_full to loop until the desired number of bytes have
been written (still ignoring errors if that fails).

As a happy side effect, the assignment to a dummy variable to appease
gcc -D_FORTIFY_SOURCE is no longer needed. xwrite and write_in_full
check the return value from write(2).

Noticed with gcc -Wunused-but-set-variable.

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

tests: check error message from run_commandJonathan Nieder Wed, 20 Apr 2011 10:35:08 +0000 (05:35 -0500)

tests: check error message from run_command

In git versions starting at v1.7.5-rc0~29^2 until v1.7.5-rc3~2 (Revert
"run-command: prettify -D_FORTIFY_SOURCE workaround", 2011-04-18)
fixed it, the run_command facility would write a truncated error
message when the command is present but cannot be executed for some
other reason. For example, if I add a 'hello' command to git:

$ echo 'echo hello' >git-hello
$ chmod +x git-hello
$ PATH=.:$PATH git hello
hello

and make it non-executable, this is what I normally get:

$ chmod -x git-hello
$ git hello
fatal: cannot exec 'git-hello': Permission denied

But with the problematic versions, we get disturbing output:

$ PATH=.:$PATH git hello
fatal: $

Add some tests to make sure it doesn't happen again.

The hello-script used in these tests uses cat instead of echo because
on Windows the bash spawned by git converts LF to CRLF in text written
by echo while the bash running tests does not, causing the test to
fail if "echo" is used. Thanks to Hannes for noticing.

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

Git 1.7.5-rc3 v1.7.5-rc3Junio C Hamano Tue, 19 Apr 2011 18:51:00 +0000 (11:51 -0700)

Git 1.7.5-rc3

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

Sync with 1.7.4.5Junio C Hamano Tue, 19 Apr 2011 18:49:13 +0000 (11:49 -0700)

Sync with 1.7.4.5

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

Git 1.7.4.5 v1.7.4.5Junio C Hamano Tue, 19 Apr 2011 18:45:38 +0000 (11:45 -0700)

Git 1.7.4.5

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

remove noise and inaccuracies from git-svn docsStefan Sperling Tue, 19 Apr 2011 09:06:46 +0000 (11:06 +0200)

remove noise and inaccuracies from git-svn docs

Signed-off-by: Stefan Sperling <stsp@stsp.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/format-patch: suggest Toggle Word Wrap... Johannes Sixt Mon, 18 Apr 2011 06:31:16 +0000 (08:31 +0200)

Documentation/format-patch: suggest Toggle Word Wrap add-on for Thunderbird

Of the (now) three methods to send unmangled patches using Thunderbird,
this method is listed first because it provides a single-click on-demand
option rather than a permanent change of configuration like the other
two methods.

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

git-svn.txt: Document --mergeinfoMichael J Gruber Tue, 19 Apr 2011 12:24:27 +0000 (14:24 +0200)

git-svn.txt: Document --mergeinfo

6abd933 (git-svn: allow the mergeinfo property to be set, 2010-09-24)
introduced the --mergeinfo option. Document it.

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

Revert "run-command: prettify -D_FORTIFY_SOURCE workaround"Junio C Hamano Mon, 18 Apr 2011 21:14:53 +0000 (14:14 -0700)

Revert "run-command: prettify -D_FORTIFY_SOURCE workaround"

This reverts commit ebec842773932e6f853acac70c80f84209b5f83e, which
somehow mistakenly thought that any non-zero return from write(2) is
an error.

doc: Clarify that "cherry-pick -x" does not use "git... Sebastian Schuberth Fri, 15 Apr 2011 17:53:51 +0000 (19:53 +0200)

doc: Clarify that "cherry-pick -x" does not use "git notes"

The documentation for "cherry-pick -x" could be misread in the way that a
"git notes" object is attached to the new commit, which is not the case.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: publicize hints for sending patches... Jonathan Nieder Fri, 15 Apr 2011 02:33:57 +0000 (21:33 -0500)

Documentation: publicize hints for sending patches with GMail

The hints in SubmittingPatches about stopping GMail from clobbering
patches are widely useful both as examples of "git send-email" and
"git imap-send" usage.

Move the documentation to the appropriate places.

While at it, don't encourage storing passwords in config files.

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

Documentation: publicize KMail hints for sending patche... Jonathan Nieder Fri, 15 Apr 2011 02:32:55 +0000 (21:32 -0500)

Documentation: publicize KMail hints for sending patches inline

These hints are in git's private SubmittingPatches document but a
wider audience might be interested. Move them to the "git
format-patch" manpage.

I'm not sure what gotchas these hints are meant to work around.
They might be completely false.

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

Documentation: hints for sending patches inline with... Jonathan Nieder Fri, 15 Apr 2011 02:28:06 +0000 (21:28 -0500)

Documentation: hints for sending patches inline with Thunderbird

The standard reference for this information is the article
"Plain text e-mail - Thunderbird#Completely_plain_email" at
kb.mozillazine.org, but the hints hidden away in git's
SubmittingPatches file are more complete. Move them to the
"git format-patch" manual so they can be installed with git and
read by a wide audience.

While at it, make some tweaks:

- update "Approach #1" so it might work with Thunderbird 3;
- remove ancient version numbers from the descriptions of both
approaches so current readers might have more reason to
complain if they don't work.

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

Documentation: explain how to check for patch corruptionJonathan Nieder Fri, 15 Apr 2011 02:24:01 +0000 (21:24 -0500)

Documentation: explain how to check for patch corruption

SubmittingPatches has some excellent advice about how to check a patch
for corruption before sending it off. Move it to the format-patch
manual so it can be installed with git's documentation for use by
people not necessarily interested in the git project's practices.

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

Merge v1.7.5-rc2 into jn/format-patch-docJunio C Hamano Fri, 15 Apr 2011 20:25:50 +0000 (13:25 -0700)

Merge v1.7.5-rc2 into jn/format-patch-doc

This is to sync with the recent updates in Documentation/SubmittingPatches
and Documentation/format-patch.txt

Documentation: describe the format of messages with... Jonathan Nieder Fri, 15 Apr 2011 02:22:02 +0000 (21:22 -0500)

Documentation: describe the format of messages with inline patches

Add a DISCUSSION section to the "git format-patch" manual to encourage
people to send patches in a form that can be applied by "git am"
automatically. There are two such forms:

1. The default form in which most metadata goes in the mail header
and the message body starts with the patch description;

2. The snipsnip form in which a message starts with pertinent
discussion and ends with a patch after a "scissors" mark.

The example requires QP encoding in the "Subject:" header intended for
the mailer to give the reader a chance to reflect on that, rather than
being startled by it later. By contrast, in-body "From:" and
"Subject:" lines should be human-readable and not QP encoded.

Inspired-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Improved-by: Drew Northup <drew.northup@maine.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Restructure documentation for git-merge-base.Jonathan Nieder Fri, 15 Apr 2011 08:38:55 +0000 (10:38 +0200)

Restructure documentation for git-merge-base.

Restructure the text of git-merge-base to better explain more clearly
the different modes of operation.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: update to git-merge-base --octopusVincent van Ravesteijn Fri, 15 Apr 2011 08:34:03 +0000 (10:34 +0200)

Documentation: update to git-merge-base --octopus

Unlike plain merge-base, merge-base --octopus only requires at least one
commit argument; update the synopsis to reflect that.

Add a sentence to the discussion that when --octopus is used, we do expect
'2' (the common ansestor across all) as the result.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: wrap email addresses after long namesJeff King Thu, 14 Apr 2011 22:18:09 +0000 (18:18 -0400)

format-patch: wrap email addresses after long names

We already wrap names in "from" headers, which tend to be
the long part of an address. But it's also possible for a
long name to not be wrapped, but to make us want to wrap the
email address. For example (imagine for the sake of
readability we want to wrap at 50 characters instead of 78):

From: this is my really long git name <foo@example.com>

The name does not overflow the line, but the name and email
together do. So we would rather see:

From: this is my really long git name
<git@example.com>

Because we wrap the name separately during add_rfc2047, we
neglected this case. Instead, we should see how long the
final line of the wrapped name ended up, and decide whether
or not to wrap based on that. We can't break the address
into multiple parts, so we either leave it with the name, or
put it by itself on a line.

Test by Erik Faye-Lund.

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

i18n: use test_i18n{cmp,grep} in t7600, t7607, t7611... Junio C Hamano Thu, 14 Apr 2011 21:36:14 +0000 (14:36 -0700)

i18n: use test_i18n{cmp,grep} in t7600, t7607, t7611 and t7811

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

i18n: use test_i18n{grep,cmp} in t7508Junio C Hamano Thu, 14 Apr 2011 20:56:14 +0000 (13:56 -0700)

i18n: use test_i18n{grep,cmp} in t7508

Two tests looked for "[Uu]sage" in the output, but we cannot expect the
l10n to use that phrase. Mark them with test_i18ngrep so that in later
versions we can test truly localized versions with the same tests, not
just GETTEXT_POISON that happens to keep the original string in the
output.

Merge a few tests that were artificially split into "do" and "test output
under C_LOCALE_OUTPUT" in the original i18n patches back.

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

i18n: use test_i18ngrep in t7506Junio C Hamano Thu, 14 Apr 2011 20:37:54 +0000 (13:37 -0700)

i18n: use test_i18ngrep in t7506

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

Merge branch 'maint'Junio C Hamano Thu, 14 Apr 2011 19:26:45 +0000 (12:26 -0700)

Merge branch 'maint'

* maint:
archive: document limitation of tar.umask config setting
t3306,t5304: avoid clock skew issues
git.txt: fix list continuation

contrib/completion: --notes, --no-notesMichael J Gruber Thu, 14 Apr 2011 17:53:13 +0000 (19:53 +0200)

contrib/completion: --notes, --no-notes

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

archive: document limitation of tar.umask config settingRené Scharfe Thu, 14 Apr 2011 18:04:57 +0000 (20:04 +0200)

archive: document limitation of tar.umask config setting

The local value of the config variable tar.umask is not passed to the
other side with --remote. We may want to change that, but for now just
document this fact.

Reported-by: Jacek Masiulaniec <jacek.masiulaniec@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log: convert to parse-optionsCarlos Martín Nieto Thu, 14 Apr 2011 14:28:30 +0000 (16:28 +0200)

log: convert to parse-options

Use parse-options in cmd_log_init instead of manually iterating
through them. This makes the code a bit cleaner but more importantly
allows us to catch the "--quiet" option which causes some of the
log-related commands to misbehave as it would otherwise get passed on
to the diff.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3306,t5304: avoid clock skew issuesMichael J Gruber Thu, 14 Apr 2011 17:38:13 +0000 (19:38 +0200)

t3306,t5304: avoid clock skew issues

On systems where the local time and file modification time may be out of
sync (e.g. test directory on NFS) t3306 and t5305 can fail because prune
compares times such as "now" (client time) with file modification times
(server times for remote file systems). I.e., these are spurious test
failures.

Avoid this by setting the relevant modification times to the local time.

Noticed on a system with as little as 2s time skew.

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

git.txt: fix list continuationMichael J Gruber Thu, 14 Apr 2011 07:17:26 +0000 (09:17 +0200)

git.txt: fix list continuation

Remove a spurious empty line which prevented asciidoc from recognizing a
list continuation mark ('+'), so that it does not get output literally any
more.

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

i18n: use test_i18ngrep and test_i18ncmp in t7502Junio C Hamano Wed, 13 Apr 2011 23:17:50 +0000 (16:17 -0700)

i18n: use test_i18ngrep and test_i18ncmp in t7502

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

i18n: use test_i18ngrep in t7501Junio C Hamano Wed, 13 Apr 2011 23:17:29 +0000 (16:17 -0700)

i18n: use test_i18ngrep in t7501

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

i18n: use test_i18ncmp in t7500Junio C Hamano Tue, 12 Apr 2011 23:48:35 +0000 (16:48 -0700)

i18n: use test_i18ncmp in t7500

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

i18n: use test_i18ngrep in t7201Junio C Hamano Tue, 12 Apr 2011 23:39:14 +0000 (16:39 -0700)

i18n: use test_i18ngrep in t7201

Some test were mistakenly disabled under GETTEXT_POISON as well,
and they have been resurrected.

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

i18n: use test_i18ncmp and test_i18ngrep in t7102 and... Junio C Hamano Tue, 12 Apr 2011 23:36:18 +0000 (16:36 -0700)

i18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110

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

i18n: use test_i18ncmp and test_i18ngrep in t5541,... Junio C Hamano Tue, 12 Apr 2011 23:33:39 +0000 (16:33 -0700)

i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and t7060

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

i18n: use test_i18ncmp and test_i18ngrep in t3700,... Junio C Hamano Tue, 12 Apr 2011 23:27:11 +0000 (16:27 -0700)

i18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014

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

i18n: use test_i18ncmp and test_i18ngrep in t3203,... Junio C Hamano Tue, 12 Apr 2011 23:23:01 +0000 (16:23 -0700)

i18n: use test_i18ncmp and test_i18ngrep in t3203, t3501 and t3507

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

i18n: use test_i18ngrep in t2020, t2204, t3030, and... Junio C Hamano Tue, 12 Apr 2011 23:20:32 +0000 (16:20 -0700)

i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200

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

i18n: use test_i18ngrep in lib-httpd and t2019Junio C Hamano Tue, 12 Apr 2011 23:12:47 +0000 (16:12 -0700)

i18n: use test_i18ngrep in lib-httpd and t2019

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

i18n: do not overuse C_LOCALE_OUTPUT (grep)Junio C Hamano Tue, 12 Apr 2011 22:57:08 +0000 (15:57 -0700)

i18n: do not overuse C_LOCALE_OUTPUT (grep)

Instead of skipping the whole test, introduce test_i18ngrep wrapper that
pretends a successful result under GETTEXT_POISON build.

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

i18n: use test_i18ncmp in t1200 and t2200Junio C Hamano Tue, 12 Apr 2011 22:50:55 +0000 (15:50 -0700)

i18n: use test_i18ncmp in t1200 and t2200

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

i18n: .git file is not a human readable message (t5601)Junio C Hamano Tue, 12 Apr 2011 23:29:19 +0000 (16:29 -0700)

i18n: .git file is not a human readable message (t5601)

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

Git 1.7.5-rc2 v1.7.5-rc2Junio C Hamano Wed, 13 Apr 2011 21:01:03 +0000 (14:01 -0700)

Git 1.7.5-rc2

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

Merge branch 'maint'Junio C Hamano Wed, 13 Apr 2011 20:59:19 +0000 (13:59 -0700)

Merge branch 'maint'

* maint:

Merge branch 'jc/rev-list-options-fix' into maintJunio C Hamano Wed, 13 Apr 2011 20:56:52 +0000 (13:56 -0700)

Merge branch 'jc/rev-list-options-fix' into maint

* jc/rev-list-options-fix:
"log --cherry-pick" documentation regression fix

Merge branch 'js/checkout-untracked-symlink' into maintJunio C Hamano Wed, 13 Apr 2011 20:55:53 +0000 (13:55 -0700)

Merge branch 'js/checkout-untracked-symlink' into maint

* js/checkout-untracked-symlink:
t2021: mark a test as fixed

mergetool: Teach about submodulesJonathon Mah Wed, 13 Apr 2011 10:00:48 +0000 (03:00 -0700)

mergetool: Teach about submodules

When the index has conflicted submodules, mergetool used to mildly
clobber the module, renaming it to mymodule.BACKUP.nnnn, then failing to
copy it non-recursively.

Recognize submodules and offer a resolution instead:

Submodule merge conflict for 'Shared':
{local}: submodule commit ad9f12e3e6205381bf2163a793d1e596a9e211d0
{remote}: submodule commit f5893fb70ec5646efcd9aa643c5136753ac89253
Use (l)ocal or (r)emote, or (a)bort?

Selecting a commit will stage it, but not update the submodule (as git
does had there been no conflict). Type changes are also supported,
should the path be a submodule on one side, and a file, symlink,
directory, or deleted on the other.

Signed-off-by: Jonathon Mah <me@JonathonMah.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remove doubled words, e.g., s/to to/to/, and fix relate... Jim Meyering Wed, 13 Apr 2011 15:39:40 +0000 (17:39 +0200)

remove doubled words, e.g., s/to to/to/, and fix related typos

I found that some doubled words had snuck back into projects from which
I'd already removed them, so now there's a "syntax-check" makefile rule in
gnulib to help prevent recurrence.

Running the command below spotted a few in git, too:

git ls-files | xargs perl -0777 -n \
-e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt])\s+\1\b/gims)' \
-e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g;' \
-e 'print "$ARGV:$n:$v\n"}'

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

revert: Hide '-r' option in default usageRamkumar Ramachandra Sun, 10 Apr 2011 15:39:14 +0000 (21:09 +0530)

revert: Hide '-r' option in default usage

The '-r' command-line option is a no-op provided only for backward
compatiblity since abd6970 (cherry-pick: make -r the default, 2006-10-05),
and somehow ended up surviving across reimplementation in C at 9509af6
(Make git-revert & git-cherry-pick a builtin, 2007-03-01) and another
rewrite of the command line parser at f810379 (Make builtin-revert.c use
parse_options, 2007-10-07). We should have stopped advertising the option
long time ago.

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

format-patch: document --quiet optionCarlos Martín Nieto Tue, 12 Apr 2011 15:51:37 +0000 (17:51 +0200)

format-patch: document --quiet option

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: don't pass on the --quiet flagCarlos Martín Nieto Tue, 12 Apr 2011 15:35:38 +0000 (17:35 +0200)

format-patch: don't pass on the --quiet flag

The --quiet flag is not meant to be passed on to the diff, as the user
always wants the patches to be produced so catch it and pass it to
reopen_stdout which decides whether to print the filename or not.

Noticed by Paul Gortmaker

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

--dirstat: In case of renames, use target filename... Johan Herland Tue, 12 Apr 2011 09:24:34 +0000 (11:24 +0200)

--dirstat: In case of renames, use target filename instead of source filename

This changes --dirstat analysis to count "damage" toward the target filename,
rather than the source filename. For renames within a directory, this won't
matter to the final output, but when moving files between diretories, the
output now lists the target directory rather than the source directory.

Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

i18n: do not overuse C_LOCALE_OUTPUTJunio C Hamano Tue, 12 Apr 2011 18:23:23 +0000 (11:23 -0700)

i18n: do not overuse C_LOCALE_OUTPUT

It is too coarse-grained way that led to artificial splitting of a
logically single test case into "do" and "check only without poison".
As the majority of check is done by comparing expected and actual output
stored in a file with test_cmp anyway, just introduce test_i18ncmp that
pretends the actual output matched the expected one when gettext-poison
is in effect.

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

i18n: mark init-db messages for translationÆvar Arnfjörð Bjarmason Sun, 10 Apr 2011 19:34:02 +0000 (19:34 +0000)

i18n: mark init-db messages for translation

Mark the init-db messages that were added in v1.7.5-rc1~16^2 (init,
clone: support --separate-git-dir for .git file) by Nguyễn Thái Ngọc
Duy for translation.

This requires splitting up the tests that the patch added so that
certain parts of them can be skipped unless the C_LOCALE_OUTPUT
prerequisite is satisfied.

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

i18n: mark checkout plural warning for translationÆvar Arnfjörð Bjarmason Sun, 10 Apr 2011 19:34:08 +0000 (19:34 +0000)

i18n: mark checkout plural warning for translation

Mark the "Warning: you are leaving %d commit(s) behind" message added
in v1.7.5-rc0~74^2 (commit: give final warning when reattaching HEAD
to leave commits behind) by Junio C Hamano for translation.

This message requires the use of ngettext() features, and is the first
message to use the Q_() wrapper around ngettext().

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

i18n: mark checkout --detach messages for translationÆvar Arnfjörð Bjarmason Sun, 10 Apr 2011 19:34:07 +0000 (19:34 +0000)

i18n: mark checkout --detach messages for translation

Mark messages added in v1.7.5-rc0~117^2~2 (checkout: introduce
--detach synonym for "git checkout foo^{commit}") by Junio C Hamano
for translation.

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

i18n: mark clone nonexistent repository message for... Ævar Arnfjörð Bjarmason Sun, 10 Apr 2011 19:34:06 +0000 (19:34 +0000)

i18n: mark clone nonexistent repository message for translation

Mark the "repository '%s' does not exist" message added in
v1.7.4.2~21^2 (clone: die when trying to clone missing local path) by
Jeff King for translation.

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

i18n: mark merge CHERRY_PICK_HEAD messages for translationÆvar Arnfjörð Bjarmason Sun, 10 Apr 2011 19:34:05 +0000 (19:34 +0000)

i18n: mark merge CHERRY_PICK_HEAD messages for translation

Mark CHERRY_PICK_HEAD related messages in builtin/merge.c that were
added in v1.7.5-rc0~88^2~2 (Introduce CHERRY_PICK_HEAD) by Jay Soffian
for translation.

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

i18n: mark merge "upstream" messages for translationÆvar Arnfjörð Bjarmason Sun, 10 Apr 2011 19:34:04 +0000 (19:34 +0000)

i18n: mark merge "upstream" messages for translation

Mark the merge messages that were added in v1.7.5-rc1~17^2 (merge:
merge with the default upstream branch without argument) by Junio C
Hamano for translation.

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

i18n: mark merge "Could not read from" message for... Ævar Arnfjörð Bjarmason Sun, 10 Apr 2011 19:34:03 +0000 (19:34 +0000)

i18n: mark merge "Could not read from" message for translation

Mark the "Could not read from '%s'" message that was added to
builtin/merge.c in v1.7.4.2~25^2 (merge: honor prepare-commit-msg
hook) by Jay Soffian for translation.

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

Merge branch 'js/checkout-untracked-symlink'Junio C Hamano Tue, 12 Apr 2011 07:05:50 +0000 (00:05 -0700)

Merge branch 'js/checkout-untracked-symlink'

* js/checkout-untracked-symlink:
t2021: mark a test as fixed

Merge branch 'nd/init-gitdir'Junio C Hamano Tue, 12 Apr 2011 07:04:53 +0000 (00:04 -0700)

Merge branch 'nd/init-gitdir'

* nd/init-gitdir:
t0001: guard a new test with SYMLINKS prerequisite

t2021: mark a test as fixedJohannes Sixt Tue, 12 Apr 2011 06:41:19 +0000 (08:41 +0200)

t2021: mark a test as fixed

The failure was fixed by the previous commit.

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

t0001: guard a new test with SYMLINKS prerequisiteJohannes Sixt Tue, 12 Apr 2011 06:30:49 +0000 (08:30 +0200)

t0001: guard a new test with SYMLINKS prerequisite

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

config: support values longer than 1023 bytesErik Faye-Lund Sun, 10 Apr 2011 20:54:18 +0000 (22:54 +0200)

config: support values longer than 1023 bytes

parse_value in config.c has a static buffer of 1024 bytes that it
parse the value into. This can sometimes be a problem when a
config file contains very long values.

It's particularly amusing that git-config already is able to write
such files, so it should probably be able to read them as well.

Fix this by using a strbuf instead of a fixed-size buffer.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

strbuf: make sure buffer is zero-terminatedErik Faye-Lund Sun, 10 Apr 2011 20:54:17 +0000 (22:54 +0200)

strbuf: make sure buffer is zero-terminated

strbuf_init does not zero-terminate the initial buffer when hint is
non-zero. Fix this so we can rely on the string to be zero-terminated
even if we haven't filled it with anything yet.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Teach --dirstat not to completely ignore rearranged... Johan Herland Sun, 10 Apr 2011 22:48:52 +0000 (00:48 +0200)

Teach --dirstat not to completely ignore rearranged lines within a file

Currently, the --dirstat analysis ignores when lines within a file are
rearranged, because the "damage" calculated by show_dirstat() is 0.
However, if the object name has changed, we already know that there is
some damage, and it is unintuitive to claim there is _no_ damage.

Teach show_dirstat() to assign a minimum amount of damage (== 1) to
entries for which the analysis otherwise yields zero damage, to still
represent that these files are changed, instead of saying that there
is no change.

Also, skip --dirstat analysis when the object names are the same (e.g. for
a pure file rename).

Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sparse: Fix an "symbol 'merge_file' not decared" warningRamsay Jones Thu, 7 Apr 2011 18:31:24 +0000 (19:31 +0100)

sparse: Fix an "symbol 'merge_file' not decared" warning

In order to fix the warning, we add a new "merge-file.h" header
containing the extern declaration of the merge_file() function,
and include the header in the source files that require the
declaration.

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

sparse: Fix an "symbol 'format_subject' not declared... Ramsay Jones Thu, 7 Apr 2011 18:26:23 +0000 (19:26 +0100)

sparse: Fix an "symbol 'format_subject' not declared" warning

In order to fix the warning, we add an extern declaration for this
function to the "commit.h" header file, along with all other non-
static functions defined in pretty.c. Also, we remove the function
declaration from builtin/shortlog.c, since it is no longer needed.

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

sparse: Fix some "Using plain integer as NULL pointer... Ramsay Jones Thu, 7 Apr 2011 18:24:57 +0000 (19:24 +0100)

sparse: Fix some "Using plain integer as NULL pointer" warnings

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

sparse: Fix an "symbol 'cmd_index_pack' not declared... Ramsay Jones Thu, 7 Apr 2011 18:23:40 +0000 (19:23 +0100)

sparse: Fix an "symbol 'cmd_index_pack' not declared" warning

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

Makefile: Use cgcc rather than sparse in the check... Ramsay Jones Thu, 7 Apr 2011 18:22:18 +0000 (19:22 +0100)

Makefile: Use cgcc rather than sparse in the check target

cgcc is the recommended way to run sparse, since it provides
many -Defines suitable for the given gcc platform. Using an
"cgcc -no-compile" command runs sparse, with all the platform
specific definitions provided by cgcc, without also invoking
gcc.

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

Makefile: extract Q_() source strings as ngettext()Ævar Arnfjörð Bjarmason Sun, 10 Apr 2011 19:37:01 +0000 (19:37 +0000)

Makefile: extract Q_() source strings as ngettext()

The Q_() wrapper added by 0c9ea33 (i18n: add stub Q_() wrapper for
ngettext, 2011-03-09) needs to be noticed by xgettext.

Add an appropriate --keyword option to the Makefile, so that "make pot"
would notice the strings in the plural form marked with the wrapper.

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

i18n: avoid parenthesized string as array initializerRamsay Jones Thu, 7 Apr 2011 18:41:48 +0000 (19:41 +0100)

i18n: avoid parenthesized string as array initializer

The syntax

static const char ignore_error[] = ("something");

is invalid C. A parenthesized string is not allowed as an array
initializer.

Some compilers, for example GCC and MSVC, allow this syntax as an
extension, but it is not a portable construct. tcc does not parse it, for
example.

Remove the parenthesis from the definition of the N_() macro to
fix this.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

--dirstat-by-file: Make it faster and more correctJohan Herland Sun, 10 Apr 2011 22:48:51 +0000 (00:48 +0200)

--dirstat-by-file: Make it faster and more correct

Currently, when using --dirstat-by-file, it first does the full --dirstat
analysis (using diffcore_count_changes()), and then resets 'damage' to 1,
if any damage was found by diffcore_count_changes().

But --dirstat-by-file is not interested in the file damage per se. It only
cares if the file changed at all. In that sense it only cares if the blob
object for a file has changed. We therefore only need to compare the
object names of each file pair in the diff queue and we can skip the
entire --dirstat analysis and simply set 'damage' to 1 for each entry
where the object name has changed.

This makes --dirstat-by-file faster, and also bypasses --dirstat's practice
of ignoring rearranged lines within a file.

The patch also contains an added testcase verifying that --dirstat-by-file
now detects changes that only rearrange lines within a file.

Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

--dirstat: Describe non-obvious differences relative... Johan Herland Sun, 10 Apr 2011 22:48:50 +0000 (00:48 +0200)

--dirstat: Describe non-obvious differences relative to --stat or regular diff

Also add a testcase documenting the current behavior.

Improved-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.bogomips.org/git-svnJunio C Hamano Mon, 11 Apr 2011 16:34:19 +0000 (09:34 -0700)

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

* git://git.bogomips.org/git-svn:
git-svn: Cache results of running the executable "git config"
git-svn: Add a svn-remote.<name>.pushurl config key

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Mon, 11 Apr 2011 16:33:06 +0000 (09:33 -0700)

Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Update cherry-pick error message parsing
gitk: Quote tag names in event bindings to avoid problems with % chars
gitk: Allow user to control how much of the SHA1 ID gets auto-selected
gitk: spelling fixes in Russian translation
gitk: Take only numeric version components when computing $git_version

git-svn: Cache results of running the executable "git... James Y Knight Mon, 4 Apr 2011 19:09:08 +0000 (15:09 -0400)

git-svn: Cache results of running the executable "git config"

Running programs is not cheap!

Signed-off-by: James Y Knight <jknight@itasoftware.com>
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: Add a svn-remote.<name>.pushurl config keyAlejandro R. Sedeño Fri, 8 Apr 2011 14:57:54 +0000 (10:57 -0400)

git-svn: Add a svn-remote.<name>.pushurl config key

Similar to the 'remote.<name>.pushurl' config key for git remotes,
'pushurl' is designed to be used in cases where 'url' points to an SVN
repository via a read-only transport, to provide an alternate
read/write transport. It is assumed that both keys point to the same
repository.

The 'pushurl' key is distinct from the 'commiturl' key in that
'commiturl' is a full svn path while 'pushurl' (like 'url') is a base
path. 'commiturl' takes precendece over 'pushurl' in cases where
either might be used.

The 'pushurl' is used by git-svn's dcommit and branch commands.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Reviewed-by: James Y Knight <jknight@itasoftware.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

gitk: Update cherry-pick error message parsingAnders Kaseorg Wed, 19 Jan 2011 19:45:00 +0000 (14:45 -0500)

gitk: Update cherry-pick error message parsing

Commit 981ff5c37ae20687c98d98c8689d5e89016026d2 changed the error
message from git cherry-pick from
Automatic cherry-pick failed. [...advice...]
to
error: could not apply 7ab78c9... Do something neat.
[...advice...]

Update gitk’s regex to match this, restoring the ability to launch git
citool to resolve conflicted cherry-picks.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Paul Mackerras <paulus@samba.org>

merge: allow "-" as a short-hand for "previous branch"Junio C Hamano Thu, 7 Apr 2011 22:57:57 +0000 (15:57 -0700)

merge: allow "-" as a short-hand for "previous branch"

Just like "git checkout -" is a short-hand for "git checkout @{-1}" to
conveniently switch back to the previous branch, "git merge -" is a
short-hand for "git merge @{-1}" to conveniently merge the previous branch.

It will allow me to say:

$ git checkout -b au/topic
$ git am -s ./+au-topic.mbox
$ git checkout pu
$ git merge -

which is an extremely typical and repetitive operation during my git day.

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

stash: ensure --no-keep-index and --patch can be used... Dan McGee Thu, 7 Apr 2011 17:04:20 +0000 (12:04 -0500)

stash: ensure --no-keep-index and --patch can be used in any order

Don't assume one comes after the other on the command line. Use a
three-state variable to track and check its value accordingly.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

stash: add two more tests for --no-keep-indexDan McGee Thu, 7 Apr 2011 17:04:19 +0000 (12:04 -0500)

stash: add two more tests for --no-keep-index

One of these passes just fine; the other one exposes a problem where
command line flag order matters for --no-keep-index and --patch
interaction.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: replace each tab with 8 spaces for consistencyAndrew Garber Thu, 7 Apr 2011 06:01:21 +0000 (02:01 -0400)

git-p4: replace each tab with 8 spaces for consistency

Note that the majority of git-p4 uses spaces, not tabs, for indentation.
Consistent indentation is a good hygiene for Python scripts, and mixing
tabs and spaces in Python can lead to hard-to-find bugs.

Signed-off-by: Andrew Garber <andrew@andrewgarber.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Allow custom diff tools to be specified... Ramkumar Ramachandra Wed, 6 Apr 2011 18:46:50 +0000 (00:16 +0530)

Documentation: Allow custom diff tools to be specified in 'diff.tool'

Apart from the list of "valid values", 'diff.tool' can take any value,
provided there is a corresponding 'difftool.<tool>.cmd' option. Also,
describe this option just before the 'difftool.*' options.

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

Documentation: Add diff.<driver>.* to configRamkumar Ramachandra Wed, 6 Apr 2011 18:46:49 +0000 (00:16 +0530)

Documentation: Add diff.<driver>.* to config

Although the gitattributes page contains comprehensive information
about these configuration options, they should be included in the
config documentation for completeness.

It may be better to rename the "driver" in "diff.<driver>.*" to
something like "content type" or "file type", but for now, let's keep
it consistent across this part of the documentation and the original
description in the gitattributes documentation.

Helped-by: Jakub Narebski <jnareb@gmail.com>
Helped-by: Michael J Gruber <git@drmicha.warpmail.net>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>