gitweb.git
docs: stop using asciidoc no-inline-literalJeff King Thu, 26 Apr 2012 08:51:57 +0000 (04:51 -0400)

docs: stop using asciidoc no-inline-literal

In asciidoc 7, backticks like `foo` produced a typographic
effect, but did not otherwise affect the syntax. In asciidoc
8, backticks introduce an "inline literal" inside which markup
is not interpreted. To keep compatibility with existing
documents, asciidoc 8 has a "no-inline-literal" attribute to
keep the old behavior. We enabled this so that the
documentation could be built on either version.

It has been several years now, and asciidoc 7 is no longer
in wide use. We can now decide whether or not we want
inline literals on their own merits, which are:

1. The source is much easier to read when the literal
contains punctuation. You can use `master~1` instead
of `master{tilde}1`.

2. They are less error-prone. Because of point (1), we
tend to make mistakes and forget the extra layer of
quoting.

This patch removes the no-inline-literal attribute from the
Makefile and converts every use of backticks in the
documentation to an inline literal (they must be cleaned up,
or the example above would literally show "{tilde}" in the
output).

Problematic sites were found by grepping for '`.*[{\\]' and
examined and fixed manually. The results were then verified
by comparing the output of "html2text" on the set of
generated html pages. Doing so revealed that in addition to
making the source more readable, this patch fixes several
formatting bugs:

- HTML rendering used the ellipsis character instead of
literal "..." in code examples (like "git log A...B")

- some code examples used the right-arrow character
instead of '->' because they failed to quote

- api-config.txt did not quote tilde, and the resulting
HTML contained a bogus snippet like:

<tt><sub></tt> foo <tt></sub>bar</tt>

which caused some parsers to choke and omit whole
sections of the page.

- git-commit.txt confused ``foo`` (backticks inside a
literal) with ``foo'' (matched double-quotes)

- mentions of `A U Thor <author@example.com>` used to
erroneously auto-generate a mailto footnote for
author@example.com

- the description of --word-diff=plain incorrectly showed
the output as "[-removed-] and {added}", not "{+added+}".

- using "prime" notation like:

commit `C` and its replacement `C'`

confused asciidoc into thinking that everything between
the first backtick and the final apostrophe were meant
to be inside matched quotes

- asciidoc got confused by the escaping of some of our
asterisks. In particular,

`credential.\*` and `credential.<url>.\*`

properly escaped the asterisk in the first case, but
literally passed through the backslash in the second
case.

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

gitweb: Option to not display information about ownerKacper Kornet Thu, 26 Apr 2012 16:45:44 +0000 (18:45 +0200)

gitweb: Option to not display information about owner

In some setups the repository owner is not a well defined concept
and administrator can prefer it to be not shown. This commit add
and an option that enable to reach this effect.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.11Junio C Hamano Thu, 26 Apr 2012 18:02:36 +0000 (11:02 -0700)

Update draft release notes to 1.7.11

A handful of topics have been merged to maintenance releases, and
the first half of 6th batch graduates to 'master'.

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

Merge branch 'rl/maint-stash-i18n-save-error'Junio C Hamano Thu, 26 Apr 2012 17:59:08 +0000 (10:59 -0700)

Merge branch 'rl/maint-stash-i18n-save-error'

The i18n of error message "git stash save" was not properly done.

By Ross Lagerwall
* rl/maint-stash-i18n-save-error:
stash: use eval_gettextln correctly

Merge branch 'mb/fetch-call-a-non-branch-a-ref'Junio C Hamano Thu, 26 Apr 2012 17:57:43 +0000 (10:57 -0700)

Merge branch 'mb/fetch-call-a-non-branch-a-ref'

The report from "git fetch" said "new branch" even for a non branch
ref.

By Marc Branchaud
* mb/fetch-call-a-non-branch-a-ref:
fetch: describe new refs based on where it came from
fetch: Give remote_ref to update_local_ref() as well

Merge branch 'jm/maint-strncpy-diff-no-index'Junio C Hamano Thu, 26 Apr 2012 17:56:19 +0000 (10:56 -0700)

Merge branch 'jm/maint-strncpy-diff-no-index'

The "diff --no-index" codepath used limited-length buffers,
risking pathnames getting truncated. Update it to use the
strbuf API.

By Jim Meyering (1) and Junio C Hamano (1)
* jm/maint-strncpy-diff-no-index:
diff --no-index: use strbuf for temporary pathnames
diff: avoid stack-buffer-read-overrun for very long name

Merge bundle error message fix inJunio C Hamano Thu, 26 Apr 2012 17:54:58 +0000 (10:54 -0700)

Merge bundle error message fix in

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

Start preparing for 1.7.10.1Junio C Hamano Thu, 26 Apr 2012 17:40:08 +0000 (10:40 -0700)

Start preparing for 1.7.10.1

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

Merge branch 'jk/run-command-eacces' into maintJunio C Hamano Thu, 26 Apr 2012 17:51:40 +0000 (10:51 -0700)

Merge branch 'jk/run-command-eacces' into maint

When PATH contains an unreadable directory, alias expansion code did
not kick in, and failed with an error that said "git-subcmd" was not
found.

By Jeff King (1) and Ramsay Jones (1)
* jk/run-command-eacces:
run-command: treat inaccessible directories as ENOENT
compat/mingw.[ch]: Change return type of exec functions to int

Merge branch 'jc/push-upstream-sanity' into maintJunio C Hamano Thu, 26 Apr 2012 17:51:18 +0000 (10:51 -0700)

Merge branch 'jc/push-upstream-sanity' into maint

