gitweb.git
Merge branch 'jk/cat-file-batch-optim'Junio C Hamano Mon, 9 Sep 2013 21:33:07 +0000 (14:33 -0700)

Merge branch 'jk/cat-file-batch-optim'

Rework the reverted change to `cat-file --batch-check`.

* jk/cat-file-batch-optim:
cat-file: only split on whitespace when %(rest) is used

Merge branch 'es/blame-L-more'Junio C Hamano Mon, 9 Sep 2013 21:32:45 +0000 (14:32 -0700)

Merge branch 'es/blame-L-more'

More fixes to the code to parse the "-L" option in "log" and "blame".

* es/blame-L-more:
blame: reject empty ranges -L,+0 and -L,-0
t8001/t8002: blame: demonstrate acceptance of bogus -L,+0 and -L,-0
blame: reject empty ranges -LX,+0 and -LX,-0
t8001/t8002: blame: demonstrate acceptance of bogus -LX,+0 and -LX,-0
log: fix -L bounds checking bug
t4211: retire soon-to-be unimplementable tests
t4211: log: demonstrate -L bounds checking bug
blame: fix -L bounds checking bug
t8001/t8002: blame: add empty file & partial-line tests
t8001/t8002: blame: demonstrate -L bounds checking bug
t8001/t8002: blame: decompose overly-large test

Merge branch 'db/http-savecookies'Junio C Hamano Mon, 9 Sep 2013 21:32:08 +0000 (14:32 -0700)

Merge branch 'db/http-savecookies'

* db/http-savecookies:
t5551: Remove header from curl cookie file
http: add http.savecookies option to write out HTTP cookies

Merge branch 'jc/push-cas'Junio C Hamano Mon, 9 Sep 2013 21:30:29 +0000 (14:30 -0700)

Merge branch 'jc/push-cas'

Allow a safer "rewind of the remote tip" push than blind "--force",
by requiring that the overwritten remote ref to be unchanged since
the new history to replace it was prepared.

The machinery is more or less ready. The "--force" option is again
the big red button to override any safety, thanks to J6t's sanity
(the original round allowed --lockref to defeat --force).

The logic to choose the default implemented here is fragile
(e.g. "git fetch" after seeing a failure will update the
remote-tracking branch and will make the next "push" pass,
defeating the safety pretty easily). It is suitable only for the
simplest workflows, and it may hurt users more than it helps them.

* jc/push-cas:
push: teach --force-with-lease to smart-http transport
send-pack: fix parsing of --force-with-lease option
t5540/5541: smart-http does not support "--force-with-lease"
t5533: test "push --force-with-lease"
push --force-with-lease: tie it all together
push --force-with-lease: implement logic to populate old_sha1_expect[]
remote.c: add command line option parser for "--force-with-lease"
builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN
cache.h: move remote/connect API out of it

Merge branch 'nd/clone-connectivity-shortcut'Junio C Hamano Mon, 9 Sep 2013 21:30:01 +0000 (14:30 -0700)

Merge branch 'nd/clone-connectivity-shortcut'

* nd/clone-connectivity-shortcut:
smart http: use the same connectivity check on cloning

Merge branch 'jc/diff-filter-negation'Junio C Hamano Mon, 9 Sep 2013 21:28:35 +0000 (14:28 -0700)

Merge branch 'jc/diff-filter-negation'

Teach "git diff --diff-filter" to express "I do not want to see
these classes of changes" more directly by listing only the
unwanted ones in lowercase (e.g. "--diff-filter=d" will show
everything but deletion) and deprecate "diff-files -q" which did
the same thing as "--diff-filter=d".

* jc/diff-filter-negation:
diff: deprecate -q option to diff-files
diff: allow lowercase letter to specify what change class to exclude
diff: reject unknown change class given to --diff-filter
diff: preparse --diff-filter string argument
diff: factor out match_filter()
diff: pass the whole diff_options to diffcore_apply_filter()

Merge branch 'ms/fetch-prune-configuration'Junio C Hamano Mon, 9 Sep 2013 21:27:11 +0000 (14:27 -0700)

Merge branch 'ms/fetch-prune-configuration'

Allow fetch.prune and remote.*.prune configuration variables to be set,
and "git fetch" to behave as if "--prune" is given.

"git fetch" that honors remote.*.prune is fine, but I wonder if we
should somehow make "git push" aware of it as well. Perhaps
remote.*.prune should not be just a boolean, but a 4-way "none",
"push", "fetch", "both"?

* ms/fetch-prune-configuration:
fetch: make --prune configurable

remote-bzr: reuse bzrlib transports when possibleRichard Hansen Sun, 8 Sep 2013 05:47:49 +0000 (01:47 -0400)

remote-bzr: reuse bzrlib transports when possible

Pass a list of open bzrlib.transport.Transport objects to each bzrlib
function that might create a transport. This enables bzrlib to reuse
existing transports when possible, avoiding multiple concurrent
connections to the same remote server.

If the remote server is accessed via ssh, this fixes a couple of
problems:
* If the user does not have keys loaded into an ssh agent, the user
may be prompted for a password multiple times.
* If the user is using OpenSSH and the ControlMaster setting is set
to auto, git-remote-bzr might hang. This is because bzrlib closes
the multiple ssh sessions in an undefined order and might try to
close the master ssh session before the other sessions. The
master ssh process will not exit until the other sessions have
exited, causing a deadlock. (The ssh sessions are closed in an
undefined order because bzrlib relies on the Python garbage
collector to trigger ssh session termination.)

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

Sync with maintJunio C Hamano Thu, 5 Sep 2013 21:41:40 +0000 (14:41 -0700)

Sync with maint

* maint:
Documentation/git-merge.txt: fix formatting of example block

Merge branch 'nd/fetch-pack-shallow-fix' into maintJunio C Hamano Thu, 5 Sep 2013 21:40:58 +0000 (14:40 -0700)

Merge branch 'nd/fetch-pack-shallow-fix' into maint

The recent "short-cut clone connectivity check" topic broke a shallow
repository when a fetch operation tries to auto-follow tags.

* nd/fetch-pack-shallow-fix:
fetch-pack: do not remove .git/shallow file when --depth is not specified

