gitweb.git
diff: run arguments through precompose_argvAlexander Rinass Fri, 13 May 2016 20:41:02 +0000 (22:41 +0200)

diff: run arguments through precompose_argv

When running diff commands, a pathspec containing decomposed
unicode code points is not converted to precomposed unicode form
under Mac OS X, but we normalize the paths in the index and the
history to precomposed form on that platform. As a result, the
pathspec would not match and no diff is shown.

Unlike many builtin commands, the "diff" family of commands do
not use parse_options(), which is how other builtin commands
indirectly call precompose_argv() to normalize argv[] into
precomposed form on Mac OSX. Teach these commands to call
precompose_argv() themselves.

Note that precomopose_argv() normalizes not just paths but all
command line arguments, so things like "git diff -G $string"
when $string has the decomposed form would first be normalized
into the precomposed form and would stop hitting the same string
in the decomposed form in the diff output with this change.

It is not a problem per-se, as "log" family of commands already use
parse_options() and call precompose_argv()--we can think of this
change as making the "diff" family of commands behave in a similar
way as the commands in the "log" family.

Signed-off-by: Alexander Rinass <alex@fournova.com>
Helped-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9100,t3419: enclose all test code in single-quotesJeff King Fri, 13 May 2016 20:47:18 +0000 (16:47 -0400)

t9100,t3419: enclose all test code in single-quotes

A few tests here use double-quotes around the snippets of
shell code to run the tests. None of these tests wants to do
any interpolation at all, and it just leads to an extra
layer of quoting around all double-quotes and dollar signs
inside the snippet. Let's switch to single quotes, like
most other test scripts.

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

t/lib-git-svn: drop $remote_git_svn and $git_svn_idJeff King Fri, 13 May 2016 20:47:14 +0000 (16:47 -0400)

t/lib-git-svn: drop $remote_git_svn and $git_svn_id

These variables were added in 16805d3 (t/t91XX-svn: start
removing use of "git-" from these tests, 2008-09-08) so that
running:

git grep git-

would return fewer hits. At the time, we were transitioning
away from the use of the "dashed" git-foo form.

That transition has been over for years, and grepping for
"git-" in the test suite yields thousands of hits anyway
(all presumably false positives).

With their original purpose gone, these variables serve only
to obfuscate the tests. Let's get rid of them.

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

Twelfth batch for 2.9Junio C Hamano Fri, 13 May 2016 20:23:24 +0000 (13:23 -0700)

Twelfth batch for 2.9

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

Merge branch 'sb/submodule-module-list-pathspec-fix'Junio C Hamano Fri, 13 May 2016 20:18:28 +0000 (13:18 -0700)

Merge branch 'sb/submodule-module-list-pathspec-fix'

* sb/submodule-module-list-pathspec-fix:
submodule deinit test: fix broken && chain in subshell

Merge branch 'jc/commit-tree-ignore-commit-gpgsign'Junio C Hamano Fri, 13 May 2016 20:18:27 +0000 (13:18 -0700)

Merge branch 'jc/commit-tree-ignore-commit-gpgsign'

"git commit-tree" plumbing command required the user to always sign
its result when the user sets the commit.gpgsign configuration
variable, which was an ancient mistake. Rework "git rebase" that
relied on this mistake so that it reads commit.gpgsign and pass (or
not pass) the -S option to "git commit-tree" to keep the end-user
expectation the same, while teaching "git commit-tree" to ignore
the configuration variable. This will stop requiring the users to
sign commit objects used internally as an implementation detail of
"git stash".

* jc/commit-tree-ignore-commit-gpgsign:
commit-tree: do not pay attention to commit.gpgsign

git-multimail: update to release 1.3.1Matthieu Moy Fri, 13 May 2016 17:00:41 +0000 (19:00 +0200)

git-multimail: update to release 1.3.1

The changes are described in CHANGES.

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

Documentation: clarify signature verificationKeller Fuchs Fri, 13 May 2016 09:51:01 +0000 (09:51 +0000)

Documentation: clarify signature verification

Clarify that "merge --verify-signatures" checks the signature on the
tip commit of the history being merged.

Uniformise the vocabulary used wrt. key/signature validity with OpenPGP:
- a signature is valid if made by a key with a valid uid;
- in the default trust-model, a uid is valid if signed by a trusted key;
- a key is trusted if the (local) user set a trust level for it.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Keller Fuchs <KellerFuchs@hashbang.sh>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

perf: run "rebase -i" under perfJohannes Schindelin Fri, 13 May 2016 13:26:03 +0000 (15:26 +0200)

perf: run "rebase -i" under perf

This developer spent a lot of time trying to speed up the interactive
rebase, in particular on Windows. And will continue to do so.

To make it easier to demonstrate the performance improvement, let's have
a reproducible performance test.

The topic branch we use to test performance was found using these shell
commands (essentially searching for a long-enough topic branch in Git's
own history that touched the same file multiple times):

git rev-list --parents origin/master |
grep ' .* ' |
while read commit rest
do
patch_count=$(git rev-list --count $commit^..$commit^2)
test $patch_count -gt 20 || continue