The 'push to upstream' implementation was broken in some corner
cases. "git push $there" without refspec, when the current branch is
set to push to a remote different from $there, used to push to $there
using the upstream information to a remote unreleated to $there.

* jc/push-upstream-sanity:
push: error out when the "upstream" semantics does not make sense

Merge branch 'jc/maint-clean-nested-worktree-in-subdir... Junio C Hamano Thu, 26 Apr 2012 17:35:42 +0000 (10:35 -0700)

Merge branch 'jc/maint-clean-nested-worktree-in-subdir' into maint

"git clean -d -f" (not "-d -f -f") is supposed to protect nested
working trees of independent git repositories that exist in the
current project working tree from getting removed, but the protection
applied only to such working trees that are at the top-level of the
current project by mistake.

* jc/maint-clean-nested-worktree-in-subdir:
clean: preserve nested git worktree in subdirectories

Merge branch 'jk/diff-no-rename-empty' into maintJunio C Hamano Thu, 26 Apr 2012 17:35:33 +0000 (10:35 -0700)

Merge branch 'jk/diff-no-rename-empty' into maint

Rename detection logic used to match two empty files as renames during
merge-recursive, leading unnatural mismerges.

By Jeff King
* jk/diff-no-rename-empty:
merge-recursive: don't detect renames of empty files
teach diffcore-rename to optionally ignore empty content
make is_empty_blob_sha1 available everywhere
drop casts from users EMPTY_TREE_SHA1_BIN

Merge branch 'rs/combine-diff-zero-context-at-the-begin... Junio C Hamano Thu, 26 Apr 2012 17:35:25 +0000 (10:35 -0700)

Merge branch 'rs/combine-diff-zero-context-at-the-beginning' into maint

An age-old corner case bug in combine diff (only triggered with -U0
and the hunk at the beginning of the file needs to be shown) has been
fixed.

By René Scharfe
* rs/combine-diff-zero-context-at-the-beginning:
combine-diff: fix loop index underflow

Merge branch 'jc/commit-unedited-template' into maintJunio C Hamano Thu, 26 Apr 2012 17:35:15 +0000 (10:35 -0700)

Merge branch 'jc/commit-unedited-template' into maint

When "git commit --template F" errors out because the user did not
touch the message, it claimed that it aborts due to "empty message",
which was utterly wrong.

By Junio C Hamano (4) and Adam Monsen (1)
* jc/commit-unedited-template:
Documentation/git-commit: rephrase the "initial-ness" of templates
git-commit.txt: clarify -t requires editing message
commit: rephrase the error when user did not touch templated log message
commit: do not trigger bogus "has templated message edited" check
t7501: test the right kind of breakage

Merge branch 'jk/add-p-skip-conflicts' into maintJunio C Hamano Thu, 26 Apr 2012 17:35:07 +0000 (10:35 -0700)

Merge branch 'jk/add-p-skip-conflicts' into maint

"git add -p" is not designed to deal with unmerged paths but did
not exclude them and tried to apply funny patches only to fail.

By Jeff King
* jk/add-p-skip-conflicts:
add--interactive: ignore unmerged entries in patch mode

Merge branch 'jc/commit-hook-authorship' into maintJunio C Hamano Thu, 26 Apr 2012 17:34:53 +0000 (10:34 -0700)

Merge branch 'jc/commit-hook-authorship' into maint

"git commit --author=$name" did not tell the name that was being
recorded in the resulting commit to hooks, even though it does do so
when the end user overrode the authorship via the "GIT_AUTHOR_NAME"
environment variable.

* jc/commit-hook-authorship:
commit: pass author/committer info to hooks
t7503: does pre-commit-hook learn authorship?
ident.c: add split_ident_line() to parse formatted ident line

Merge branch 'tr/maint-word-diff-regex-sticky' into... Junio C Hamano Thu, 26 Apr 2012 17:34:43 +0000 (10:34 -0700)

Merge branch 'tr/maint-word-diff-regex-sticky' into maint

The regexp configured with diff.wordregex was incorrectly reused
across files.

By Thomas Rast (2) and Johannes Sixt (1)
* tr/maint-word-diff-regex-sticky:
diff: tweak a _copy_ of diff_options with word-diff
diff: refactor the word-diff setup from builtin_diff_cmd
t4034: diff.*.wordregex should not be "sticky" in --word-diff

Merge branch 'jh/notes-merge-in-git-dir-worktree' into... Junio C Hamano Thu, 26 Apr 2012 17:32:55 +0000 (10:32 -0700)

Merge branch 'jh/notes-merge-in-git-dir-worktree' into maint

Running "notes merge --commit" failed to perform correctly when run
from any directory inside $GIT_DIR/. When "notes merge" stops with
conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits
to resolve it.

By Johan Herland (3) and Junio C Hamano (1)
* jh/notes-merge-in-git-dir-worktree:
notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the user's cwd
notes-merge: use opendir/readdir instead of using read_directory()
t3310: illustrate failure to "notes merge --commit" inside $GIT_DIR/
remove_dir_recursively(): Add flag for skipping removal of toplevel dir

Sync with 1.7.9.7Junio C Hamano Thu, 26 Apr 2012 17:31:43 +0000 (10:31 -0700)

Sync with 1.7.9.7

Git 1.7.9.7 v1.7.9.7Junio C Hamano Thu, 26 Apr 2012 17:23:15 +0000 (10:23 -0700)

Git 1.7.9.7

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

Sync with 1.7.8.6Junio C Hamano Thu, 26 Apr 2012 17:22:20 +0000 (10:22 -0700)