Merge branch 'hv/config-from-blob' into maintJunio C Hamano Thu, 5 Sep 2013 21:40:18 +0000 (14:40 -0700)

Merge branch 'hv/config-from-blob' into maint

Compilation fix on platforms with fgetc() and friends defined as
macros.

* hv/config-from-blob:
config: do not use C function names as struct members

Merge branch 'maint-1.8.3' into maintJunio C Hamano Thu, 5 Sep 2013 21:24:59 +0000 (14:24 -0700)

Merge branch 'maint-1.8.3' into maint

* maint-1.8.3:
Documentation/git-merge.txt: fix formatting of example block

Merge branch 'maint-1.8.2' into maint-1.8.3Junio C Hamano Thu, 5 Sep 2013 21:24:52 +0000 (14:24 -0700)

Merge branch 'maint-1.8.2' into maint-1.8.3

* maint-1.8.2:
Documentation/git-merge.txt: fix formatting of example block

Documentation/git-merge.txt: fix formatting of example... Andreas Schwab Thu, 5 Sep 2013 15:12:45 +0000 (17:12 +0200)

Documentation/git-merge.txt: fix formatting of example block

You need at least four dashes in a line to have it recognized as listing
block delimiter by asciidoc.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes after merging the first... Junio C Hamano Wed, 4 Sep 2013 19:41:05 +0000 (12:41 -0700)

Update draft release notes after merging the first batch of topics

Merge branch 'sb/parseopt-boolean-removal'Junio C Hamano Wed, 4 Sep 2013 19:39:02 +0000 (12:39 -0700)

Merge branch 'sb/parseopt-boolean-removal'

Convert most uses of OPT_BOOLEAN/OPTION_BOOLEAN that can use
OPT_BOOL/OPTION_BOOLEAN which have much saner semantics, and turn
remaining ones into OPT_SET_INT, OPT_COUNTUP, etc. as necessary.

* sb/parseopt-boolean-removal:
revert: use the OPT_CMDMODE for parsing, reducing code
checkout-index: fix negations of even numbers of -n
config parsing options: allow one flag multiple times
hash-object: replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP
branch, commit, name-rev: ease up boolean conditions
checkout: remove superfluous local variable
log, format-patch: parsing uses OPT__QUIET
Replace deprecated OPT_BOOLEAN by OPT_BOOL
Remove deprecated OPTION_BOOLEAN for parsing arguments

Merge branch 'jc/parseopt-command-modes'Junio C Hamano Wed, 4 Sep 2013 19:37:52 +0000 (12:37 -0700)

Merge branch 'jc/parseopt-command-modes'

Many commands use --dashed-option as a operation mode selector
(e.g. "git tag --delete") that the user can use at most one
(e.g. "git tag --delete --verify" is a nonsense) and you cannot
negate (e.g. "git tag --no-delete" is a nonsense). Make it easier
for users of parse_options() to enforce these restrictions.

* jc/parseopt-command-modes:
tag: use OPT_CMDMODE
parse-options: add OPT_CMDMODE()

Merge branch 'jl/some-submodule-config-are-not-boolean'Junio C Hamano Wed, 4 Sep 2013 19:36:51 +0000 (12:36 -0700)

Merge branch 'jl/some-submodule-config-are-not-boolean'

* jl/some-submodule-config-are-not-boolean:
avoid segfault on submodule.*.path set to an empty "true"

Merge branch 'sg/bash-prompt-lf-in-cwd-test'Junio C Hamano Wed, 4 Sep 2013 19:36:47 +0000 (12:36 -0700)

Merge branch 'sg/bash-prompt-lf-in-cwd-test'

* sg/bash-prompt-lf-in-cwd-test:
bash prompt: test the prompt with newline in repository path

Merge branch 'sb/diff-delta-remove-needless-comparison'Junio C Hamano Wed, 4 Sep 2013 19:36:44 +0000 (12:36 -0700)

Merge branch 'sb/diff-delta-remove-needless-comparison'

* sb/diff-delta-remove-needless-comparison:
create_delta_index: simplify condition always evaluating to true

Merge branch 'fc/unpack-trees-leakfix'Junio C Hamano Wed, 4 Sep 2013 19:36:41 +0000 (12:36 -0700)

Merge branch 'fc/unpack-trees-leakfix'

* fc/unpack-trees-leakfix:
unpack-trees: plug a memory leak

Merge branch 'aj/p4-symlink-lose-nl'Junio C Hamano Wed, 4 Sep 2013 19:36:37 +0000 (12:36 -0700)

Merge branch 'aj/p4-symlink-lose-nl'

* aj/p4-symlink-lose-nl:
git-p4: Fix occasional truncation of symlink contents.

Merge branch 'fc/remote-hg-shared-setup'Junio C Hamano Wed, 4 Sep 2013 19:36:32 +0000 (12:36 -0700)

Merge branch 'fc/remote-hg-shared-setup'

* fc/remote-hg-shared-setup:
remote-hg: add shared repo upgrade
remote-hg: ensure shared repo is initialized

Merge branch 'sb/misc-cleanup'Junio C Hamano Wed, 4 Sep 2013 19:36:30 +0000 (12:36 -0700)

Merge branch 'sb/misc-cleanup'

* sb/misc-cleanup:
rm: remove unneeded null pointer check
diff: fix a possible null pointer dereference
diff: remove ternary operator evaluating always to true

Merge branch 'nd/gc-lock-against-each-other'Junio C Hamano Wed, 4 Sep 2013 19:35:34 +0000 (12:35 -0700)

Merge branch 'nd/gc-lock-against-each-other'

* nd/gc-lock-against-each-other:
gc: reject if another gc is running, unless --force is given

Merge branch 'ap/remote-hg-tilde-is-home-directory'Junio C Hamano Wed, 4 Sep 2013 19:33:57 +0000 (12:33 -0700)

Merge branch 'ap/remote-hg-tilde-is-home-directory'

* ap/remote-hg-tilde-is-home-directory:
remote-hg: fix path when cloning with tilde expansion