merges="$(git rev-list --parents $commit^..$commit^2 |
grep ' .* ')"
test -z "$merges" || continue

patches_per_file="$(git log --pretty=%H --name-only \
$commit^..$commit^2 |
grep -v '^$' |
sort |
uniq -c -d |
sort -n -r)"
test -n "$patches_per_file" &&
test 20 -lt $(echo "$patches_per_file" |
sed -n '1s/^ *\([0-9]*\).*/\1/p') || continue

printf 'commit %s\n%s\n' "$commit" "$patches_per_file"
done

Note that we can get away with *not* having to reset to the original
branch tip before rebasing: we switch the first two "pick" lines every
time, so we end up with the same patch order after two rebases, and the
complexity of both rebases is equivalent.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

perf: make the tests work in worktreesJohannes Schindelin Fri, 13 May 2016 13:25:58 +0000 (15:25 +0200)

perf: make the tests work in worktrees

This patch makes perf-lib.sh more robust so that it can run correctly
even inside a worktree. For example, it assumed that $GIT_DIR/objects is
the objects directory (which is not the case for worktrees) and it used
the commondir file verbatim, even if it contained a relative path.

Furthermore, the setup code expected `git rev-parse --git-dir` to spit
out a relative path, which is also not true for worktrees. Let's just
change the code to accept both relative and absolute paths, by avoiding
the `cd` into the copied working directory.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

perf: let's disable symlinks when they are not availableJohannes Schindelin Fri, 13 May 2016 13:25:51 +0000 (15:25 +0200)

perf: let's disable symlinks when they are not available

We already have a perfectly fine prereq to tell us whether it is safe to
use symlinks. So let's use it.

This fixes the performance tests in Git for Windows' SDK, where symlinks
are not really available ([*1*]). This is not an issue with Git for
Windows itself because it configures core.symlinks=false in its system
config. However, the system config is disabled for the performance
tests, for obvious reasons: we want them to be independent of the
vagaries of any local configuration.

Footnote *1*: Windows has symbolic links. Git for Windows disables them
by default, though (for example: in standard setups, non-admins lack the
privilege to create symbolic links). For details, see
https://github.com/git-for-windows/git/wiki/Symbolic-Links

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

i18n: unpack-trees: avoid substituting only a verb... Vasco Almeida Thu, 12 May 2016 23:16:26 +0000 (23:16 +0000)

i18n: unpack-trees: avoid substituting only a verb in sentences

Instead of reusing the same set of message templates for checkout
and other actions and substituting the verb with "%s", prepare
separate message templates for each known action. That would make
it easier for translation into languages where the same verb may
conjugate differently depending on the message we are giving.

See gettext documentation for details:
http://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rerere: plug memory leaks upon "rerere forget" failureJunio C Hamano Wed, 11 May 2016 23:19:17 +0000 (16:19 -0700)

rerere: plug memory leaks upon "rerere forget" failure

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

Documentation/git-mailinfo: fix typoVasco Almeida Wed, 11 May 2016 20:42:54 +0000 (20:42 +0000)

Documentation/git-mailinfo: fix typo

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: set BASH_XTRACEFD automaticallyJeff King Wed, 11 May 2016 13:44:04 +0000 (09:44 -0400)

test-lib: set BASH_XTRACEFD automatically

Passing "-x" to a test script enables the shell's "set -x"
tracing, which can help with tracking down the command that
is causing a failure. Unfortunately, it can also _cause_
failures in some tests that redirect the stderr of a shell
function. Inside the function the shell continues to
respect "set -x", and the trace output is collected along
with whatever stderr is generated normally by the function.

You can see an example of this by running:

./t0040-parse-options.sh -x -i

which will fail immediately in the first test, as it
expects:

test_must_fail some-cmd 2>output.err

to leave output.err empty (but with "-x" it has our trace
output).

Unfortunately there isn't a portable or scalable solution to
this. We could teach test_must_fail to disable "set -x", but
that doesn't help any of the other functions or subshells.

However, we can work around it by pointing the "set -x"
output to our descriptor 4, which always points to the
original stderr of the test script. Unfortunately this only
works for bash, but it's better than nothing (and other
shells will just ignore the BASH_XTRACEFD variable).

The patch itself is a simple one-liner, but note the caveats
in the accompanying comments.

Automatic tests for our "-x" option may be a bit too meta
(and a pain, because they are bash-specific), but I did
confirm that it works correctly both with regular "-x" and
with "--verbose-only=1". This works because the latter flips
"set -x" off and on for particular tests (if it didn't, we
would get tracing for all tests, as going to descriptor 4
effectively circumvents the verbose flag).

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

Windows: only add a no-op pthread_sigmask() when neededJohannes Schindelin Wed, 11 May 2016 15:10:30 +0000 (17:10 +0200)

Windows: only add a no-op pthread_sigmask() when needed

In f924b52 (Windows: add pthread_sigmask() that does nothing,
2016-05-01), we introduced a no-op for Windows. However, this breaks
building Git in Git for Windows' SDK because pthread_sigmask() is
already a no-op there, #define'd in the pthread_signal.h header in
/mingw64/x86_64-w64-mingw32/include/.