Sync with 1.7.8.6

Git 1.7.8.6 v1.7.8.6Junio C Hamano Thu, 26 Apr 2012 16:59:22 +0000 (09:59 -0700)

Git 1.7.8.6

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

Sync with 1.7.7.7Junio C Hamano Thu, 26 Apr 2012 16:52:33 +0000 (09:52 -0700)

Sync with 1.7.7.7

Git 1.7.7.7 v1.7.7.7Junio C Hamano Thu, 26 Apr 2012 16:41:52 +0000 (09:41 -0700)

Git 1.7.7.7

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

diff --no-index: use strbuf for temporary pathnamesJunio C Hamano Wed, 25 Apr 2012 19:37:38 +0000 (12:37 -0700)

diff --no-index: use strbuf for temporary pathnames

Instead of using limited-length buffers and risking of pathname
truncation, we should be taking advantage of strbuf API nowadays.

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

bundle: remove stray single-quote from error messageJonathan Nieder Thu, 26 Apr 2012 05:53:59 +0000 (00:53 -0500)

bundle: remove stray single-quote from error message

After running rev-list --boundary to retrieve the list of boundary
commits, "git bundle create" runs its own revision walk. If in this
stage git encounters an unfamiliar option, it writes a message with an
unbalanced quotation mark:

error: unrecognized argument: --foo'

Drop the stray quote to match the "unrecognized argument: %s" message
used elsewhere and save translators some work.

This is mostly a futureproofing measure: for now, the "rev-list
--boundary" command catches most strange arguments on its own and the
above message is not seen unless you try something esoteric like "git
bundle create test.bundle --header HEAD".

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

config: reject bogus section names for --rename-sectionJeff King Thu, 26 Apr 2012 01:47:14 +0000 (21:47 -0400)

config: reject bogus section names for --rename-section

You can feed junk to "git config --rename-section", which
will result in a config file that git will not even parse
(so you cannot fix it with git-config). We already have
syntactic sanity checks when setting a variable; let's do
the same for section names.

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

gitweb: Option to omit column with time of the last... Kacper Kornet Tue, 24 Apr 2012 17:39:15 +0000 (19:39 +0200)

gitweb: Option to omit column with time of the last change

Generating information about last change for a large number of git
repositories can be very time consuming. This commit add an option to
omit 'Last Change' column when presenting the list of repositories.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Don't set owner if got empty value from project... Kacper Kornet Tue, 24 Apr 2012 17:50:05 +0000 (19:50 +0200)

gitweb: Don't set owner if got empty value from projects.list

Prevent setting owner to an empty value if it is not specified in
projects.list file. Otherwise it stops retrieving information about the
owner from other files.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: remove commit_list_reverse()René Scharfe Wed, 25 Apr 2012 20:35:54 +0000 (22:35 +0200)

commit: remove commit_list_reverse()

The function commit_list_reverse() is not used anymore; delete it.

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

revision: append to list instead of insert and reverseRené Scharfe Wed, 25 Apr 2012 20:35:41 +0000 (22:35 +0200)

revision: append to list instead of insert and reverse

By using commit_list_insert(), we added new items to the top of the
list and, since this is not the order we want, reversed it afterwards.
Simplify this process by adding new items at the bottom instead,
getting rid of the reversal step.

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

sequencer: export commit_list_append()René Scharfe Wed, 25 Apr 2012 20:35:27 +0000 (22:35 +0200)

sequencer: export commit_list_append()

This function can be used in other parts of git. Give it a new home
in commit.c.

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

get_ref_dir(): return early if directory cannot be... Michael Haggerty Tue, 24 Apr 2012 22:45:07 +0000 (00:45 +0200)

get_ref_dir(): return early if directory cannot be read

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

help: replace underlining "help -a" headers using hyphe... Nguyễn Thái Ngọc Duy Wed, 25 Apr 2012 11:21:53 +0000 (18:21 +0700)

help: replace underlining "help -a" headers using hyphens with a blank line

We used to underline a header text, like this:

This is a header
----------------
content...

But calculating text length so that the dashes align with the text
could get complicated because the text could be in any charset in
translated Git.

There is no point to use this pseudo underline; simply a blank
line would do and it even makes it easier to read:

This is a header

content...

While at it, give translators more context to translate, e.g.
e.g. "git commands available..." instead of "%s available..."

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

git p4: fix unit testsLuke Diamand Wed, 25 Apr 2012 08:16:54 +0000 (09:16 +0100)

git p4: fix unit tests

The submit-edit tests relied on P4EDITOR being unset. Set it
explicitly to an empty string.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Avoid Meta1-F5Felipe Contreras Sat, 7 Apr 2012 00:29:38 +0000 (03:29 +0300)

gitk: Avoid Meta1-F5

Meta1-F5 is commonly mapped by window managers and what not.
Use Shift-F5 instead.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

git-rebase: add keep_empty flagNeil Horman Fri, 20 Apr 2012 14:36:17 +0000 (10:36 -0400)

git-rebase: add keep_empty flag

Add a command line switch to git-rebase to allow a user the ability to specify
that they want to keep any commits in a series that are empty.

When git-rebase's type is am, then this option will automatically keep any
commit that has a tree object identical to its parent.

This patch changes the default behavior of interactive rebases as well. With
this patch, git-rebase -i will produce a revision set passed to
git-revision-editor, in which empty commits are commented out. Empty commits
may be kept manually by uncommenting them. If the new --keep-empty option is
used in an interactive rebase the empty commits will automatically all be
uncommented in the editor.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push.default doc: explain simple after upstreamJunio C Hamano Tue, 24 Apr 2012 19:21:12 +0000 (12:21 -0700)