Merge branch 'mm/no-shell-escape-in-die-message'Junio C Hamano Wed, 4 Sep 2013 19:32:15 +0000 (12:32 -0700)

Merge branch 'mm/no-shell-escape-in-die-message'

Fixes a minor bug in "git rebase -i" (there could be others, as the
root cause is pretty generic) where the code feeds a random, data
dependeant string to 'echo' and expects it to come out literally.

* mm/no-shell-escape-in-die-message:
die_with_status: use "printf '%s\n'", not "echo"

Merge branch 'tr/fd-gotcha-fixes'Junio C Hamano Wed, 4 Sep 2013 19:32:11 +0000 (12:32 -0700)

Merge branch 'tr/fd-gotcha-fixes'

Finishing touches to an earlier fix already in 'master'.

* tr/fd-gotcha-fixes:
t0070: test that git_mkstemps correctly checks return value of open()

Merge branch 'bc/unuse-packfile'Junio C Hamano Wed, 4 Sep 2013 19:30:21 +0000 (12:30 -0700)

Merge branch 'bc/unuse-packfile'

Handle memory pressure and file descriptor pressure separately when
deciding to release pack windows to honor resource limits.

* bc/unuse-packfile:
Don't close pack fd when free'ing pack windows
sha1_file: introduce close_one_pack() to close packs on fd pressure

Merge branch 'da/darwin'Junio C Hamano Wed, 4 Sep 2013 19:28:15 +0000 (12:28 -0700)

Merge branch 'da/darwin'

* da/darwin:
OS X: Fix redeclaration of die warning
Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1
imap-send: use Apple's Security framework for base64 encoding

Merge branch 'nd/sq-quote-buf'Junio C Hamano Wed, 4 Sep 2013 19:28:12 +0000 (12:28 -0700)

Merge branch 'nd/sq-quote-buf'

Code simplification as a preparatory step to something larger.

* nd/sq-quote-buf:
quote: remove sq_quote_print()
tar-tree: remove dependency on sq_quote_print()
for-each-ref, quote: convert *_quote_print -> *_quote_buf

Merge branch 'rr/feed-real-path-to-editor'Junio C Hamano Wed, 4 Sep 2013 19:26:54 +0000 (12:26 -0700)

Merge branch 'rr/feed-real-path-to-editor'

* rr/feed-real-path-to-editor:
editor: use canonicalized absolute path

Merge branch 'jk/fast-import-empty-ls'Junio C Hamano Wed, 4 Sep 2013 19:23:35 +0000 (12:23 -0700)

Merge branch 'jk/fast-import-empty-ls'

* jk/fast-import-empty-ls:
fast-import: allow moving the root tree
fast-import: allow ls or filecopy of the root tree
fast-import: set valid mode on root tree in "ls"
t9300: document fast-import empty path issues

Merge branch 'km/svn-1.8-serf-only'Junio C Hamano Wed, 4 Sep 2013 19:23:33 +0000 (12:23 -0700)

Merge branch 'km/svn-1.8-serf-only'

Subversion 1.8.0 that was recently released breaks older subversion
clients coming over http/https in various ways.

* km/svn-1.8-serf-only:
Git.pm: revert _temp_cache use of temp_is_locked
git-svn: allow git-svn fetching to work using serf
Git.pm: add new temp_is_locked function

Merge branch 'jc/check-x-z'Junio C Hamano Wed, 4 Sep 2013 19:23:24 +0000 (12:23 -0700)

Merge branch 'jc/check-x-z'

"git check-ignore -z" applied the NUL termination to both its input
(with --stdin) and its output, but "git check-attr -z" ignored the
option on the output side.

This is potentially a backward incompatible fix. Let's see if
anybody screams before deciding if we want to do anything to help
existing users (there may be none).

* jc/check-x-z:
check-attr -z: a single -z should apply to both input and output
check-ignore -z: a single -z should apply to both input and output
check-attr: the name of the character is NUL, not NULL
check-ignore: the name of the character is NUL, not NULL

Merge branch 'maint'Junio C Hamano Tue, 3 Sep 2013 20:58:16 +0000 (13:58 -0700)

Merge branch 'maint'

* maint:
fix shell syntax error in template
l10n: fr.po: hotfix for commit 6b388fc

Merge git://github.com/git-l10n/git-po into maintJunio C Hamano Tue, 3 Sep 2013 20:58:03 +0000 (13:58 -0700)

Merge git://github.com/git-l10n/git-po into maint

* git://github.com/git-l10n/git-po:
l10n: fr.po: hotfix for commit 6b388fc

Merge branch 'maint-1.8.3' into maintJunio C Hamano Tue, 3 Sep 2013 20:54:32 +0000 (13:54 -0700)

Merge branch 'maint-1.8.3' into maint

* maint-1.8.3:
fix shell syntax error in template

Merge branch 'maint-1.8.2' into maint-1.8.3Junio C Hamano Tue, 3 Sep 2013 20:54:26 +0000 (13:54 -0700)

Merge branch 'maint-1.8.2' into maint-1.8.3

* maint-1.8.2:
fix shell syntax error in template

Start the post-1.8.4 cycleJunio C Hamano Fri, 30 Aug 2013 17:16:16 +0000 (10:16 -0700)

Start the post-1.8.4 cycle

It is tentatively called 1.8.5, but it should be an easy matter of
renaming the release-notes file and RelNotes symlink to later call
it 1.9 near the end of the cycle if we wanted to.

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

Merge branch 'bc/completion-for-bash-3.0'Junio C Hamano Fri, 30 Aug 2013 17:10:55 +0000 (10:10 -0700)

Merge branch 'bc/completion-for-bash-3.0'

Some people still use rather old versions of bash, which cannot
grok some constructs like 'printf -v varname' the prompt and
completion code started to use recently.

* bc/completion-for-bash-3.0:
contrib/git-prompt.sh: handle missing 'printf -v' more gracefully
t9902-completion.sh: old Bash still does not support array+=('') notation
git-completion.bash: use correct Bash/Zsh array length syntax

Merge branch 'sp/doc-smart-http'Junio C Hamano Fri, 30 Aug 2013 17:10:51 +0000 (10:10 -0700)

Merge branch 'sp/doc-smart-http'