Let's wrap the definition of pthread_sigmask() in a guard that skips
it when compiling with MinGW-w64' headers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mingw: remove unnecessary definitionJohannes Schindelin Wed, 11 May 2016 08:43:41 +0000 (10:43 +0200)

mingw: remove unnecessary definition

For some reason, the definition of the MINGW version of
`mark_as_git_dir()` slipped into this developer's patch series to
support building Git for Windows.

As the `mark_as_git_dir()` function is not needed at all anymore (it was
used originally to support the core.hideDotFiles = gitDirOnly setting,
but we now use a different method to support that case), let's just
remove it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mingw: introduce the 'core.hideDotFiles' settingJohannes Schindelin Wed, 11 May 2016 08:43:37 +0000 (10:43 +0200)

mingw: introduce the 'core.hideDotFiles' setting

On Unix (and Linux), files and directories whose names start with a dot
are usually not shown by default. This convention is used by Git: the
.git/ directory should be left alone by regular users, and only accessed
through Git itself.

On Windows, no such convention exists. Instead, there is an explicit flag
to mark files or directories as hidden.

In the early days, Git for Windows did not mark the .git/ directory (or
for that matter, any file or directory whose name starts with a dot)
hidden. This lead to quite a bit of confusion, and even loss of data.

Consequently, Git for Windows introduced the core.hideDotFiles setting,
with three possible values: true, false, and dotGitOnly, defaulting to
marking only the .git/ directory as hidden.

The rationale: users do not need to access .git/ directly, and indeed (as
was demonstrated) should not really see that directory, either. However,
not all dot files should be hidden by default, as e.g. Eclipse does not
show them (and the user would therefore be unable to see, say, a
.gitattributes file).

In over five years since the last attempt to bring this patch into core
Git, a slightly buggy version of this patch has served Git for Windows'
users well: no single report indicated problems with the hidden .git/
directory, and the stream of problems caused by the previously non-hidden
.git/ directory simply stopped. The bugs have been fixed during the
process of getting this patch upstream.

Note that there is a funny quirk we have to pay attention to when
creating hidden files: we use Win32's _wopen() function which
transmogrifies its arguments and hands off to Win32's CreateFile()
function. That latter function errors out with ERROR_ACCESS_DENIED (the
equivalent of EACCES) when the equivalent of the O_CREAT flag was passed
and the file attributes (including the hidden flag) do not match an
existing file's. And _wopen() accepts no parameter that would be
transmogrified into said hidden flag. Therefore, we simply try again
without O_CREAT.

A slightly different method is required for our fopen()/freopen()
function as we cannot even *remove* the implicit O_CREAT flag.
Therefore, we briefly mark existing files as unhidden when opening them
via fopen()/freopen().

The ERROR_ACCESS_DENIED error can also be triggered by opening a file
that is marked as a system file (which is unlikely to be tracked in
Git), and by trying to create a file that has *just* been deleted and is
awaiting the last open handles to be released (which would be handled
better by the "Try again?" logic, a story for a different patch series,
though). In both cases, it does not matter much if we try again without
the O_CREAT flag, read: it does not hurt, either.

For details how ERROR_ACCESS_DENIED can be triggered, see
https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858

Original-patch-by: Erik Faye-Lund <kusmabite@gmail.com>
Initial-Test-By: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase--interactive: avoid empty list in shell for... Jeff King Tue, 10 May 2016 21:07:10 +0000 (17:07 -0400)

rebase--interactive: avoid empty list in shell for-loop

The $strategy_opts variable contains a space-separated list
of strategy options, each individually shell-quoted. To loop
over each, we "unwrap" them by doing an eval like:

eval '
for opt in '"$strategy_opts"'
do
...
done
'

Note the quoting that means we expand $strategy_opts inline
in the code to be evaluated (which is the right thing
because we want the IFS-split and de-quoting). If the
variable is empty, however, we ask the shell to eval the
following code:

for opt in
do
...
done

without anything between "in" and "do". Most modern shells
are happy to treat that like a noop, but reportedly ksh88 on
AIX considers it a syntax error. So let's catch the case
that the variable is empty and skip the eval altogether
(since we know the loop would be a noop anyway).

Reported-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eleventh batch for 2.9Junio C Hamano Tue, 10 May 2016 20:46:57 +0000 (13:46 -0700)

Eleventh batch for 2.9

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

Merge branch 'svn/bad-ref' of git://bogomips.org/git-svnJunio C Hamano Tue, 10 May 2016 20:40:57 +0000 (13:40 -0700)

Merge branch 'svn/bad-ref' of git://bogomips.org/git-svn

* 'svn/bad-ref' of git://bogomips.org/git-svn:
Git/SVN: die when there is no commit metadata

Merge branch 'sk/gitweb-highlight-encoding'Junio C Hamano Tue, 10 May 2016 20:40:33 +0000 (13:40 -0700)

Merge branch 'sk/gitweb-highlight-encoding'

Some multi-byte encoding can have a backslash byte as a later part
of one letter, which would confuse "highlight" filter used in
gitweb.