push.default doc: explain simple after upstream

As the "simple" mode is described in terms of what "upstream" does,
swap the order of these two entries so that the reader sees "upstream"
first and then reads "simple" with the knowledge of what "upstream"
does.

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

push: document the future default change for push.defau... Matthieu Moy Tue, 24 Apr 2012 07:50:05 +0000 (09:50 +0200)

push: document the future default change for push.default (matching -> simple)

It is too early to start warning loudly about the future default change
in favor of 'simple', since many users use different versions of Git, and
would be harmed if we advised them to explicitely set
'push.default=simple' when using old versions of Git.

Still, we want to document the upcomming change so that:

* Users who may be affected by the change get one more chance to know it
in advance.

* We actually commit to changing the default, and avoid repeating past
errors.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5570: use explicit push refspecClemens Buchacher Tue, 24 Apr 2012 07:50:04 +0000 (09:50 +0200)

t5570: use explicit push refspec

The default mode for push without arguments will change. Some warnings
are about to be enabled for such use, which causes some t5570 tests to
fail because they do not expect this output.

Fix this by passing an explicit refspec to git push. To that end, change
the calling conventions of test_remote_error in order to accomodate
extra command arguments.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push: introduce new push.default mode "simple"Matthieu Moy Tue, 24 Apr 2012 07:50:03 +0000 (09:50 +0200)

push: introduce new push.default mode "simple"

When calling "git push" without argument, we want to allow Git to do
something simple to explain and safe. push.default=matching is unsafe
when used to push to shared repositories, and hard to explain to
beginners in some contexts. It is debatable whether 'upstream' or
'current' is the safest or the easiest to explain, so introduce a new
mode called 'simple' that is the intersection of them: push to the
upstream branch, but only if it has the same name remotely. If not, give
an error that suggests the right command to push explicitely to
'upstream' or 'current'.

A question is whether to allow pushing when no upstream is configured. An
argument in favor of allowing the push is that it makes the new mode work
in more cases. On the other hand, refusing to push when no upstream is
configured encourages the user to set the upstream, which will be
beneficial on the next pull. Lacking better argument, we chose to deny
the push, because it will be easier to change in the future if someone
shows us wrong.

Original-patch-by: Jeff King <peff@peff.net>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

i18n: bundle: mark strings for translationNguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:30 +0000 (19:30 +0700)

i18n: bundle: mark strings for translation

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

i18n: index-pack: mark strings for translationNguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:29 +0000 (19:30 +0700)

i18n: index-pack: mark strings for translation

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

i18n: apply: update say_patch_name to give translators... Nguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:28 +0000 (19:30 +0700)

i18n: apply: update say_patch_name to give translators complete sentence

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

i18n: apply: mark strings for translationNguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:27 +0000 (19:30 +0700)

i18n: apply: mark strings for translation

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

i18n: remote: mark strings for translationNguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:26 +0000 (19:30 +0700)

i18n: remote: mark strings for translation

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

i18n: make warn_dangling_symref() automatically append \nNguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:25 +0000 (19:30 +0700)

i18n: make warn_dangling_symref() automatically append \n

This helps remove \n from translatable strings

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

i18n: help: mark strings for translationNguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:24 +0000 (19:30 +0700)

i18n: help: mark strings for translation

This patch also marks most common commands' synopsis for translation
so that "git help" gives a friendly listing.

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

i18n: mark relative dates for translationJonathan Nieder Mon, 23 Apr 2012 12:30:23 +0000 (19:30 +0700)

i18n: mark relative dates for translation

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

strbuf: convenience format functions with \n automatica... Nguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:22 +0000 (19:30 +0700)

strbuf: convenience format functions with \n automatically appended

These functions are helpful when we do not want to expose \n to
translators. For example

printf("hello world\n");

can be converted to

printf_ln(_("hello world"));

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

git-remote-testgit: fix race when spawning fast-importPete Wyckoff Sun, 22 Apr 2012 20:30:58 +0000 (16:30 -0400)

git-remote-testgit: fix race when spawning fast-import

Test "pushing to local repo" in t5800-remote-helpers can hang
due to a race condition in git-remote-testgit. Fix it by
setting stdin to unbuffered.

On the writer side, "git push" invokes push_refs_with_export(),
which sends to stdout the command "export\n" and immediately
starts up "git fast-export". The latter writes its output stream
to the same stdout.

On the reader side, remote helper "git-remote-testgit" reads from
stdin to get its next command. It uses getc() to read characters
from libc up until \n. Libc has buffered a potentially much
larger chunk of stdin. When it sees the "export\n" command, it
forks "git fast-import" to read the stream.

If fast-export finishes before git fast-import starts, the
fast-export output can end up in libc's buffer in
git-remote-testgit, rather than in git fast-import. The latter
hangs indefinitely on a now-empty stdin.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cherry-pick: Add test to validate new optionsNeil Horman Fri, 20 Apr 2012 14:36:16 +0000 (10:36 -0400)

git-cherry-pick: Add test to validate new options

Since we've added the --allow-empty and --keep-redundant-commits
options to git cherry-pick we should also add a test to ensure that its working
properly.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cherry-pick: Add keep-redundant-commits optionNeil Horman Fri, 20 Apr 2012 14:36:15 +0000 (10:36 -0400)

git-cherry-pick: Add keep-redundant-commits option