* sp/doc-smart-http:
Document the HTTP transport protocols

Merge branch 'mm/war-on-whatchanged'Junio C Hamano Fri, 30 Aug 2013 17:08:26 +0000 (10:08 -0700)

Merge branch 'mm/war-on-whatchanged'

* mm/war-on-whatchanged:
whatchanged: document its historical nature
core-tutorial: trim the section on Inspecting Changes

Merge branch 'rt/doc-merge-file-diff3'Junio C Hamano Fri, 30 Aug 2013 17:08:23 +0000 (10:08 -0700)

Merge branch 'rt/doc-merge-file-diff3'

* rt/doc-merge-file-diff3:
Documentation/git-merge-file: document option "--diff3"

Merge branch 'mb/docs-favor-en-us'Junio C Hamano Fri, 30 Aug 2013 17:08:19 +0000 (10:08 -0700)

Merge branch 'mb/docs-favor-en-us'

Declare that the official grammar & spelling of the source of this
project is en_US, but strongly discourage patches only to "fix"
existing en_UK strings to avoid unnecessary churns.

* mb/docs-favor-en-us:
Provide some linguistic guidance for the documentation.

Merge branch 'rj/doc-rev-parse'Junio C Hamano Fri, 30 Aug 2013 17:08:12 +0000 (10:08 -0700)

Merge branch 'rj/doc-rev-parse'

* rj/doc-rev-parse:
rev-parse(1): logically group options
rev-parse: remove restrictions on some options

Merge branch 'hv/config-from-blob'Junio C Hamano Fri, 30 Aug 2013 17:06:52 +0000 (10:06 -0700)

Merge branch 'hv/config-from-blob'

Portability fix.

* hv/config-from-blob:
config: do not use C function names as struct members

Merge branch 'nd/fetch-pack-shallow-fix'Junio C Hamano Fri, 30 Aug 2013 17:05:55 +0000 (10:05 -0700)

Merge branch 'nd/fetch-pack-shallow-fix'

The recent "short-cut clone connectivity check" topic broke a
shallow repository when a fetch operation tries to auto-follow tags.

* nd/fetch-pack-shallow-fix:
fetch-pack: do not remove .git/shallow file when --depth is not specified

fix shell syntax error in templateThorsten Glaser Fri, 30 Aug 2013 10:40:30 +0000 (12:40 +0200)

fix shell syntax error in template

An if clause must not be empty; add a "colon" command.

Signed-off-by: Thorsten Glaser <t.glaser@tarent.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: fr.po: hotfix for commit 6b388fcSebastien Helleu Sun, 25 Aug 2013 09:45:13 +0000 (11:45 +0200)

l10n: fr.po: hotfix for commit 6b388fc

Fix many typos and add some new translations (1277/2080 messages
translated).

Closes git-l10n/git-po/pull/63.

Signed-off-by: Sebastien Helleu <flashcode@flashtux.org>
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

config: do not use C function names as struct membersJeff King Mon, 26 Aug 2013 21:57:18 +0000 (17:57 -0400)

config: do not use C function names as struct members

According to C99, section 7.1.4:

Any function declared in a header may be additionally
implemented as a function-like macro defined in the
header.

Therefore calling our struct member function pointer "fgetc"
may run afoul of unwanted macro expansion when we call:

char c = cf->fgetc(cf);

This turned out to be a problem on uclibc, which defines
fgetc as a macro and causes compilation failure.

The standard suggests fixing this in a few ways:

1. Using extra parentheses to inhibit the function-like
macro expansion. E.g., "(cf->fgetc)(cf)". This is
undesirable as it's ugly, and each call site needs to
remember to use it (and on systems without the macro,
forgetting will compile just fine).

2. Using #undef (because a conforming implementation must
also be providing fgetc as a function). This is
undesirable because presumably the implementation was
using the macro for a performance benefit, and we are
dropping that optimization.

Instead, we can simply use non-colliding names.

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

fetch-pack: do not remove .git/shallow file when -... Nguyễn Thái Ngọc Duy Mon, 26 Aug 2013 02:17:26 +0000 (09:17 +0700)

fetch-pack: do not remove .git/shallow file when --depth is not specified

fetch_pack() can remove .git/shallow file when a shallow repository
becomes a full one again. This behavior is triggered incorrectly when
tags are also fetched because fetch_pack() will be called twice. At
the first fetch_pack() call:

- shallow_lock is set up
- alternate_shallow_file points to shallow_lock.filename, which is
"shallow.lock"
- commit_lock_file is called, which sets shallow_lock.filename to "".
alternate_shallow_file also becomes "" because it points to the
same memory.

At the second call, setup_alternate_shallow() is not called and
alternate_shallow_file remains "". It's mistaken as unshallow case and
.git/shallow is removed. The end result is a broken repository.

Fix this by always initializing alternate_shallow_file when
fetch_pack() is called. As an extra measure, check if args->depth > 0
before commit/rollback shallow file.

Reported-by: Kacper Kornet <kornet@camk.edu.pl>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.4 v1.8.4Junio C Hamano Fri, 23 Aug 2013 18:49:46 +0000 (11:49 -0700)

Git 1.8.4

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

contrib/git-prompt.sh: handle missing 'printf -v' more... Brandon Casey Thu, 22 Aug 2013 01:39:03 +0000 (18:39 -0700)

contrib/git-prompt.sh: handle missing 'printf -v' more gracefully

Old Bash (3.0) which is distributed with RHEL 4.X and other ancient
platforms that are still in wide use, do not have a printf that
supports -v. Neither does Zsh (which is already handled in the code).

As suggested by Junio, let's test whether printf supports the -v
option and store the result. Then later, we can use it to
determine whether 'printf -v' can be used, or whether printf
must be called in a subshell.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9902-completion.sh: old Bash still does not support... Brandon Casey Wed, 21 Aug 2013 20:49:32 +0000 (13:49 -0700)

t9902-completion.sh: old Bash still does not support array+=('') notation

Old Bash (3.0) which is distributed with RHEL 4.X and other ancient
platforms that are still in wide use, does not understand the
array+=() notation. Let's use an explicit assignment to the new array
element which works everywhere, like:

array[${#array[@]}+1]=''

The right-hand side '' is not strictly necessary, but in this case
I think it is more clear.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-completion.bash: use correct Bash/Zsh array length... Brandon Casey Wed, 21 Aug 2013 20:49:31 +0000 (13:49 -0700)

git-completion.bash: use correct Bash/Zsh array length syntax

The syntax for retrieving the number of elements in an array is:

${#name[@]}

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Typofix draft release notes to 1.8.4Junio C Hamano Wed, 21 Aug 2013 22:30:04 +0000 (15:30 -0700)

Typofix draft release notes to 1.8.4

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

Document the HTTP transport protocolsShawn O. Pearce Wed, 21 Aug 2013 13:45:13 +0000 (20:45 +0700)

Document the HTTP transport protocols

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Revised-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

avoid segfault on submodule.*.path set to an empty... Jharrod LaFon Mon, 19 Aug 2013 16:26:56 +0000 (09:26 -0700)

avoid segfault on submodule.*.path set to an empty "true"

Git fails due to a segmentation fault if a submodule path is empty.
Here is an example .gitmodules that will cause a segmentation fault:

[submodule "foo-module"]
path
url = http://host/repo.git
$ git status
Segmentation fault (core dumped)

This is because the parsing of "submodule.*.path" is not prepared to
see a value-less "true" and assumes that the value is always
non-NULL (parsing of "ignore" has the same problem).

Fix it by checking the NULL-ness of value and complain with
config_error_nonbool().

Signed-off-by: Jharrod LaFon <jlafon@eyesopen.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.4-rc4 v1.8.4-rc4Junio C Hamano Mon, 19 Aug 2013 17:34:14 +0000 (10:34 -0700)

Git 1.8.4-rc4

As we had to revert two topics at the last minute, let's have
another (hopefully short) round of rc to make sure the final release
will be sound.

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

bash prompt: test the prompt with newline in repository... SZEDER Gábor Sat, 17 Aug 2013 09:01:58 +0000 (11:01 +0200)

bash prompt: test the prompt with newline in repository path

Newlines in the path to a git repository were not an issue for the
git-specific bash prompt before commit efaa0c1532 (bash prompt:
combine 'git rev-parse' executions in the main code path, 2013-06-17),
because the path returned by 'git rev-parse --git-dir' was directly
stored in a variable, and this variable was later always accessed
inside double quotes.

Newlines are not an issue after commit efaa0c1532 either, but it's
more subtle. Since efaa0c1532 we use the following single 'git
rev-parse' execution to query various info about the repository:

git rev-parse --git-dir --is-inside-git-dir \
--is-bare-repository --is-inside-work-tree

The results to these queries are separated by a newline character in
the output, e.g.:

/home/szeder/src/git/.git
false
false
true

A newline in the path to the git repository could potentially break
the parsing of these results and ultimately the bash prompt, unless
the parsing is done right. Commit efaa0c1532 got it right, as I
consciously started parsing 'git rev-parse's output from the end,
where each record is a single line containing either 'true' or 'false'
or, after e3e0b9378b (bash prompt: combine 'git rev-parse' for
detached head, 2013-06-24), the abbreviated commit object name, and
all what remains at the beginning is the path to the git repository,
no matter how many lines it is.

This subtlety really warrants its own test, especially since I didn't
explain it in the log message or in an in-code comment back then, so
add a test to excercise the prompt with newline characters in the path
to the repository. Guard this test with the FUNNYNAMES prerequisite,
because not all filesystems support newlines in filenames. Note that
'git rev-parse --git-dir' prints '.git' or '.' when at the top of the
worktree or the repository, respectively, and only prints the full
path to the repository when in a subdirectory, hence the need for
changing into a subdir in the test.

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

create_delta_index: simplify condition always evaluatin... Stefan Beller Fri, 16 Aug 2013 21:22:37 +0000 (23:22 +0200)

create_delta_index: simplify condition always evaluating to true

The code sequence ' (1u << i) < hsize && i < 31 ' is a multi step
process, whose first step requires that 'i' is already less that 31,
otherwise the result (1u << i) is undefined (and 'undef_val < hsize'
can therefore be assumed to be 'false'), and so the later test i < 31
can always be optimized away as dead code ('i' is already less than 31,
or the short circuit 'and' applies).

So we need to get rid of that code. One way would be to exchange the
order of the conditions, so the expression 'i < 31 && (1u << i) < hsize'
would remove that optimized unstable code already.

However when checking the previous lines in that function, we can deduce
that 'hsize' must always be smaller than (1u<<31), since 506049c7df2c6
(fix >4GiB source delta assertion failure), because 'entries' is
capped at an upper bound of 0xfffffffeU, so 'hsize' contains a maximum
value of 0x3fffffff, which is smaller than (1u<<31), so the value of
'i' will never be larger than 31 and we can remove that condition
entirely.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Revert "Add new @ shortcut for HEAD"Junio C Hamano Wed, 14 Aug 2013 17:57:24 +0000 (10:57 -0700)

Revert "Add new @ shortcut for HEAD"

This reverts commit cdfd94837b27c220f70f032b596ea993d195488f, as it
does not just apply to "@" (and forms with modifiers like @{u}
applied to it), but also affects e.g. "refs/heads/@/foo", which it
shouldn't.

The basic idea of giving a short-hand might be good, and the topic
can be retried later, but let's revert to avoid affecting existing
use cases for now for the upcoming release.

Revert "git stash: avoid data loss when "git stash... Junio C Hamano Wed, 14 Aug 2013 16:53:43 +0000 (09:53 -0700)

Revert "git stash: avoid data loss when "git stash save" kills a directory"

This reverts commit a73653130edd6a8977106d45a8092c09040f9132, as it
has been reported that "ls-files --killed" is too time-consuming in
a deep directory with too many untracked crufts (e.g. $HOME/.git
tracking only a few files).

We'd need to revisit it later but "ls-files --killed" needs to be
optimized before it happens.

unpack-trees: plug a memory leakFelipe Contreras Tue, 13 Aug 2013 18:27:58 +0000 (20:27 +0200)

unpack-trees: plug a memory leak

Before overwriting the destination index, first let's discard its
contents.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Tested-by: Лежанкин Иван <abyss.7@gmail.com> wrote:
Reviewed-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.4-rc3 v1.8.4-rc3Junio C Hamano Tue, 13 Aug 2013 18:10:18 +0000 (11:10 -0700)

Git 1.8.4-rc3

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

Merge git://github.com/git-l10n/git-poJunio C Hamano Tue, 13 Aug 2013 17:50:01 +0000 (10:50 -0700)

Merge git://github.com/git-l10n/git-po

* git://github.com/git-l10n/git-po:
l10n: Add reference for french translation team
l10n: fr.po: 821/2112 messages translated

Merge branch 'sb/mailmap-updates'Junio C Hamano Tue, 13 Aug 2013 17:49:33 +0000 (10:49 -0700)

Merge branch 'sb/mailmap-updates'

* sb/mailmap-updates:
.mailmap: Combine more (name, email) to individual persons
.mailmap: update long-lost friends with multiple defunct addresses

.mailmap: Combine more (name, email) to individual... Stefan Beller Mon, 12 Aug 2013 08:12:09 +0000 (10:12 +0200)

.mailmap: Combine more (name, email) to individual persons

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

.mailmap: update long-lost friends with multiple defunc... Junio C Hamano Mon, 12 Aug 2013 07:58:11 +0000 (00:58 -0700)

.mailmap: update long-lost friends with multiple defunct addresses

A handful of past contributors are recorded with multiple e-mail
addresses, all of which are undeliverable. With a lot of help from
Jonathan, we located all of them except for one person, and a pair
of addresses we suspect belong to a single person but we are not
certain.

Update the found ones with their currently preferred address, and
use the last known address to consolidate contributions by the lost
one.

Helped-by: Stefan Beller <stefanbeller@googlemail.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote-mediawiki: ignore generated git-mwMatthieu Moy Tue, 13 Aug 2013 13:32:19 +0000 (15:32 +0200)

git-remote-mediawiki: ignore generated git-mw

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

whatchanged: document its historical natureJunio C Hamano Fri, 9 Aug 2013 20:01:48 +0000 (13:01 -0700)

whatchanged: document its historical nature

Encourage new users to use 'log' instead. These days, these
commands are unified and just have different defaults.

'git log' only allowed you to view the log messages and no diffs
when it was added in early June 2005. It was only in early April
2006 that the command learned to take diff options. Because of
this, power users tended to use 'whatchanged' that already existed
since mid May 2005 and supported diff options.

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

core-tutorial: trim the section on Inspecting ChangesJunio C Hamano Fri, 9 Aug 2013 17:28:53 +0000 (10:28 -0700)

core-tutorial: trim the section on Inspecting Changes

Back when the core tutorial was written, `log` and `whatchanged`
were scripted Porcelains. In the "Inspecting Changes" section that
talks about the plumbing commands in the diff family, it made sense
to use `log` and `whatchanged` as good examples of the use of these
plumbing commands, and because even these scripted Porcelains were
novelty (there wasn't the new end-user tutorial written), it made
some sense to illustrate uses of the `git log` (and `git
whatchanged`) scripted Porcelain commands.

But we no longer have scripted `log` and `whatchanged` to serve as
examples, and this document is not where the end users learn what
`git log` command is about. Stop at briefly mentioning the
possibility of combining rev-list with diff-tree to build your own
log, and leave the end-user documentation of `log` to the new
tutorial and the user manual.

Also resurrect the last version of `git-log`, `git-whatchanged`, and
`git-show` to serve as examples to contrib/examples/ directory.

While at it, remove 'whatchanged' from a list of sample commands
that are affected by GIT_FLUSH environment variable. This is not
meant to be an exhaustive list but as a list of typical ones, and an
old command that is kept primarily for backward compatibility does
not belong to it.

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

git-p4: Fix occasional truncation of symlink contents.Alexandru Juncu Thu, 8 Aug 2013 13:17:38 +0000 (16:17 +0300)

git-p4: Fix occasional truncation of symlink contents.

Symlink contents in p4 print sometimes have a trailing
new line character, but sometimes it doesn't. git-p4
should only remove the last character if that character
is '\n'.

Signed-off-by: Alex Juncu <ajuncu@ixiacom.com>
Signed-off-by: Alex Badea <abadea@ixiacom.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add shared repo upgradeFelipe Contreras Fri, 9 Aug 2013 22:38:04 +0000 (17:38 -0500)

remote-hg: add shared repo upgrade

If we have an old organization (v1.8.3), and want to upgrade to a newer
one (v1.8.4), the user would have to fetch the whole repository, instead
we can just move the repository, so the user would not notice any
difference.

Also, remove other clones, so in time they get set up as shared.

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

remote-hg: ensure shared repo is initializedFelipe Contreras Fri, 9 Aug 2013 22:38:03 +0000 (17:38 -0500)

remote-hg: ensure shared repo is initialized

6796d49 (remote-hg: use a shared repository store) introduced a bug by
making the shared repository '.git/hg', which is already used before
that patch, so clones that happened before that patch, fail after that
patch, because there's no shared Mercurial repo.

So, instead of simply checking if the directory exists, let's always try
to create an empty shared repository to ensure it's there. This works
because we don't need the initial clone, if the repository is shared,
pulling from the child updates the parent's storage; it's exactly the
same as cloning, so we can simplify the shared repo setup this way while
at the same time fixing the problem.

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

l10n: Add reference for french translation teamJean-Noel Avila Fri, 9 Aug 2013 22:30:55 +0000 (00:30 +0200)

l10n: Add reference for french translation team

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>

l10n: fr.po: 821/2112 messages translatedJean-Noel Avila Mon, 1 Jul 2013 20:19:04 +0000 (22:19 +0200)

l10n: fr.po: 821/2112 messages translated

Trying to focus on most useful phrases.

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>

Merge branch 'maint'Junio C Hamano Fri, 9 Aug 2013 22:49:55 +0000 (15:49 -0700)

Merge branch 'maint'

* maint:
parse-options: fix clang opterror() -Wunused-value warning

remote-hg: fix path when cloning with tilde expansionAntoine Pelisse Fri, 9 Aug 2013 17:13:07 +0000 (19:13 +0200)

remote-hg: fix path when cloning with tilde expansion

The current code fixes the path to make it absolute when cloning, but
doesn't consider tilde expansion, so that scenario fails throwing an
exception because /home/myuser/~/my/repository doesn't exists:

$ git clone hg::~/my/repository && cd repository && git fetch

Expand the tilde when checking if the path is absolute, so that we don't
fix a path that doesn't need to be.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of git://github.com/git-l10n... Junio C Hamano Fri, 9 Aug 2013 21:31:28 +0000 (14:31 -0700)

Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
l10n: de.po: translate 5 messages
l10n: de.po: translate 99 new messages
l10n: de.po: switch from pure German to German+English
l10n: de.po: Fix a typo
l10n: Update Swedish translation (2135t0f0u)
l10n: zh_CN.po: translate 5 messages (2135t0f0u)
l10n: vi.po(2135t): v1.8.4 round 2
l10n: git.pot: v1.8.4 round 2 (5 new, 3 removed)

Merge branch 'jk/submodule-subdirectory-ok'Junio C Hamano Fri, 9 Aug 2013 21:30:41 +0000 (14:30 -0700)

Merge branch 'jk/submodule-subdirectory-ok'

* jk/submodule-subdirectory-ok:
t/t7407: fix two typos in submodule tests

Merge branch 'sb/mailmap-updates'Junio C Hamano Fri, 9 Aug 2013 21:30:13 +0000 (14:30 -0700)

Merge branch 'sb/mailmap-updates'

* sb/mailmap-updates:
.mailmap: fixup entries

.mailmap: fixup entriesStefan Beller Fri, 9 Aug 2013 18:18:24 +0000 (20:18 +0200)

.mailmap: fixup entries

This patch adds no new names, but fixes the mistakes I made in the previous
commits. (94b410bba8, f4f49e225, c07a6bc57, 2013-07-12, .mailmap: Map
email addresses to names).

These mistakes are double white spaces between name and surname,
different capitalization in email address, or just the email address set
as name.

Also I forgot to include James Knight to the mailmap file.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-merge-file: document option "--diff3"Ralf Thielow Fri, 9 Aug 2013 18:09:32 +0000 (20:09 +0200)

Documentation/git-merge-file: document option "--diff3"

The option "--diff3" was added to "git merge-file" in e0af48e
(xdiff-merge: optionally show conflicts in "diff3 -m" style)
but it was never documented in "Documentation/git-merge-file.txt".
Add documentation for this option.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t7407: fix two typos in submodule testsPhil Hord Fri, 9 Aug 2013 20:12:54 +0000 (16:12 -0400)

t/t7407: fix two typos in submodule tests

In t/t7407-submodule-foreach.sh there is a typo in one of the
path names given for a test step. The correct path is
nested1/nested2/.git, but nested1/nested1/nested2/.git is
given instead. The typo is hidden because this line also
accidentally omits the && chain operator. The omitted chain
also means the return values of all the previous commands in
this test are also being ignored.

Fix the path and add the chain operator so the entire test
sequence can be properly validated.

Signed-off-by: Phil Hord <hordp@cisco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rm: remove unneeded null pointer checkStefan Beller Thu, 8 Aug 2013 17:52:41 +0000 (19:52 +0200)

rm: remove unneeded null pointer check

As of 7612a1efdb (2006-06-09 git-rm: honor -n flag.) the variable
'pathspec' seems to be assumed to be never NULL after calling get_pathspec
There was a NULL pointer check after the seen = NULL assignment, which
was removed by that commit. So if pathspec would be NULL now, we'd segfault
in the line accessing the pathspec:
for (i = 0; pathspec[i] ; i++)

A few lines later, 'pathspec' still cannot be NULL, but that check was
overlooked, hence removing it now.

As the null pointer check was removed, it makes no sense to assign NULL
to seen and 3 lines later another value as there are no conditions in
between.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: fix a possible null pointer dereferenceStefan Beller Thu, 8 Aug 2013 22:11:53 +0000 (00:11 +0200)

diff: fix a possible null pointer dereference

The condition in the ternary operator was wrong, hence the wrong char
pointer could be used as the parameter for show_submodule_summary.
one->path may be null, but we definitely need a non null path given
to the function.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Acked-By: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: remove ternary operator evaluating always to... Stefan Beller Thu, 8 Aug 2013 18:31:44 +0000 (20:31 +0200)

diff: remove ternary operator evaluating always to true

The line being changed is deep inside the function builtin_diff.
The variable name_b, which is used to evaluate the ternary expression
must evaluate to true at that position, hence the replacement with
just name_b.

The name_b variable only occurs a few times in that lengthy function:
As a parameter to the function itself:
static void builtin_diff(const char *name_a,
const char *name_b,
...
The next occurrences are at:
/* Never use a non-valid filename anywhere if at all possible */
name_a = DIFF_FILE_VALID(one) ? name_a : name_b;
name_b = DIFF_FILE_VALID(two) ? name_b : name_a;

a_one = quote_two(a_prefix, name_a + (*name_a == '/'));
b_two = quote_two(b_prefix, name_b + (*name_b == '/'));

In the last line of this block 'name_b' is dereferenced and compared
to '/'. This would crash if name_b was NULL. Hence in the following code
we can assume name_b being non-null.

The next occurrence is just as a function argument, which doesn't change
the memory, which name_b points to, so the assumption name_b being not
null still holds:
emit_rewrite_diff(name_a, name_b, one, two,
textconv_one, textconv_two, o);

The next occurrence would be the line of this patch. As name_b still must
be not null, we can remove the ternary operator.

Inside the emit_rewrite_diff function there is a also a line
ecbdata.ws_rule = whitespace_rule(name_b ? name_b : name_a);
which was also simplified as there is also a dereference before the
ternary operator.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-options: fix clang opterror() -Wunused-value... Eric Sunshine Fri, 9 Aug 2013 09:06:17 +0000 (05:06 -0400)

parse-options: fix clang opterror() -Wunused-value warning

a469a1019352b8ef (silence some -Wuninitialized false positives;
2012-12-15) triggered "unused value" warnings when the return value of
opterror() and several other error-related functions was not used.
5ded807f7c0be10e (fix clang -Wunused-value warnings for error functions;
2013-01-16) applied a fix by adding #if !defined(__clang__) in cache.h
and git-compat-util.h, but misspelled it as #if !defined(clang) in
parse-options.h. Fix this.

This mistake went unnoticed because existing callers of opterror()
utilize its return value. 1158826394e162c5 (parse-options: add
OPT_CMDMODE(); 2013-07-30), however, adds a new invocation of opterror()
which ignores the return value, thus triggering the "unused value"
warning.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gc: reject if another gc is running, unless --force... Nguyễn Thái Ngọc Duy Thu, 8 Aug 2013 11:05:38 +0000 (18:05 +0700)

gc: reject if another gc is running, unless --force is given

This may happen when `git gc --auto` is run automatically, then the
user, to avoid wait time, switches to a new terminal, keeps working
and `git gc --auto` is started again because the first gc instance has
not clean up the repository.

This patch tries to avoid multiple gc running, especially in --auto
mode. In the worst case, gc may be delayed 12 hours if a daemon reuses
the pid stored in gc.pid.

kill(pid, 0) support is added to MinGW port so it should work on
Windows too.

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

l10n: de.po: translate 5 messagesRalf Thielow Tue, 6 Aug 2013 17:54:29 +0000 (19:54 +0200)

l10n: de.po: translate 5 messages

Translate 5 new messages came from git.pot update in b8ecf23
(l10n: git.pot: v1.8.4 round 2 (5 new, 3 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>

l10n: de.po: translate 99 new messagesRalf Thielow Fri, 26 Jul 2013 15:48:46 +0000 (17:48 +0200)

l10n: de.po: translate 99 new messages

Translate 99 new messages came from git.pot update in
28b3cff (l10n: git.pot: v1.8.4 round 1 (99 new, 46 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>

Git 1.8.4-rc2 v1.8.4-rc2Junio C Hamano Thu, 8 Aug 2013 20:58:34 +0000 (13:58 -0700)

Git 1.8.4-rc2

This is with mostly minor documentation and test updates, nothing
spectacular except for removal of funky lstat(2) emulation on Cygwin.

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

l10n: de.po: switch from pure German to German+EnglishRalf Thielow Wed, 29 May 2013 16:03:39 +0000 (18:03 +0200)

l10n: de.po: switch from pure German to German+English

This switches the translation from pure German to German+English.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>

l10n: de.po: Fix a typoWieland Hoffmann Wed, 5 Jun 2013 20:59:44 +0000 (22:59 +0200)

l10n: de.po: Fix a typo

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>

die_with_status: use "printf '%s\n'", not "echo"Matthieu Moy Wed, 7 Aug 2013 09:26:05 +0000 (11:26 +0200)

die_with_status: use "printf '%s\n'", not "echo"

Some implementations of 'echo' (e.g. dash's built-in) interpret
backslash sequences in their arguments.

This triggered at least one bug: the error message of "rebase -i" was
turning \t in commit messages into actual tabulations. There may be
others.

Using "printf '%s\n'" instead avoids this bad behavior, and is the form
used by the "say" function.

Noticed-by: David Kastrup <dak@gnu.org>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: use the OPT_CMDMODE for parsing, reducing codeStefan Beller Sat, 3 Aug 2013 11:51:26 +0000 (13:51 +0200)

revert: use the OPT_CMDMODE for parsing, reducing code

The revert command comes with their own implementation of checking
for exclusiveness of parameters.
Now that the OPT_CMDMODE is in place, we can also rely on that macro
instead of cooking that solution for each command itself.

This commit also replaces OPT_BOOLEAN, which was deprecated by b04ba2bb
(parse-options: deprecate OPT_BOOLEAN, 2011-09-27). Instead OPT_BOOL is
used.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout-index: fix negations of even numbers of -nStefan Beller Sat, 3 Aug 2013 11:51:25 +0000 (13:51 +0200)

checkout-index: fix negations of even numbers of -n

The --no-create was parsed with OPT_BOOLEAN, which has a counting up
logic implemented. Since b04ba2bb (parse-options: deprecate OPT_BOOLEAN,
2011-09-27) the OPT_BOOLEAN is deprecated and is only a define:
/* Deprecated synonym */
#define OPTION_BOOLEAN OPTION_COUNTUP

However the variable not_new, which can be counted up by giving
--no-create multiple times, is used to set a bit in the struct checkout
bitfield (defined in cache.h:969, declared at builtin/checkout-index.c:19):

state.not_new = not_new;

When assigning a value other than 0 or 1 to a bit, all leading digits but
the last are ignored and only the last bit is used for setting the bit
variable.

Hence the following:
# in git.git:
$ git status
# working directory clean
rm COPYING
$ git status
# deleted: COPYING
$ git checkout-index -a -n
$ git status
# deleted: COPYING
# which is expected as we're telling git to not restore or create
# files, however:
$ git checkout-index -a -n -n
$ git status
# working directory clean, COPYING is restored again!
# That's the bug, we're fixing here.

By restraining the variable not_new to a value being definitely 0 or 1
by the macro OPT_BOOL the bug is fixed.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config parsing options: allow one flag multiple timesStefan Beller Sat, 3 Aug 2013 11:51:24 +0000 (13:51 +0200)

config parsing options: allow one flag multiple times

This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN,
2011-09-27).

This commit introduces a change for the users, after this patch
you can pass one of the config level flags multiple times:
Before:
$ git config --global --global --list
error: only one config file at a time.
usage: ...

Afterwards this will work. This is due to the following check in the code:
if (use_global_config + use_system_config + use_local_config +
!!given_config_file + !!given_config_blob > 1) {
error("only one config file at a time.");
usage_with_options(builtin_config_usage, builtin_config_options);
}

With OPT_BOOL instead of OPT_BOOLEAN the variables use_global_config,
use_system_config, use_local_config will only have the value 0 if the
command line option was not passed or 1 no matter how often the
respective command line option was passed.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>