* sk/gitweb-highlight-encoding:
gitweb: apply fallback encoding before highlight

Merge branch 'sb/clean-test-fix'Junio C Hamano Tue, 10 May 2016 20:40:32 +0000 (13:40 -0700)

Merge branch 'sb/clean-test-fix'

* sb/clean-test-fix:
t7300: mark test with SANITY

Merge branch 'rn/glossary-typofix'Junio C Hamano Tue, 10 May 2016 20:40:31 +0000 (13:40 -0700)

Merge branch 'rn/glossary-typofix'

* rn/glossary-typofix:
Documentation: fix typo 'In such these cases'

Merge branch 'ls/travis-submitting-patches'Junio C Hamano Tue, 10 May 2016 20:40:30 +0000 (13:40 -0700)

Merge branch 'ls/travis-submitting-patches'

* ls/travis-submitting-patches:
Documentation: add setup instructions for Travis CI

Merge branch 'js/close-packs-before-gc'Junio C Hamano Tue, 10 May 2016 20:40:30 +0000 (13:40 -0700)

Merge branch 'js/close-packs-before-gc'

* js/close-packs-before-gc:
t5510: run auto-gc in the foreground

Merge branch 'ew/normal-to-e'Junio C Hamano Tue, 10 May 2016 20:40:29 +0000 (13:40 -0700)

Merge branch 'ew/normal-to-e'

* ew/normal-to-e:
.mailmap: update to my shorter email address

Merge branch 'ls/p4-lfs'Junio C Hamano Tue, 10 May 2016 20:40:29 +0000 (13:40 -0700)

Merge branch 'ls/p4-lfs'

Recent update to Git LFS broke "git p4" by changing the output from
its "lfs pointer" subcommand.

* ls/p4-lfs:
git-p4: fix Git LFS pointer parsing
travis-ci: express Linux/OS X dependency versions more clearly
travis-ci: update Git-LFS and P4 to the latest version

Merge branch 'sb/misc-cleanups'Junio C Hamano Tue, 10 May 2016 20:40:29 +0000 (13:40 -0700)

Merge branch 'sb/misc-cleanups'

* sb/misc-cleanups:
submodule-config: don't shadow `cache`
config.c: drop local variable

Merge branch 'ew/doc-split-pack-disables-bitmap'Junio C Hamano Tue, 10 May 2016 20:40:28 +0000 (13:40 -0700)

Merge branch 'ew/doc-split-pack-disables-bitmap'

Doc update.

* ew/doc-split-pack-disables-bitmap:
pack-objects: warn on split packs disabling bitmaps

wrap-for-bin.sh: regenerate bin-wrappers when switching... Duy Nguyen Tue, 10 May 2016 11:58:56 +0000 (18:58 +0700)

wrap-for-bin.sh: regenerate bin-wrappers when switching branches