The git-cherry-pick --allow-empty command by default only preserves empty
commits that were originally empty, i.e only those commits for which
<commit>^{tree} and <commit>^^{tree} are equal. By default commits which are
non-empty, but were made empty by the inclusion of a prior commit on the current
history are filtered out. This option allows us to override that behavior and
include redundant commits as empty commits in the change history.

Note that this patch changes the default behavior of git cherry-pick slightly.
Prior to this patch all commits in a cherry-pick sequence were applied and git
commit was run. The implication here was that, if a commit was redundant, and
the commit did not trigger the fast forward logic, the git commit operation, and
therefore the git cherry-pick operation would fail, displaying the cherry pick
advice (i.e. run git commit --allow-empty). With this patch however, such
redundant commits are automatically skipped without stopping, unless
--keep-redundant-commits is specified, in which case, they are automatically
applied as empty commits.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

The fifth batch of topics graduated to 'master'Junio C Hamano Tue, 24 Apr 2012 21:50:06 +0000 (14:50 -0700)

The fifth batch of topics graduated to 'master'

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

Merge branch 'fc/completion-tests'Junio C Hamano Tue, 24 Apr 2012 21:41:22 +0000 (14:41 -0700)

Merge branch 'fc/completion-tests'

By Felipe Contreras (4) and others
* fc/completion-tests:
completion: fix completion after 'git --option <TAB>'
completion: avoid trailing space for --exec-path
completion: add missing general options
completion: simplify by using $prev
completion: simplify __gitcomp_1
tests: add tests for the __gitcomp() completion helper function
tests: add initial bash completion tests

Merge branch 'cc/fix-missing-va-end-in-revert'Junio C Hamano Tue, 24 Apr 2012 21:41:16 +0000 (14:41 -0700)

Merge branch 'cc/fix-missing-va-end-in-revert'

By Christian Couder
* cc/fix-missing-va-end-in-revert:
revert: add missing va_end

Merge branch 'zj/upstream-error-message'Junio C Hamano Tue, 24 Apr 2012 21:41:08 +0000 (14:41 -0700)

Merge branch 'zj/upstream-error-message'

Error message given when @{u} is used for a branch without its
upstream configured have been clatified.

By Zbigniew Jędrzejewski-Szmek
* zj/upstream-error-message:
i18n: mark @{upstream} error messages for translation
Be more specific if upstream branch is not tracked
Provide better message for barnhc_wiht_tpyo@{u}
Provide branch name in error message when using @{u}
t1507: add tests to document @{upstream} behaviour

Merge branch 'mk/gitweb-diff-hl'Junio C Hamano Tue, 24 Apr 2012 21:41:01 +0000 (14:41 -0700)

Merge branch 'mk/gitweb-diff-hl'

"gitweb" learns to highlight the patch it outputs even more.

By Michał Kiedrowicz (7) and Jakub Narębski (1)
* mk/gitweb-diff-hl:
gitweb: Refinement highlightning in combined diffs
gitweb: Highlight interesting parts of diff
gitweb: Push formatting diff lines to print_diff_chunk()
gitweb: Use print_diff_chunk() for both side-by-side and inline diffs
gitweb: Extract print_sidebyside_diff_lines()
gitweb: Pass esc_html_hl_regions() options to esc_html()
gitweb: esc_html_hl_regions(): Don't create empty <span> elements
gitweb: Use descriptive names in esc_html_hl_regions()

Merge branch 'it/fetch-pack-many-refs'Junio C Hamano Tue, 24 Apr 2012 21:40:51 +0000 (14:40 -0700)

Merge branch 'it/fetch-pack-many-refs'

When "git fetch" encounters repositories with too many references, the
command line of "fetch-pack" that is run by a helper e.g. remote-curl,
may fail to hold all of them. Now such an internal invocation can feed
the references through the standard input of "fetch-pack".

By Ivan Todoroski
* it/fetch-pack-many-refs:
remote-curl: main test case for the OS command line overflow
fetch-pack: test cases for the new --stdin option
remote-curl: send the refs to fetch-pack on stdin
fetch-pack: new --stdin option to read refs from stdin

Merge branch 'pw/fast-import-dataref-parsing'Junio C Hamano Tue, 24 Apr 2012 21:40:45 +0000 (14:40 -0700)

Merge branch 'pw/fast-import-dataref-parsing'

The parser in "fast-import" did not diagnose ":9" style references
that is not followed by required SP/LF as an error.

By Pete Wyckoff
* pw/fast-import-dataref-parsing:
fast-import: tighten parsing of datarefs

Merge branch 'mh/ref-api'Junio C Hamano Tue, 24 Apr 2012 21:40:28 +0000 (14:40 -0700)

Merge branch 'mh/ref-api'

Allows walking only a sub-hierarchy in refs/*.

By Michael Haggerty
* mh/ref-api:
do_for_each_ref(): only iterate over the subtree that was requested
refs: store references hierarchically
sort_ref_dir(): simplify logic
refs.c: rename ref_array -> ref_dir
struct ref_entry: nest the value part in a union
check_refname_component(): return 0 for zero-length components
free_ref_entry(): new function
names_conflict(): simplify implementation
repack_without_ref(): reimplement using do_for_each_ref_in_array()
do_for_each_ref_in_arrays(): new function
do_for_each_ref_in_array(): new function
refs: manage current_ref within do_one_ref()
refs.c: reorder definitions more logically

Merge branch 'hv/submodule-recurse-push'Junio C Hamano Tue, 24 Apr 2012 21:40:20 +0000 (14:40 -0700)

Merge branch 'hv/submodule-recurse-push'

"git push --recurse-submodules" learns to optionally look into the
histories of submodules bound to the superproject and push them out.

By Heiko Voigt
* hv/submodule-recurse-push:
push: teach --recurse-submodules the on-demand option
Refactor submodule push check to use string list instead of integer
Teach revision walking machinery to walk multiple times sequencially

git p4: move verbose to base classLuke Diamand Tue, 24 Apr 2012 08:33:23 +0000 (09:33 +0100)

git p4: move verbose to base class

The verbose flag is common to all classes, or at least should be.
Make it a member of the base Command class, rather than
reimplementing for each class. Make option parsing mirror this.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4: Ignore P4EDITOR if it is emptyLuke Diamand Tue, 24 Apr 2012 08:33:21 +0000 (09:33 +0100)

git p4: Ignore P4EDITOR if it is empty

p4 itself treats an empty value for P4EDITOR as the same as
having P4EDITOR unset. Do the same for "git p4".

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4: Squash P4EDITOR in test harnessLuke Diamand Tue, 24 Apr 2012 08:33:20 +0000 (09:33 +0100)

git p4: Squash P4EDITOR in test harness

If P4EDITOR is set in the environment, test behavior could be
unpredictable. Set it explicitly.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4: fix-up "import/export of labels to/from p4"Luke Diamand Wed, 11 Apr 2012 15:21:24 +0000 (17:21 +0200)

git p4: fix-up "import/export of labels to/from p4"

The previous one is already in 'next' but was somewhat lacking.

The configuration "git-p4.validLabelRegexp" is now called
"labelExportRegexp", and its default covers lowercase alphabets as
well.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5528-push-default.sh: add helper functionsMatthieu Moy Tue, 24 Apr 2012 07:50:02 +0000 (09:50 +0200)

t5528-push-default.sh: add helper functions

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Undocument deprecated alias 'push.default=tracking'Matthieu Moy Tue, 24 Apr 2012 07:50:01 +0000 (09:50 +0200)

Undocument deprecated alias 'push.default=tracking'

It's been deprecated since 53c4031 (Johan Herland, Wed Feb 16 2011,
push.default: Rename 'tracking' to 'upstream'), so it's OK to remove it
from documentation (even though it's still supported) to make the
explanations more readable.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: explain push.default option a bit moreMatthieu Moy Tue, 24 Apr 2012 07:50:00 +0000 (09:50 +0200)

Documentation: explain push.default option a bit more

The previous documentation was explaining _what_ the options were doing,
but were of little help explaining _why_ a user should set his default to
either of the options.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: drop redundant blocking of SIGPIPERoman Kagan Mon, 23 Apr 2012 16:26:56 +0000 (20:26 +0400)

git-svn: drop redundant blocking of SIGPIPE

Now that SIGPIPE is ignored there's no point blocking it.

Signed-off-by: Roman Kagan <rkagan@mail.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: ignore SIGPIPERoman Kagan Mon, 2 Apr 2012 13:52:34 +0000 (17:52 +0400)

git-svn: ignore SIGPIPE

In HTTP with keep-alive it's not uncommon for the client to notice that
the server decided to stop maintaining the current connection only when
sending a new request. This naturally results in -EPIPE and possibly
SIGPIPE.

The subversion library itself makes no provision for SIGPIPE. Some
combinations of the underlying libraries do (typically SIG_IGN-ing it),
some don't.

Presumably for that reason all subversion commands set SIGPIPE to
SIG_IGN early in their main()-s.

So should we.

This, together with the previous patch, fixes the notorious "git-svn
died of signal 13" problem (see e.g.
http://thread.gmane.org/gmane.comp.version-control.git/134936).

Signed-off-by: Roman Kagan <rkagan@mail.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: use POSIX::sigprocmask to block signalsRoman Kagan Mon, 2 Apr 2012 13:29:32 +0000 (17:29 +0400)

git-svn: use POSIX::sigprocmask to block signals

In order to maintain consistency of the database mapping svn revision
numbers to git commit ids, rev_map_set() defers signal processing until
it's finished with an append transaction.[*]

The conventional way to achieve this is through sigprocmask(), which is
available in perl in the standard POSIX module.

This is implemented by this patch. One important consequence of it is
that the signal handlers won't be unconditionally set to SIG_DFL anymore
upon the first invocation of rev_map_set() as they used to. As a
result, the signals ignored by git-svn parent will remain ignored;
otherwise the behavior remains the same.

This patch paves the way to ignoring SIGPIPE throughout git-svn which
will be done in the followup patch.

[*] Deferring signals is not enough to ensure the database consistency:
the program may die on SIGKILL or power loss, run out of disk space,
etc. However that's a separate issue that this patch doesn't address.

Signed-off-by: Roman Kagan <rkagan@mail.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>

RelNotes: the fourth batch of topics graduated to ... Junio C Hamano Mon, 23 Apr 2012 20:30:22 +0000 (13:30 -0700)

RelNotes: the fourth batch of topics graduated to 'master'

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

Merge branch 'bw/test-fix-grep-gnuism'Junio C Hamano Mon, 23 Apr 2012 20:02:15 +0000 (13:02 -0700)

Merge branch 'bw/test-fix-grep-gnuism'

Fix two places that were the only place in the test suite that gave "a\+"
to platform grep and expected it to mean one or more "a", which is a
blatant GNUism.

* bw/test-fix-grep-gnuism:
t9400: fix gnuism in grep

Merge branch 'rj/submodule-mswin-path'Junio C Hamano Mon, 23 Apr 2012 20:01:49 +0000 (13:01 -0700)

Merge branch 'rj/submodule-mswin-path'

By Ramsay Jones
* rj/submodule-mswin-path:
git-submodule.sh: Don't use $path variable in eval_gettext string

Merge branch 'rj/sh-setup-mswin-pwd'Junio C Hamano Mon, 23 Apr 2012 20:01:46 +0000 (13:01 -0700)

Merge branch 'rj/sh-setup-mswin-pwd'

By Ramsay Jones
* rj/sh-setup-mswin-pwd:
git-sh-setup.sh: Add an pwd() function for MinGW

Merge branch 'rj/mingw-isguid'Junio C Hamano Mon, 23 Apr 2012 20:01:42 +0000 (13:01 -0700)

Merge branch 'rj/mingw-isguid'

By Ramsay Jones
* rj/mingw-isguid:
compat/mingw.h: Set S_ISUID to prevent a fast-import test failure

Merge branch 'jn/fast-import-doc'Junio C Hamano Mon, 23 Apr 2012 20:01:32 +0000 (13:01 -0700)

Merge branch 'jn/fast-import-doc'

By Jonathan Nieder
* jn/fast-import-doc:
fast-import doc: cat-blob and ls responses need to be consumed quickly

Merge branch 'jn/more-i18ncmp'Junio C Hamano Mon, 23 Apr 2012 20:01:28 +0000 (13:01 -0700)

Merge branch 'jn/more-i18ncmp'

By Jonathan Nieder
* jn/more-i18ncmp:
test: am of empty patch should not succeed
test: use test_i18ncmp for "Patch format detection failed" message
test: do not rely on US English tracking-info messages

Merge branch 'jl/maint-submodule-recurse-fetch'Junio C Hamano Mon, 23 Apr 2012 19:58:28 +0000 (12:58 -0700)

Merge branch 'jl/maint-submodule-recurse-fetch'

"git fetch" that recurses into submodules on demand did not check if
it needs to go into submodules when non branches (most notably, tags)
are fetched.

By Jens Lehmann
* jl/maint-submodule-recurse-fetch:
submodules: recursive fetch also checks new tags for submodule commits

Merge branch 'jc/maint-blame-minimal'Junio C Hamano Mon, 23 Apr 2012 19:58:22 +0000 (12:58 -0700)

Merge branch 'jc/maint-blame-minimal'

"git blame" started missing quite a few changes from the origin since we
stopped using the diff minimalization by default in v1.7.2 era.

* jc/maint-blame-minimal:
blame: accept --need-minimal

Merge branch 'lp/maint-diff-three-dash-with-graph'Junio C Hamano Mon, 23 Apr 2012 19:57:20 +0000 (12:57 -0700)

Merge branch 'lp/maint-diff-three-dash-with-graph'

"log -p --graph" used with "--stat" had a few formatting error.

By Lucian Poston
* lp/maint-diff-three-dash-with-graph:
t4202: add test for "log --graph --stat -p" separator lines
log --graph: fix break in graph lines
log --graph --stat: three-dash separator should come after graph lines

Merge branch 'rs/commit-list-sort-in-batch'Junio C Hamano Mon, 23 Apr 2012 19:52:54 +0000 (12:52 -0700)

Merge branch 'rs/commit-list-sort-in-batch'

Setting up a revision traversal with many starting points was inefficient
as these were placed in a date-order priority queue one-by-one.

By René Scharfe (3) and Junio C Hamano (1)
* rs/commit-list-sort-in-batch:
mergesort: rename it to llist_mergesort()
revision: insert unsorted, then sort in prepare_revision_walk()
commit: use mergesort() in commit_list_sort_by_date()
add mergesort() for linked lists

Merge branch 'jh/apply-free-patch'Junio C Hamano Mon, 23 Apr 2012 19:52:18 +0000 (12:52 -0700)

Merge branch 'jh/apply-free-patch'

Valgrind reports quite a lot of discarded memory inside apply.
Fix them, audit and document the buffer ownership rules.

By Junio C Hamano (8) and Jared Hance (1)
* jh/apply-free-patch:
apply: document buffer ownership rules across functions
apply: tighten constness of line buffer
apply: drop unused macro
apply: free unused fragments for submodule patch
apply: free patch->result
apply: release memory for fn_table
apply: free patch->{def,old,new}_name fields
apply: rename free_patch() to free_patch_list()
apply: do not leak patches and fragments

Merge branch 'sl/test-wc-l-line-count'Junio C Hamano Mon, 23 Apr 2012 19:43:10 +0000 (12:43 -0700)

Merge branch 'sl/test-wc-l-line-count'

By Stefano Lattarini
* sl/test-wc-l-line-count:
tests: modernise style: more uses of test_line_count

Merge branch 'jn/debian-customizes-default-editor'Junio C Hamano Mon, 23 Apr 2012 19:41:15 +0000 (12:41 -0700)

Merge branch 'jn/debian-customizes-default-editor'

Make it easier for distros to document custom pager and editor they
used when building their binary releases in "git var" documentation.

By Jonathan Nieder
* jn/debian-customizes-default-editor:
var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settings
var doc: default editor and pager are configurable at build time

Merge branch 'rl/show-empty-prefix'Junio C Hamano Mon, 23 Apr 2012 19:40:08 +0000 (12:40 -0700)

Merge branch 'rl/show-empty-prefix'

"git rev-parse --show-prefix" emitted nothing when run at the
top-level of the working tree, while "git rev-parse --show-cdup" gave
an empty line. Make them consistent.

By Ross Lagerwall
* rl/show-empty-prefix:
rev-parse --show-prefix: add in trailing newline

Merge branch 'pw/git-p4'Junio C Hamano Mon, 23 Apr 2012 19:40:02 +0000 (12:40 -0700)

Merge branch 'pw/git-p4'

By Pete Wyckoff
* pw/git-p4:
git p4: use "git p4" directly in tests
git p4: update name in script
git-p4: move to toplevel

Merge branch 'ms/remote-usage-string'Junio C Hamano Mon, 23 Apr 2012 19:39:17 +0000 (12:39 -0700)

Merge branch 'ms/remote-usage-string'

Adds some subcommands that were not listed in "git remote --help"
usage strings.

As an independent follow-up, we may want to rethink how the overall
usage string and subcommand usage strings are maintained.

By Michael Schubert
* ms/remote-usage-string:
remote: update builtin usage

Merge branch 'jk/rebase-i-submodule-conflict-only'Junio C Hamano Mon, 23 Apr 2012 19:39:04 +0000 (12:39 -0700)

Merge branch 'jk/rebase-i-submodule-conflict-only'

Giving "--continue" to a conflicted "rebase -i" session skipped a commit
that only results in changes to submodules.

By John Keeping
* jk/rebase-i-submodule-conflict-only:
rebase -i continue: don't skip commits that only change submodules

difftool: print list of valid tools with '--tool-help'Tim Henigan Thu, 29 Mar 2012 13:39:18 +0000 (09:39 -0400)

difftool: print list of valid tools with '--tool-help'

Since bc7a96a (mergetool--lib: Refactor tools into separate files,
2011-08-18), it is possible to add a new diff tool by creating a simple
script in the '$(git --exec-path)/mergetools' directory. Updating the
difftool help text is still a manual process, and the documentation can
easily go out of sync.

This commit teaches difftool the '--tool-help' option, which:
- Reads the list of valid tools from 'mergetools/*'
- Determines which of them are actually installed
- Determines which are capable of diffing (i.e. not just a merge tool)
- Prints the resulting list for the user

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

difftool: teach difftool to handle directory diffsTim Henigan Mon, 23 Apr 2012 18:23:41 +0000 (14:23 -0400)

difftool: teach difftool to handle directory diffs

When 'difftool' is called to compare a range of commits that modify
more than one file, it opens a separate instance of the diff tool for
each file that changed.

The new '--dir-diff' option copies all the modified files to a temporary
location and runs a directory diff on them in a single instance of the
diff tool.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: feed all header files to xgettextNguyễn Thái Ngọc Duy Mon, 23 Apr 2012 12:30:21 +0000 (19:30 +0700)

Makefile: feed all header files to xgettext

Translation markers may be present in header files too. Make sure we
don't miss any.

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

completion: fix completion after 'git --option <TAB>'SZEDER Gábor Sun, 15 Apr 2012 19:44:20 +0000 (22:44 +0300)

completion: fix completion after 'git --option <TAB>'

The bash completion doesn't work when certain options to git itself are
specified, e.g. 'git --no-pager <TAB>' errors out with

error: invalid key: alias.--no-pager

The main _git() completion function finds out the git command name by
looping through all the words on the command line and searching for
the first word that is not a known option for the git command.

Unfortunately the list of known git options was not updated in a long
time, and newer options are not skipped but mistaken for a git command.
Such a misrecognized "command" is then passed to __git_aliased_command(),
which in turn passes it to a 'git config' query, hence the error.

Currently the following options are misrecognized for a git command:

-c --no-pager --exec-path --html-path --man-path --info-path
--no-replace-objects --work-tree= --namespace=

To fix this we could just update the list of options to be skipped,
but the same issue will likely arise, if the git command learns a new
option in the future. Therefore, to make it more future proof against
new options, this patch changes that loop to skip all option-looking
words, i.e. words starting with a dash.

We also have to handle the '-c' option specially, because it takes a
configutation parameter in a separate word, which must be skipped,
too.

[fc: added tests]

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: avoid trailing space for --exec-pathJonathan Nieder Sun, 15 Apr 2012 19:44:19 +0000 (22:44 +0300)

completion: avoid trailing space for --exec-path

"--exec-path" looks to the completion script like an unambiguous
successful completion, but it is wrong to emit a SP after it as if
declaring that we are done with completion; the user could be trying
to do

git --exec-path; # print name of helper directory

or

git --exec-path=/path/to/alternative/helper/dir <subcommand>

so the most helpful thing to do is to leave out the trailing space and
leave it to the operator to type an equal sign or carriage return
according to the situation.

[fc: added tests]

Cc: Andreas Schwab <schwab@linux-m68k.org>
Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: add missing general optionsFelipe Contreras Sun, 15 Apr 2012 19:44:18 +0000 (22:44 +0300)

completion: add missing general options

And add relevant tests.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: simplify by using $prevFelipe Contreras Sun, 15 Apr 2012 19:44:17 +0000 (22:44 +0300)

completion: simplify by using $prev

cword-1 is the previous word ($prev).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: simplify __gitcomp_1Felipe Contreras Sun, 15 Apr 2012 19:44:16 +0000 (22:44 +0300)

completion: simplify __gitcomp_1

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: add tests for the __gitcomp() completion helper... SZEDER Gábor Tue, 17 Apr 2012 10:27:15 +0000 (12:27 +0200)

tests: add tests for the __gitcomp() completion helper function

These tests check that trailing space, prefix, and suffix are added
correctly.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: add missing va_endChristian Couder Sat, 21 Apr 2012 21:15:19 +0000 (23:15 +0200)

revert: add missing va_end

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