Commit e6e7530 (test helpers: move test-* to t/helper/ subdirectory -
2016-04-13) moves test-* to t/helper. However because bin-wrappers/*
only depend on wrap-for-bin.sh, when switching between a branch that has
this commit and one that does not, bin-wrappers/* may not be regenerated
and point to the old/outdated test programs.

This commit makes a non-functional change in wrap-for-bin.sh, just
enough for 'make' to detect and re-execute wrap-for-bin.sh. When
switching between a branch containing both this commit and e6e7530 and
one containing neither, bin-wrappers/*, we should get fresh bin-wrappers/*.

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

t0040: convert a few tests to use test-parse-options... Junio C Hamano Fri, 6 May 2016 18:17:05 +0000 (11:17 -0700)

t0040: convert a few tests to use test-parse-options --expect

As a small example of using "test-parse-options --expect",
rewrite the "check" helper using it, instead of comparing
the whole variable dump.

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

t0040: remove unused test helpersJunio C Hamano Fri, 6 May 2016 17:52:34 +0000 (10:52 -0700)

t0040: remove unused test helpers

9a001381 (Fix tests under GETTEXT_POISON on parseopt, 2012-08-27)
introduced check_i18n, but the helper was never used from the
beginning.

The same commit also introduced check_unknown_i18n to replace the
helper check_unknown and changed all users of the latter to use the
former, but failed to remove check_unknown itself.

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

test-parse-options: --expect=<string> option to simplif... Junio C Hamano Thu, 5 May 2016 21:36:55 +0000 (14:36 -0700)

test-parse-options: --expect=<string> option to simplify tests

Existing tests in t0040 follow a rather verbose pattern:

cat >expect <<\EOF
boolean: 0
integer: 0
magnitude: 0
timestamp: 0
string: (not set)
abbrev: 7
verbose: 0
quiet: 3
dry run: no
file: (not set)
EOF

test_expect_success 'multiple quiet levels' '
test-parse-options -q -q -q >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
'

But the only thing this test cares about is if "quiet: 3" is in the
output. We should be able to write the above 18 lines with just
four lines, like this:

test_expect_success 'multiple quiet levels' '
test-parse-options --expect="quiet: 3" -q -q -q
'

Teach the new --expect=<string> option to test-parse-options helper.

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

test-parse-options: fix output when callback option... Junio C Hamano Thu, 5 May 2016 20:30:10 +0000 (13:30 -0700)

test-parse-options: fix output when callback option fails

When test-parse-options detects an error on the command line, it
gives the usage string just like any parse-options API users do,
without showing any "variable dump". An exception is the callback
test, where a "variable dump" for the option is done before the
command line options are fully parsed.

Do not expose this implementation detail by separating the handling
of callback test into two phases, one to capture the fact that an
option was given during the option parsing phase, and the other to
show that fact as a part of normal "variable dump".

The effect of this fix is seen in the patch to t/t0040 where it
tried "test-parse-options --no-length" where "--length" is a callback
that does not take a negative form.

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

submodule: ensure that -c http.extraheader is heededJohannes Schindelin Tue, 10 May 2016 07:08:56 +0000 (09:08 +0200)

submodule: ensure that -c http.extraheader is heeded

To support this developer's use case of allowing build agents token-based
access to private repositories, we introduced the http.extraheader
feature, allowing extra HTTP headers to be sent along with every HTTP
request.

This patch verifies that we can configure these extra HTTP headers via the
command-line for use with `git submodule update`, too. Example: git -c
http.extraheader="Secret: Sauce" submodule update --init

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3404: fix typoJohannes Schindelin Tue, 10 May 2016 14:05:58 +0000 (16:05 +0200)

t3404: fix typo

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

travis-ci: build documentationLars Schneider Wed, 4 May 2016 08:38:36 +0000 (10:38 +0200)

travis-ci: build documentation

Build documentation as separate Travis CI job to check for
documentation errors.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ci: validate "linkgit:" in documentationJunio C Hamano Wed, 4 May 2016 21:34:23 +0000 (14:34 -0700)

ci: validate "linkgit:" in documentation

It is easy to add incorrect "linkgit:<page>[<section>]" references
to our documentation suite. Catch these common classes of errors:

* Referring to Documentation/<page>.txt that does not exist.

* Referring to a <page> outside the Git suite. In general, <page>
must begin with "git".

* Listing the manual <section> incorrectly. The first line of the
Documentation/<page>.txt must end with "(<section>)".

with a new script "ci/lint-gitlink", and drive it from "make check-docs".

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

Merge branch 'jk/submodule-c-credential' into js/http... Junio C Hamano Tue, 10 May 2016 17:38:31 +0000 (10:38 -0700)

Merge branch 'jk/submodule-c-credential' into js/http-custom-headers

* jk/submodule-c-credential:
submodule: stop sanitizing config options
submodule: use prepare_submodule_repo_env consistently
submodule--helper: move config-sanitizing to submodule.c
submodule: export sanitized GIT_CONFIG_PARAMETERS
t5550: break submodule config test into multiple sub-tests
t5550: fix typo in $HTTPD_URL
git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS
git: submodule honor -c credential.* from command line
quote: implement sq_quotef()
submodule: fix segmentation fault in submodule--helper clone
submodule: fix submodule--helper clone usage
submodule: check argc count for git submodule--helper clone
submodule: don't pass empty string arguments to submodule--helper clone

t5551: make the test for extra HTTP headers more robustJohannes Schindelin Mon, 9 May 2016 06:19:00 +0000 (08:19 +0200)

t5551: make the test for extra HTTP headers more robust

To test that extra HTTP headers are passed correctly, t5551 verifies that
a fetch succeeds when two required headers are passed, and that the fetch
does not succeed when those headers are not passed.

However, this test would also succeed if the configuration required only
one header. As Apache's configuration is notoriously tricky (this
developer frequently requires StackOverflow's help to understand Apache's
documentation), especially when still supporting the 2.2 line, let's just
really make sure that the test verifies what we want it to verify.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: adjust the configuration for Apache 2.2Johannes Schindelin Mon, 9 May 2016 05:59:16 +0000 (07:59 +0200)

tests: adjust the configuration for Apache 2.2

Lars Schneider noticed that the configuration introduced to test the
extra HTTP headers cannot be used with Apache 2.2 (which is still
actively maintained, as pointed out by Junio Hamano).

To let the tests pass with Apache 2.2 again, let's substitute the
offending <RequireAll> and `expr` by using old school RewriteCond
statements.

As RewriteCond does not allow testing for *non*-matches, we simply match
the desired case first and let it pass by marking the RewriteRule as
'[L]' ("last rule, do not process any other matching RewriteRules after
this"), and then have another RewriteRule that matches all other cases
and lets them fail via '[F]' ("fail").

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Tested-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: add a commit.verbose config variablePranit Bauva Thu, 5 May 2016 09:50:02 +0000 (15:20 +0530)

commit: add a commit.verbose config variable

Add commit.verbose configuration variable as a convenience for those
who always prefer --verbose.

Add tests to check the behavior introduced by this commit and also to
verify that behavior of status doesn't break because of this commit.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: detect and warn a commit with embedded NULJunio C Hamano Thu, 14 Apr 2016 17:58:22 +0000 (10:58 -0700)

fsck: detect and warn a commit with embedded NUL

Even though a Git commit object is designed to be capable of storing
any binary data as its payload, in practice people use it to describe
the changes in textual form, and tools like "git log" are designed to
treat the payload as text.

Detect and warn when we see any commit object with a NUL byte in
it.

Note that a NUL byte in the header part is already detected as a
grave error. This change is purely about the message part.

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

Documentation: fix linkgit referencesJunio C Hamano Wed, 4 May 2016 17:36:24 +0000 (10:36 -0700)

Documentation: fix linkgit references

There are a handful of incorrect "linkgit:<page>[<section>]"
instances in our documentation set.

* Some have an extra colon after "linkgit:"; fix them by removing
the extra colon;

* Some refer to a page outside the Git suite, namely curl(1); fix
them by using the `curl(1)` that already appears on the same page
for the same purpose of referring the readers to its manual page.

* Some spell the name of the page incorrectly, e.g. "rev-list" when
they mean "git-rev-list"; fix them.

* Some list the manual section incorrectly; fix them to make sure
they match what is at the top of the target of the link.

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

t6036: remove pointless test that expects failureJunio C Hamano Wed, 27 Apr 2016 22:05:57 +0000 (15:05 -0700)

t6036: remove pointless test that expects failure

One test in t6036 prepares a file whose contents contain these
lines:

<<<<<<< Temporary merge branch 1
C
=======
B
>>>>>>> Temporary merge branch 2

and uses recursive merge strategy to run criss-cross merge with it.

Manual merge resolution by users fundamentally depends on being able
to distinguish the tracked contents from the separator lines added
by "git merge" in order to allow users to tell which block of lines
came from where. You can deliberately craft a file with lines that
resemble conflict marker lines to make it impossible for the user
(the outer merge of merge-recursive counts as a user of the result
of "virtual parent" merge) to tell which part is which, and write a
test to demonstrate that with such a file that "git merge" cannot
fundamentally work well and has to fail.

It however is pointless and waste of time and resource to run such a
test that asserts the obvious.

In real life, people who do need to track files with such lines that
have <<<< ==== >>>> as their prefixes set the conflict-marker-size
attribute to make sure they will be able to tell between the tracked
lines that happen to begin with these (confusing) prefixes and the
marker lines that are added by "git merge".

Remove the test as pointless waste of resource.

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

ll-merge: use a longer conflict marker for internal... Junio C Hamano Thu, 14 Apr 2016 22:35:09 +0000 (15:35 -0700)

ll-merge: use a longer conflict marker for internal merge

The primary use of conflict markers is to help the user who resolves
the final (outer) merge by hand to show which part came from which
branch by separating the blocks of lines apart. When the conflicted
parts from a "virtual ancestor" merge created by merge-recursive
remains in the common ancestor part in the final result, however,
the conflict markers that are the same size as the final merge
become harder to see.

Increase the conflict marker size slightly for these inner merges so
that the markers from the final merge and cruft from internal merge
can be distinguished more easily.

This would help reduce the common issue that prevents "rerere" from
being used on a really complex conflict.

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

test-lib-functions.sh: rewrite test_seq without PerlJunio C Hamano Mon, 9 May 2016 19:37:01 +0000 (12:37 -0700)

test-lib-functions.sh: rewrite test_seq without Perl

Rewrite the 'seq' imitation using only commands and features that
are typically found built into modern POSIX shells, instead of
relying on Perl to run a single-liner script.

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

t4151: make sure argument to 'test -z' is givenArmin Kunaschik Mon, 9 May 2016 18:57:25 +0000 (11:57 -0700)

t4151: make sure argument to 'test -z' is given

88d50724 (am --skip: revert changes introduced by failed 3way merge,
2015-06-06), unlike all the other patches in the series, forgot to
quote the output from "$(git ls-files -u)" when using it as the
argument to "test -z", leading to a syntax error on platforms whose
test does not interpret "test -z" (no other arguments) as testing if
a string "-z" is the null string (which GNU test and test that is
built into bash and dash seem to do).

Note that $(git ls-files -u | wc -l) is deliberately left unquoted,
as some implementations of "wc -l" includes extra blank characters
in its output and cannot be compared as string, i.e. "test 0 = $(...)".

Signed-off-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib-functions.sh: remove misleading comment on... Junio C Hamano Mon, 9 May 2016 18:36:09 +0000 (11:36 -0700)

test-lib-functions.sh: remove misleading comment on test_seq

We never used the "letters" form since we came up with "test_seq" to
replace use of non-portable "seq" in our test script, which we
introduced it at d17cf5f3 (tests: Introduce test_seq, 2012-08-04).

We use this helper to either iterate for N times (i.e. the values on
the lines do not even matter), or just to get N distinct strings
(i.e. the values on the lines themselves do not really matter, but
we care that they are different from each other and reproducible).

Stop promising that we may allow using "letters"; this would open an
easier reimplementation that does not rely on $PERL, if somebody
later wants to.

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

wrapper.c: use warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:48:01 +0000 (16:48 +0700)

wrapper.c: use warning_errno()

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

vcs-svn: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:48:00 +0000 (16:48 +0700)

vcs-svn: use error_errno()

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

upload-pack.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:59 +0000 (16:47 +0700)

upload-pack.c: use error_errno()

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

unpack-trees.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:58 +0000 (16:47 +0700)

unpack-trees.c: use error_errno()

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

transport-helper.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:57 +0000 (16:47 +0700)

transport-helper.c: use error_errno()

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

sha1_file.c: use {error,die,warning}_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:56 +0000 (16:47 +0700)

sha1_file.c: use {error,die,warning}_errno()

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

server-info.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:55 +0000 (16:47 +0700)

server-info.c: use error_errno()

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

sequencer.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:54 +0000 (16:47 +0700)

sequencer.c: use error_errno()

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

run-command.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:53 +0000 (16:47 +0700)

run-command.c: use error_errno()

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

rerere.c: use error_errno() and warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:52 +0000 (16:47 +0700)

rerere.c: use error_errno() and warning_errno()

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

reachable.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:51 +0000 (16:47 +0700)

reachable.c: use error_errno()

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

mailmap.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:50 +0000 (16:47 +0700)

mailmap.c: use error_errno()

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

ident.c: use warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:49 +0000 (16:47 +0700)

ident.c: use warning_errno()

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

http.c: use error_errno() and warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:48 +0000 (16:47 +0700)

http.c: use error_errno() and warning_errno()

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

grep.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:47 +0000 (16:47 +0700)

grep.c: use error_errno()

While at there, improve the error message a bit (what operation failed?)

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

gpg-interface.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:46 +0000 (16:47 +0700)

gpg-interface.c: use error_errno()

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

fast-import.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:45 +0000 (16:47 +0700)

fast-import.c: use error_errno()

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

entry.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:44 +0000 (16:47 +0700)

entry.c: use error_errno()

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

editor.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:43 +0000 (16:47 +0700)

editor.c: use error_errno()

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

diff-no-index.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:42 +0000 (16:47 +0700)

diff-no-index.c: use error_errno()

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

credential-cache--daemon.c: use warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:41 +0000 (16:47 +0700)

credential-cache--daemon.c: use warning_errno()

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

copy.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:40 +0000 (16:47 +0700)

copy.c: use error_errno()

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

connected.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:39 +0000 (16:47 +0700)

connected.c: use error_errno()

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

config.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:38 +0000 (16:47 +0700)

config.c: use error_errno()

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

compat/win32/syslog.c: use warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:37 +0000 (16:47 +0700)

compat/win32/syslog.c: use warning_errno()

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

combine-diff.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:36 +0000 (16:47 +0700)

combine-diff.c: use error_errno()

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

check-racy.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:35 +0000 (16:47 +0700)

check-racy.c: use error_errno()

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

builtin/worktree.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:34 +0000 (16:47 +0700)

builtin/worktree.c: use error_errno()

While at there, improve the error message to say _what_ failed to
remove.

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

builtin/upload-archive.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:33 +0000 (16:47 +0700)

builtin/upload-archive.c: use error_errno()

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

builtin/update-index.c: prefer "err" to "errno" in... Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:32 +0000 (16:47 +0700)

builtin/update-index.c: prefer "err" to "errno" in process_lstat_error

"errno" is already passed in as "err". Here we should use err instead of
errno. errno is probably a copy/paste mistake in e011054 (Teach
git-update-index about gitlinks - 2007-04-12)

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

builtin/rm.c: use warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:31 +0000 (16:47 +0700)

builtin/rm.c: use warning_errno()

While at there, improve the message a bit (what operation failed?) and
mark it for translation since the format string is now a sentence.

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

builtin/pack-objects.c: use die_errno() and warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:30 +0000 (16:47 +0700)

builtin/pack-objects.c: use die_errno() and warning_errno()

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

builtin/merge-file.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:29 +0000 (16:47 +0700)

builtin/merge-file.c: use error_errno()

All these error() calls do not print error message previously, but
because when they are called, errno should be set. Use error_errno()
instead to give more information.

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

builtin/mailsplit.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:28 +0000 (16:47 +0700)

builtin/mailsplit.c: use error_errno()

There's one change, in split_mbox(), where an error() without strerror()
as argument is converted to error_errno(). This is correct because the
previous call is fopen (not shown in the context lines), which should
set errno if it returns NULL.

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

builtin/help.c: use warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:27 +0000 (16:47 +0700)

builtin/help.c: use warning_errno()

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

builtin/fetch.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:26 +0000 (16:47 +0700)

builtin/fetch.c: use error_errno()

A couple of newlines are also removed, because both error() and
error_errno() automatically append a newline.

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

builtin/branch.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:25 +0000 (16:47 +0700)

builtin/branch.c: use error_errno()

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

builtin/am.c: use error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:24 +0000 (16:47 +0700)

builtin/am.c: use error_errno()

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

bisect.c: use die_errno() and warning_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:23 +0000 (16:47 +0700)

bisect.c: use die_errno() and warning_errno()

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

usage.c: add warning_errno() and error_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:22 +0000 (16:47 +0700)

usage.c: add warning_errno() and error_errno()

Similar to die_errno(), these functions will append strerror()
automatically.

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

usage.c: move format processing out of die_errno()Nguyễn Thái Ngọc Duy Sun, 8 May 2016 09:47:21 +0000 (16:47 +0700)

usage.c: move format processing out of die_errno()

fmt_with_err() will be shared with the coming error_errno() and
warning_errno().

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

i18n: remote: add comment for translatorsVasco Almeida Sun, 8 May 2016 20:00:18 +0000 (20:00 +0000)

i18n: remote: add comment for translators

Add comment drawing translator attention in order to align "Push
URL:" and "Fetch URL:" fields translation of git remote show output.

Aligning both fields makes the output more appealing and easier to
grasp.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6302: simplify non-gpg casesJeff King Mon, 9 May 2016 16:49:00 +0000 (12:49 -0400)

t6302: simplify non-gpg cases

When commit 618310a taught t6302 to run without the GPG
prerequisite, it did so by conditionally creating the signed
tags only when gpg is available. As a result, further tests
need to take this into account, which they can do with the
test_prepare_expect helper. This is a minor hassle, though,
as the helper cannot easily cover all cases (it just matches
"signed" in the output, so all output must include the
actual refname).

Instead, let's take a different approach. We'll always
create the tags, and only conditionally sign them. This does
mean our tag-names are a minor lie, but it lets the tests
which do not care about signing easily behave the same in
all settings. We'll include a comment to document our lie
and avoid confusing further test-writers.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6041: do not compress backup tar fileStefan Beller Mon, 9 May 2016 17:09:08 +0000 (10:09 -0700)

t6041: do not compress backup tar file

The test uses the 'z' option, i.e. "compress the output while at
it", which is GNUism and not portable.

Reported-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3513: do not compress backup tar fileStefan Beller Fri, 6 May 2016 18:37:05 +0000 (11:37 -0700)

t3513: do not compress backup tar file

The test uses the 'z' option, i.e. "compress the output while at
it", which is GNUism and not portable.

Reported-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5601: Remove trailing space in sed expressionTorsten Bögershausen Mon, 9 May 2016 17:53:12 +0000 (19:53 +0200)

t5601: Remove trailing space in sed expression

The sed expression for IPv6, "Tested User And Host" or "tuah" used a wrong
sed expression, which doesn't work under all versions of sed.

Reported-By: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git/SVN: die when there is no commit metadataChristian Couder Sat, 7 May 2016 06:58:43 +0000 (08:58 +0200)

Git/SVN: die when there is no commit metadata

When passing a bad --trunk option to `git svn clone`, like for example the
same URL that we are cloning:

C:\Windows\system32>git svn clone
https://mycompany.svn.beanstalkapp.com/myproject --no-metadata -A
c:\temp\svn_to_git_users.txt
--trunk=https://mycompany.svn.beanstalkapp.com/myproject
--tags=https://mycompany.svn.beanstalkapp.com/myproject/tags
--branches=https://mycompany.svn.beanstalkapp.com/myproject/branches
c:\code\Git_myproject

One gets an "Use of uninitialized value $u in substitution (s///)" error:

[...]
W: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/MS WCSF
Contrib/src/Services
W: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/RealWorldControls/References
r530 = c276e3b039d8e38759c6fb17443349732552d7a2 (refs/remotes/origin/trunk)
Found possible branch point:
https://mycompany.svn.beanstalkapp.com/myproject/trunk =>
https://mycompany.svn.beanstalkapp.com/myproject/branches/20080918_DBDEPLOY,
529
Use of uninitialized value $u in substitution (s///) at
/mingw32/share/perl5/site_perl/Git/SVN.pm line 101.
Use of uninitialized value $u in concatenation (.) or string at
/mingw32/share/perl5/site_perl/Git/SVN.pm line 101.
refs/remotes/origin/trunk:
'https://mycompany.svn.beanstalkapp.com/myproject' not found in ''
C:\Windows\system32>

Let's fix that by just die()ing when we have an uninitialized value because we
cannot get commit metadata from a ref.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Eric Wong <e@80x24.org>

Sync with maintJunio C Hamano Fri, 6 May 2016 21:53:45 +0000 (14:53 -0700)

Sync with maint

* maint:
Almost ready for 2.8.3

Almost ready for 2.8.3Junio C Hamano Fri, 6 May 2016 21:53:36 +0000 (14:53 -0700)

Almost ready for 2.8.3

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

Merge branch 'sb/submodule-path-misc-bugs' into maintJunio C Hamano Fri, 6 May 2016 21:53:24 +0000 (14:53 -0700)

Merge branch 'sb/submodule-path-misc-bugs' into maint

"git submodule" reports the paths of submodules the command
recurses into, but this was incorrect when the command was not run
from the root level of the superproject.

* sb/submodule-path-misc-bugs:
t7407: make expectation as clear as possible
submodule update: test recursive path reporting from subdirectory
submodule update: align reporting path for custom command execution
submodule status: correct path handling in recursive submodules
submodule update --init: correct path handling in recursive submodules
submodule foreach: correct path display in recursive submodules