gitweb.git
api-trace.txt: fix typoElia Pinto Tue, 5 Apr 2016 10:05:23 +0000 (10:05 +0000)

api-trace.txt: fix typo

The correct api is trace_printf_key(), not trace_print_key().

Also do not throw a random string at printf(3)-like function;
instead, feed it as a parameter that is fed to a "%s" conversion
specifier.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: fix misdirected redirectionsJunio C Hamano Tue, 5 Apr 2016 07:02:14 +0000 (00:02 -0700)

Makefile: fix misdirected redirections

In general "echo 2>&1 $msg" to redirect a possible error message
that comes from 'echo' itself into the same standard output stream
$msg is getting written to does not make any sense; it is not like
we are expecting to see any errors out of 'echo' in these statements,
and even if it were the case, there is no reason to prevent the
error messages from being sent to the standard error stream.

These are clearly meant to send the argument given to echo to the
standard error stream as error messages. Correctly redirect by
saying "send what is written to the standard output to the standard
error", i.e. "1>&2" aka ">&2".

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

branch: fix shortening of non-remote symrefsJeff King Sun, 3 Apr 2016 04:14:26 +0000 (00:14 -0400)

branch: fix shortening of non-remote symrefs

Commit aedcb7d (branch.c: use 'ref-filter' APIs, 2015-09-23)
adjusted the symref-printing code to look like this:

if (item->symref) {
skip_prefix(item->symref, "refs/remotes/", &desc);
strbuf_addf(&out, " -> %s", desc);
}

This has three bugs in it:

1. It always skips past "refs/remotes/", instead of
skipping past the prefix associated with the branch we
are showing (so commonly we see "refs/remotes/" for the
refs/remotes/origin/HEAD symref, but the previous code
would skip "refs/heads/" when showing a symref it found
in refs/heads/.

2. If skip_prefix() does not match, it leaves "desc"
untouched, and we show whatever happened to be in it
(which is the refname from a call to skip_prefix()
earlier in the function).

3. If we do match with skip_prefix(), we stomp on the
"desc" variable, which is later passed to
add_verbose_info(). We probably want to retain the
original refname there (though it likely doesn't matter
in practice, since after all, one points to the other).

The fix to match the original code is fairly easy: record
the prefix to strip based on item->kind, and use it here.
However, since we already have a local variable named "prefix",
let's give the two prefixes verbose names so we don't
confuse them.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pretty: test --expand-tabsJunio C Hamano Mon, 4 Apr 2016 23:09:18 +0000 (16:09 -0700)

pretty: test --expand-tabs

The test prepares a simple commit with HT on its log message lines,
and makes sure that

- formats that should or should not expand tabs by default do or do
not expand tabs respectively,

- with explicit --expand-tabs=<N> and short-hands --expand-tabs
(equivalent to --expand-tabs=8) and --no-expand-tabs (equivalent
to --expand-tabs=0) before or after the explicit --pretty=$fmt,
the tabs are expanded (or not expanded) accordingly.

The tests use the second line of the log message for formats other
than --pretty=short, primarily because the first line of the email
format is handled specially to add the [PATCH] prefix, etc. in a
separate codepath (--pretty=short uses the first line because there
is no other line to test).

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

Windows: shorten code by re-using convert_slashes()Johannes Sixt Sat, 2 Apr 2016 19:03:14 +0000 (21:03 +0200)

Windows: shorten code by re-using convert_slashes()

Make a few more spots more readable by using the recently introduced,
Windows-specific helper.

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

git-format-patch.txt: don't show -s as shorthand for... Eric Sunshine Sun, 27 Mar 2016 21:26:07 +0000 (17:26 -0400)

git-format-patch.txt: don't show -s as shorthand for multiple options

git-format-patch recognizes -s as shorthand only for --signoff, however,
its documentation shows -s as shorthand for both --signoff and
--no-patch. Resolve this confusion by suppressing the bogus -s shorthand
for --no-patch.

While here, also avoid showing the --no-patch option in git-format-patch
documentation since it doesn't make sense to ask to suppress the patch
while at the same time explicitly asking to format the patch (which,
after all, is the purpose of git-format-patch).

Reported-by: Kevin Brodsky <corax26@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch -m: update all per-worktree HEADsKazuki Yamaguchi Sun, 27 Mar 2016 14:37:14 +0000 (23:37 +0900)

branch -m: update all per-worktree HEADs

When renaming a branch, currently only the HEAD of current working tree
is updated, but it must update HEADs of all working trees which point at
the old branch.

This is the current behavior, /path/to/wt's HEAD is not updated:

% git worktree list
/path/to 2c3c5f2 [master]
/path/to/wt 2c3c5f2 [oldname]
% git branch -m master master2
% git worktree list
/path/to 2c3c5f2 [master2]
/path/to/wt 2c3c5f2 [oldname]
% git branch -m oldname newname
% git worktree list
/path/to 2c3c5f2 [master2]
/path/to/wt 0000000 [oldname]

This patch fixes this issue by updating all relevant worktree HEADs
when renaming a branch.

Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: add a new function set_worktree_head_symrefKazuki Yamaguchi Sun, 27 Mar 2016 14:37:13 +0000 (23:37 +0900)

refs: add a new function set_worktree_head_symref

Add a new function set_worktree_head_symref, to update HEAD symref for
the specified worktree.

To update HEAD of a linked working tree,
create_symref("worktrees/$work_tree/HEAD", "refs/heads/$branch", msg)
could be used. However when it comes to updating HEAD of the main
working tree, it is unusable because it uses $GIT_DIR for
worktree-specific symrefs (HEAD).

The new function takes git_dir (real directory) as an argument, and
updates HEAD of the working tree. This function will be used when
renaming a branch.

Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Acked-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: test --[no-]autostash with pull.rebase=trueMehul Jain Sat, 2 Apr 2016 17:58:32 +0000 (23:28 +0530)

t5520: test --[no-]autostash with pull.rebase=true

The "--[no-]autostash" options for git-pull are only valid in
rebase mode (i.e. either --rebase is used or pull.rebase=true).
Existing tests already check the cases when --rebase is used but
fail to check for pull.rebase=true case.

Add two new tests to check that the --[no-]autostash options work
with pull.rebase=true.

Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: reduce commom lines of codeMehul Jain Sat, 2 Apr 2016 17:58:31 +0000 (23:28 +0530)

t5520: reduce commom lines of code

These two tests are almost similar and thus can be folded in a for-loop.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: factor out common "failing autostash" codeMehul Jain Sat, 2 Apr 2016 17:58:30 +0000 (23:28 +0530)

t5520: factor out common "failing autostash" code

Three tests contains repetitive lines of code.

Factor out common code into test_pull_autostash_fail() and then call it in
these tests.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: factor out common "successful autostash" codeMehul Jain Sat, 2 Apr 2016 17:58:29 +0000 (23:28 +0530)

t5520: factor out common "successful autostash" code

Four tests contains repetitive lines of code.

Factor out common code into test_pull_autostash() and then call it in
these tests.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: use better test to check stderr outputMehul Jain Sat, 2 Apr 2016 17:58:28 +0000 (23:28 +0530)

t5520: use better test to check stderr output

Checking stderr output using test_i18ncmp may lead to test failure as
some shells write trace output to stderr when run under 'set -x'.

Use test_i18ngrep instead of test_i18ncmp.

Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: ensure consistent test conditionsMehul Jain Sat, 2 Apr 2016 17:58:27 +0000 (23:28 +0530)

t5520: ensure consistent test conditions

Test title says that tests are done with rebase.autostash unset,
but does not take any action to make sure that it is indeed unset.
This may lead to test failure if future changes somehow pollutes
the configuration globally.

Ensure consistent test conditions by explicitly unsetting
rebase.autostash.

Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: use consistent capitalization in test titlesMehul Jain Sat, 2 Apr 2016 17:58:26 +0000 (23:28 +0530)

t5520: use consistent capitalization in test titles

Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetools: add support for ExamDiffJacob Nisnevich Fri, 25 Mar 2016 23:17:57 +0000 (16:17 -0700)

mergetools: add support for ExamDiff

Signed-off-by: Jacob Nisnevich <jacob.nisnevich@gmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetools: create mergetool_find_win32_cmd() helper... Jacob Nisnevich Fri, 25 Mar 2016 23:17:56 +0000 (16:17 -0700)

mergetools: create mergetool_find_win32_cmd() helper function for winmerge

Signed-off-by: Jacob Nisnevich <jacob.nisnevich@gmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

First batch for post 2.8 cycleJunio C Hamano Sun, 3 Apr 2016 17:55:36 +0000 (10:55 -0700)

First batch for post 2.8 cycle

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

Sync with Git 2.8.1Junio C Hamano Sun, 3 Apr 2016 17:54:38 +0000 (10:54 -0700)

Sync with Git 2.8.1

Merge branch 'jk/startup-info'Junio C Hamano Sun, 3 Apr 2016 17:29:35 +0000 (10:29 -0700)

Merge branch 'jk/startup-info'

The startup_info data, which records if we are working inside a
repository (among other things), are now uniformly available to Git
subcommand implementations, and Git avoids attempting to touch
references when we are not in a repository.

* jk/startup-info:
use setup_git_directory() in test-* programs
grep: turn off gitlink detection for --no-index
mailmap: do not resolve blobs in a non-repository
remote: don't resolve HEAD in non-repository
setup: set startup_info->have_repository more reliably
setup: make startup_info available everywhere

Merge branch 'es/test-gpg-tags'Junio C Hamano Sun, 3 Apr 2016 17:29:35 +0000 (10:29 -0700)

Merge branch 'es/test-gpg-tags'

A test for tags has been restructured so that more parts of it can
easily be run on a platform without a working GnuPG.

* es/test-gpg-tags:
t6302: skip only signed tags rather than all tests when GPG is missing
t6302: also test annotated in addition to signed tags
t6302: normalize names and descriptions of signed tags
lib-gpg: drop unnecessary "missing GPG" warning

Merge branch 'jk/getwholeline-getdelim-empty'Junio C Hamano Sun, 3 Apr 2016 17:29:34 +0000 (10:29 -0700)

Merge branch 'jk/getwholeline-getdelim-empty'

strbuf_getwholeline() did not NUL-terminate the buffer on certain
corner cases in its error codepath.

* jk/getwholeline-getdelim-empty:
strbuf_getwholeline: NUL-terminate getdelim buffer on error

Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath'Junio C Hamano Sun, 3 Apr 2016 17:29:33 +0000 (10:29 -0700)

Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath'

A small memory leak in an error codepath has been plugged in xdiff
code.

* rj/xdiff-prepare-plug-leak-on-error-codepath:
xdiff/xprepare: fix a memory leak
xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits

Merge branch 'jc/index-pack'Junio C Hamano Sun, 3 Apr 2016 17:29:31 +0000 (10:29 -0700)

Merge branch 'jc/index-pack'

Code clean-up.

* jc/index-pack:
index-pack: add a helper function to derive .idx/.keep filename

Merge branch 'gf/fetch-pack-direct-object-fetch'Junio C Hamano Sun, 3 Apr 2016 17:29:29 +0000 (10:29 -0700)

Merge branch 'gf/fetch-pack-direct-object-fetch'

Fetching of history by naming a commit object name directly didn't
work across remote-curl transport.

* gf/fetch-pack-direct-object-fetch:
fetch-pack: update the documentation for "<refs>..." arguments
fetch-pack: fix object_id of exact sha1

Merge branch 'jc/maint-index-pack-keep'Junio C Hamano Sun, 3 Apr 2016 17:29:29 +0000 (10:29 -0700)

Merge branch 'jc/maint-index-pack-keep'

"git index-pack --keep[=<msg>] pack-$name.pack" simply did not work.

* jc/maint-index-pack-keep:
index-pack: correct --keep[=<msg>]

Merge branch 'mm/lockfile-error-message'Junio C Hamano Sun, 3 Apr 2016 17:29:27 +0000 (10:29 -0700)

Merge branch 'mm/lockfile-error-message'

* mm/lockfile-error-message:
lockfile: improve error message when lockfile exists
lockfile: mark strings for translation

Merge branch 'jk/rev-parse-local-env-vars'Junio C Hamano Sun, 3 Apr 2016 17:29:26 +0000 (10:29 -0700)

Merge branch 'jk/rev-parse-local-env-vars'

The "--local-env-vars" and "--resolve-git-dir" options of "git
rev-parse" failed to work outside a repository when the command's
option parsing was rewritten in 1.8.5 era.

* jk/rev-parse-local-env-vars:
rev-parse: let some options run outside repository
t1515: add tests for rev-parse out-of-repo helpers

Merge branch 'jk/config-get-urlmatch'Junio C Hamano Sun, 3 Apr 2016 17:29:26 +0000 (10:29 -0700)

Merge branch 'jk/config-get-urlmatch'

"git config --get-urlmatch", unlike other variants of the "git
config --get" family, did not signal error with its exit status
when there was no matching configuration.

* jk/config-get-urlmatch:
Documentation/git-config: fix --get-all description
Documentation/git-config: use bulleted list for exit codes
config: fail if --get-urlmatch finds no value

Merge branch 'jk/add-i-highlight'Junio C Hamano Sun, 3 Apr 2016 17:29:25 +0000 (10:29 -0700)

Merge branch 'jk/add-i-highlight'

* jk/add-i-highlight:
add--interactive: allow custom diff highlighting programs

Merge branch 'jk/credential-clear-config'Junio C Hamano Sun, 3 Apr 2016 17:29:24 +0000 (10:29 -0700)

Merge branch 'jk/credential-clear-config'

The credential.helper configuration variable is cumulative and
there is no good way to override it from the command line. As
a special case, giving an empty string as its value now serves
as the signal to clear the values specified in various files.

* jk/credential-clear-config:
credential: let empty credential specs reset helper list

Merge branch 'mp/upload-pack-use-embedded-args'Junio C Hamano Sun, 3 Apr 2016 17:29:23 +0000 (10:29 -0700)

Merge branch 'mp/upload-pack-use-embedded-args'

The embedded args argv-array in the child process is used to build
the command line to run pack-objects instead of using a separate
array of strings.

* mp/upload-pack-use-embedded-args:
upload-pack: use argv_array for pack_objects

Merge branch 'mm/diff-renames-default'Junio C Hamano Sun, 3 Apr 2016 17:29:22 +0000 (10:29 -0700)

Merge branch 'mm/diff-renames-default'

The end-user facing Porcelain level commands like "diff" and "log"
now enables the rename detection by default.

* mm/diff-renames-default:
diff: activate diff.renames by default
log: introduce init_log_defaults()
t: add tests for diff.renames (true/false/unset)
t4001-diff-rename: wrap file creations in a test
Documentation/diff-config: fix description of diff.renames

Merge branch 'mm/readme-markdown'Junio C Hamano Sun, 3 Apr 2016 17:27:22 +0000 (10:27 -0700)

Merge branch 'mm/readme-markdown'

Fix a few broken links in README.md and also teach rpmbuild
that there is no README.

* mm/readme-markdown:
README.md: don't take 'commandname' literally
git.spec.in: use README.md, not README

Git 2.8.1 v2.8.1Junio C Hamano Sun, 3 Apr 2016 17:11:35 +0000 (10:11 -0700)

Git 2.8.1

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

Merge branch 'mm/readme-markdown' into maintJunio C Hamano Sun, 3 Apr 2016 17:13:09 +0000 (10:13 -0700)

Merge branch 'mm/readme-markdown' into maint

* 'mm/readme-markdown':
git.spec.in: use README.md, not README

README.md: don't take 'commandname' literallyMatthieu Moy Sat, 27 Feb 2016 10:46:12 +0000 (11:46 +0100)

README.md: don't take 'commandname' literally

The link to Documentation/git-commandname.txt was obviously broken.
Remove the link and make it clear that it is not a literal path name by
using *italics* in makdown.

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

git.spec.in: use README.md, not READMEMatthieu Moy Fri, 1 Apr 2016 07:10:51 +0000 (09:10 +0200)

git.spec.in: use README.md, not README

The file was renamed in 4ad21f5 (README: use markdown syntax,
2016-02-25), but that commit forgot to update git.spec.in, which
caused the rpmbuild target in the Makefile to fail.

Reported-by: Ron Isaacson <isaacson.ljits@gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

credential-cache, send_request: close fd when doneStefan Beller Fri, 1 Apr 2016 00:35:46 +0000 (17:35 -0700)

credential-cache, send_request: close fd when done

No need to keep it open any further.

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

bundle: don't leak an fd in case of early returnStefan Beller Fri, 1 Apr 2016 00:35:45 +0000 (17:35 -0700)

bundle: don't leak an fd in case of early return

In successful operation `write_pack_data` will close the `bundle_fd`,
but when we exit early, we need to take care of the file descriptor
as well as the lock file ourselves. The lock file may be deleted at the
end of running the program, but we are in library code, so we should
not rely on that.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

abbrev_sha1_in_line: don't leak memoryStefan Beller Fri, 1 Apr 2016 00:35:44 +0000 (17:35 -0700)

abbrev_sha1_in_line: don't leak memory

`split` is of type `struct strbuf **`, and currently we are leaking split
itself as well as each element in split[i]. We have a dedicated free
function for `struct strbuf **`, which takes care of freeing all
related memory.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes: don't leak memory in git_config_get_notes_strategyStefan Beller Fri, 1 Apr 2016 00:35:43 +0000 (17:35 -0700)

notes: don't leak memory in git_config_get_notes_strategy

This function asks for the value of a configuration and after
using the value does not have to retain ownership of it.
git_config_get_string_const() however is a function to get a
copy of the value, but we forget to free it before we return.

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

builtin/apply: free patch when parse_chunk() failsChristian Couder Wed, 16 Mar 2016 19:35:11 +0000 (20:35 +0100)

builtin/apply: free patch when parse_chunk() fails

When parse_chunk() fails it can return -1, for example
when find_header() doesn't find a patch header.

In this case it's better in apply_patch() to free the
"struct patch" that we just allocated instead of
leaking it.

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

builtin/apply: handle parse_binary() failureChristian Couder Fri, 18 Mar 2016 12:30:41 +0000 (13:30 +0100)

builtin/apply: handle parse_binary() failure

In parse_binary() there is:

forward = parse_binary_hunk(&buffer, &size, &status, &used);
if (!forward && !status)
/* there has to be one hunk (forward hunk) */
return error(_("unrecognized binary patch at line %d"), linenr-1);

so parse_binary() can return -1, because that's what error() returns.

Also parse_binary_hunk() sets "status" to -1 in case of error and
parse_binary() does "if (status) return status;".

In this case parse_chunk() should not add -1 to the patchsize it computes.
It is better for future libification efforts to make it just return -1.

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

git-send-pack: fix --all option when used with directoryStanislav Kolotinskiy Thu, 31 Mar 2016 13:55:09 +0000 (16:55 +0300)

git-send-pack: fix --all option when used with directory

When using git send-pack with --all option
and a target repository specification ([<host>:]<directory>),
usage message is being displayed instead of performing
the actual transmission.

The reason for this issue is that destination and refspecs are being set
in the same conditional and are populated from argv. When a target
repository is passed, refspecs is being populated as well with its value.
This makes the check for refspecs not being NULL to always return true,
which, in conjunction with the check for --all or --mirror options,
is always true as well and returns usage message instead of proceeding.

This ensures that send-pack will stop execution only when --all
or --mirror switch is used in conjunction with any refspecs passed.

Signed-off-by: Stanislav Kolotinskiy <stanislav@assembla.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

for-each-ref: fix description of '--contains' in manpageSZEDER Gábor Wed, 30 Mar 2016 13:48:30 +0000 (15:48 +0200)

for-each-ref: fix description of '--contains' in manpage

'git for-each-ref's manpage says that '--contains' only lists tags,
but it lists all kinds of refs.

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

diffcore: fix iteration order of identical files during... SZEDER Gábor Wed, 30 Mar 2016 08:35:07 +0000 (10:35 +0200)

diffcore: fix iteration order of identical files during rename detection

If the two paths 'dir/A/file' and 'dir/B/file' have identical content
and the parent directory is renamed, e.g. 'git mv dir other-dir', then
diffcore reports the following exact renames:

renamed: dir/B/file -> other-dir/A/file
renamed: dir/A/file -> other-dir/B/file

While technically not wrong, this is confusing not only for the user,
but also for git commands that make decisions based on rename
information, e.g. 'git log --follow other-dir/A/file' follows
'dir/B/file' past the rename.

This behavior is a side effect of commit v2.0.0-rc4~8^2~14
(diffcore-rename.c: simplify finding exact renames, 2013-11-14): the
hashmap storing sources returns entries from the same bucket, i.e.
sources matching the current destination, in LIFO order. Thus the
iteration first examines 'other-dir/A/file' and 'dir/B/file' and, upon
finding identical content and basename, reports an exact rename.

Other hashmap users are apparently happy with the current iteration
order over the entries of a bucket. Changing the iteration order
would risk upsetting other hashmap users and would increase the memory
footprint of each bucket by a pointer to the tail element.

Fill the hashmap with source entries in reverse order to restore the
original exact rename detection behavior.

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

pretty: allow tweaking tabwidth in --expand-tabsJunio C Hamano Tue, 29 Mar 2016 23:05:39 +0000 (16:05 -0700)

pretty: allow tweaking tabwidth in --expand-tabs

When the local convention of the project is to use tab width that is
not 8, it may make sense to allow "git log --expand-tabs=<n>" to
tweak the output to match it.

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

pretty: enable --expand-tabs by default for selected... Junio C Hamano Tue, 29 Mar 2016 22:49:24 +0000 (15:49 -0700)

pretty: enable --expand-tabs by default for selected pretty formats

"git log --pretty={medium,full,fuller}" and "git log" by default
prepend 4 spaces to the log message, so it makes sense to enable
the new "expand-tabs" facility by default for these formats.
Add --no-expand-tabs option to override the new default.

The change alone breaks a test in t4201 that runs "git shortlog"
on the output from "git log", and expects that the output from
"git log" does not do such a tab expansion. Adjust the test to
explicitly disable expand-tabs with --no-expand-tabs.

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

pretty: expand tabs in indented logs to make things... Linus Torvalds Wed, 16 Mar 2016 16:15:53 +0000 (09:15 -0700)

pretty: expand tabs in indented logs to make things line up properly

A commit log message sometimes tries to line things up using tabs,
assuming fixed-width font with the standard 8-place tab settings.
Viewing such a commit however does not work well in "git log", as
we indent the lines by prefixing 4 spaces in front of them.

This should all line up:

Column 1 Column 2
-------- --------
A B
ABCD EFGH
SPACES Instead of Tabs

Even with multi-byte UTF8 characters:

Column 1 Column 2
-------- --------
Ä B
åäö 100
A Møøse once bit my sister..

Tab-expand the lines in "git log --expand-tabs" output before
prefixing 4 spaces.

This is based on the patch by Linus Torvalds, but at this step, we
require an explicit command line option to enable the behaviour.

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

MSVC: use shipped headers instead of fallback definitionsSven Strickroth Wed, 30 Mar 2016 11:37:36 +0000 (13:37 +0200)

MSVC: use shipped headers instead of fallback definitions

VS2010 comes with stdint.h [1]
VS2013 comes with inttypes.h [2]

[1] https://stackoverflow.com/a/2628014/3906760
[2] https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/

Signed-off-by: Sven Strickroth <sven@cs-ware.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

MSVC: vsnprintf in Visual Studio 2015 doesn't need... Sven Strickroth Tue, 29 Mar 2016 16:25:28 +0000 (18:25 +0200)

MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

In MSVC2015 the behavior of vsnprintf was changed.
W/o this fix there is one character missing at the end.

Signed-off-by: Sven Strickroth <sven@cs-ware.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: git diff --check detects conflict markersOri Avtalion Tue, 29 Mar 2016 18:59:45 +0000 (21:59 +0300)

Documentation: git diff --check detects conflict markers

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch -d: refuse deleting a branch which is currently... Kazuki Yamaguchi Tue, 29 Mar 2016 09:38:39 +0000 (18:38 +0900)

branch -d: refuse deleting a branch which is currently checked out

When a branch is checked out by current working tree, deleting the
branch is forbidden. However when the branch is checked out only by
other working trees, deleting incorrectly succeeds.
Use find_shared_symref() to check if the branch is in use, not just
comparing with the current working tree's HEAD.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

worktree: add: introduce --checkout optionRay Zhang Tue, 29 Mar 2016 10:11:01 +0000 (10:11 +0000)

worktree: add: introduce --checkout option

By adding this option which defaults to true, we can use the
corresponding --no-checkout to make some customizations before
the checkout, like sparse checkout, etc.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Ray Zhang <zhanglei002@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.8 v2.8.0Junio C Hamano Mon, 28 Mar 2016 19:19:45 +0000 (12:19 -0700)

Git 2.8

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

rebase-i: print an abbreviated hash when stop for editingRalf Thielow Mon, 28 Mar 2016 16:00:00 +0000 (18:00 +0200)

rebase-i: print an abbreviated hash when stop for editing

The message that is shown when rebase-i stops for editing prints
the full hash of the commit where it stopped which makes the message
overflow to the next line on smaller terminal windows. Print an
abbreviated hash instead.

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

api-parse-options.txt: document OPT_CMDMODE()Pranit Bauva Fri, 25 Mar 2016 18:58:58 +0000 (18:58 +0000)

api-parse-options.txt: document OPT_CMDMODE()

OPT_CMDMODE mechanism was introduced in the release of 1.8.5 to actively
notice when multiple "operation mode" options that specify mutually
incompatible operation modes are given.

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

completion: add 'revisions' and 'everyday' to 'git... Ralf Thielow Thu, 24 Mar 2016 18:27:14 +0000 (19:27 +0100)

completion: add 'revisions' and 'everyday' to 'git help'

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

completion: add option '--guides' to 'git help'Ralf Thielow Thu, 24 Mar 2016 18:27:13 +0000 (19:27 +0100)

completion: add option '--guides' to 'git help'

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

Merge branch 'ls/p4-doc-markup'Junio C Hamano Thu, 24 Mar 2016 19:28:06 +0000 (12:28 -0700)

Merge branch 'ls/p4-doc-markup'

* ls/p4-doc-markup:
Documentation: fix git-p4 AsciiDoc formatting
Documentation: use ASCII quotation marks in git-p4

Merge branch 'js/mingw-tests-2.8'Junio C Hamano Thu, 24 Mar 2016 19:27:58 +0000 (12:27 -0700)

Merge branch 'js/mingw-tests-2.8'

* js/mingw-tests-2.8:
mingw: skip some tests in t9115 due to file name issues
t1300: fix the new --show-origin tests on Windows
t1300-repo-config: make it resilient to being run via 'sh -x'
config --show-origin: report paths with forward slashes

Merge branch 'sb/submodule-module-list-pathspec-fix'Junio C Hamano Thu, 24 Mar 2016 19:27:12 +0000 (12:27 -0700)

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

A fix for a small regression in "module_list" helper that was
rewritten in C (also applies to 2.7.x).

* sb/submodule-module-list-pathspec-fix:
submodule: fix regression for deinit without submodules

apply: report patch skipping in verbose modeNguyễn Thái Ngọc Duy Thu, 24 Mar 2016 11:56:19 +0000 (18:56 +0700)

apply: report patch skipping in verbose mode

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

git-apply.txt: mention the behavior inside a subdirNguyễn Thái Ngọc Duy Thu, 24 Mar 2016 11:56:17 +0000 (18:56 +0700)

git-apply.txt: mention the behavior inside a subdir

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

git-apply.txt: remove a spaceNguyễn Thái Ngọc Duy Thu, 24 Mar 2016 11:56:16 +0000 (18:56 +0700)

git-apply.txt: remove a space

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

submodule-config: use hashmap_iter_first()Alexander Kuleshov Wed, 16 Mar 2016 07:46:31 +0000 (13:46 +0600)

submodule-config: use hashmap_iter_first()

The hashmap API provides hashmap_iter_first() helper for initialion
and getting the first entry of a hashmap. Let's use it instead of
doing initialization manually and then get the first entry.

There are no functional changes, just cleanup.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of git://github.com/git-l10n... Junio C Hamano Wed, 23 Mar 2016 19:22:42 +0000 (12:22 -0700)

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

* 'master' of git://github.com/git-l10n/git-po:
l10n: pt_PT: Update and add new translations
l10n: ca.po: update translation
l10n: vi.po (2530t): Update translation

merge: refuse to create too cool a merge by defaultJunio C Hamano Fri, 18 Mar 2016 20:21:09 +0000 (13:21 -0700)

merge: refuse to create too cool a merge by default

While it makes sense to allow merging unrelated histories of two
projects that started independently into one, in the way "gitk" was
merged to "git" itself aka "the coolest merge ever", such a merge is
still an unusual event. Worse, if somebody creates an independent
history by starting from a tarball of an established project and
sends a pull request to the original project, "git merge" however
happily creates such a merge without any sign of something unusual
is happening.

Teach "git merge" to refuse to create such a merge by default,
unless the user passes a new "--allow-unrelated-histories" option to
tell it that the user is aware that two unrelated projects are
merged.

Because such a "two project merge" is a rare event, a configuration
option to always allow such a merge is not added.

We could add the same option to "git pull" and have it passed
through to underlying "git merge". I do not have a fundamental
opposition against such a feature, but this commit does not do so
and instead leaves it as low-hanging fruit for others, because such
a "two project merge" would be done after fetching the other project
into some location in the working tree of an existing project and
making sure how well they fit together, it is sufficient to allow a
local merge without such an option pass-through from "git pull" to
"git merge". Many tests that are updated by this patch does the
pass-through manually by turning:

git pull something

into its equivalent:

git fetch something &&
git merge --allow-unrelated-histories FETCH_HEAD

If somebody is inclined to add such an option, updated tests in this
change need to be adjusted back to:

git pull --allow-unrelated-histories something

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

merge: fix NULL pointer dereference when merging nothin... Junio C Hamano Mon, 21 Mar 2016 19:01:43 +0000 (12:01 -0700)

merge: fix NULL pointer dereference when merging nothing into void

When we are on an unborn branch and merging only one foreign parent,
we allow "git merge" to fast-forward to that foreign parent commit.

This codepath incorrectly attempted to dereference the list of
parents that the merge is going to record even when the list is
empty. It must refuse to operate instead when there is no parent.

All other codepaths make sure the list is not empty before they
dereference it, and are safe.

Reported-by: Jose Ivan B. Vilarouca Filho
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: fix git-p4 AsciiDoc formattingLars Schneider Wed, 23 Mar 2016 10:59:01 +0000 (11:59 +0100)

Documentation: fix git-p4 AsciiDoc formatting

Noticed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git_config_push_parameter: handle empty GIT_CONFIG_PARA... Jeff King Tue, 22 Mar 2016 19:50:51 +0000 (15:50 -0400)

git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS

The "git -c var=value" option stuffs the config value into
$GIT_CONFIG_PARAMETERS, so that sub-processes can see it.
When the config is later read via git_config() or similar,
we parse it back out of that variable. The parsing end is a
little bit picky; it assumes that each entry was generated
with sq_quote_buf(), and that there is no extraneous
whitespace.

On the generating end, we are careful to append to an
existing $GIT_CONFIG_PARAMETERS variable if it exists.
However, our test for "should we add a space separator" is
too liberal: it will add one even if the environment
variable exists but is empty. As a result, you might end up
with:

GIT_CONFIG_PARAMETERS=" 'core.foo=bar'"

which the parser will choke on.

This was hard to trigger in older versions of git, since we
only set the variable when we had something to put into it
(though you could certainly trigger it manually). But since
14111fc (git: submodule honor -c credential.* from command
line, 2016-02-29), the submodule code will unconditionally
put the $GIT_CONFIG_PARAMETERS variable into the environment
of any operation in the submodule, whether it is empty or
not. So any of those operations which themselves use "git
-c" will generate the unparseable value and fail.

We can easily fix it by catching this case on the generating
side. While we're adding a test, let's also check that
multiple layers of "git -c" work, which was previously not
tested at all.

Reported-by: Shin Fan <shinfan@google.com>
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Tested-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mingw: skip some tests in t9115 due to file name issuesJohannes Schindelin Wed, 23 Mar 2016 10:55:20 +0000 (11:55 +0100)

mingw: skip some tests in t9115 due to file name issues

These two tests wanted to write file names which are incompatible with
Windows' file naming rules (even if they pass using Cygwin due to
Cygwin's magic path mangling).

While at it, skip the same tests also on MacOSX/HFS, as pointed out by
Torsten Bögershausen.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1300: fix the new --show-origin tests on WindowsJohannes Schindelin Wed, 23 Mar 2016 10:55:13 +0000 (11:55 +0100)

t1300: fix the new --show-origin tests on Windows

On Windows, we have that funny situation where the test script can refer
to POSIX paths because it runs in a shell that uses a POSIX emulation
layer ("MSYS2 runtime"). Yet, git.exe does *not* understand POSIX paths
at all but only pure Windows paths.

So let's just convert the POSIX paths to Windows paths before passing
them on to Git, using `pwd` (which is already modified on Windows to
output Windows paths).

While fixing the new tests on Windows, we also have to exclude the tests
that want to write a file with a name that is illegal on Windows
(unfortunately, there is more than one test trying to make use of that
file).

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

t1300-repo-config: make it resilient to being run via... Johannes Schindelin Wed, 23 Mar 2016 10:55:07 +0000 (11:55 +0100)

t1300-repo-config: make it resilient to being run via 'sh -x'

One way to diagnose broken regression tests is to run the test
script using 'sh -x t... -i -v' to find out which call actually
demonstrates the symptom.

Hence it is pretty counterproductive if the test script behaves
differently when being run via 'sh -x', in particular when using
test_cmp or test_i18ncmp on redirected stderr. A more recent way
"sh tXXXX -i -v -x" has the same issue.

So let's use test_i18ngrep (as suggested by Jonathan Nieder) instead of
test_cmp/test_i18ncmp to verify that stderr looks as expected.

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

config --show-origin: report paths with forward slashesJohannes Schindelin Wed, 23 Mar 2016 10:55:00 +0000 (11:55 +0100)

config --show-origin: report paths with forward slashes

On Windows, the backslash is the native directory separator, but all
supported Windows versions also accept the forward slash in most
circumstances.

Our tests expect forward slashes.

Relative paths are generated by Git using forward slashes.

So let's try to be consistent and use forward slashes in the $HOME part
of the paths reported by `git config --show-origin`, too.

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

Merge branch 'master' of https://github.com/vnwildman/gitJiang Xin Wed, 23 Mar 2016 15:01:51 +0000 (23:01 +0800)

Merge branch 'master' of https://github.com/vnwildman/git

* 'master' of https://github.com/vnwildman/git:
l10n: vi.po (2530t): Update translation

Merge branch 'master' of git://github.com/alexhenrie... Jiang Xin Wed, 23 Mar 2016 14:48:14 +0000 (22:48 +0800)

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

* 'master' of git://github.com/alexhenrie/git-po:
l10n: ca.po: update translation

submodule: fix regression for deinit without submodulesStefan Beller Tue, 22 Mar 2016 23:42:14 +0000 (16:42 -0700)

submodule: fix regression for deinit without submodules

Per Cederqvist wrote:
> It used to be possible to run
>
> git submodule deinit -f .
>
> to remove any submodules, no matter how many submodules you had. That
> is no longer possible in projects that don't have any submodules at
> all. The command will fail with:
>
> error: pathspec '.' did not match any file(s) known to git.

This regression was introduced in 74703a1e4dfc (submodule: rewrite
`module_list` shell function in C, 2015-09-02), as we changed the
order of checking in new module listing to first check whether it is
a gitlin before feeding it to match_pathspec(). It used to be that
a pathspec that does not match any path were diagnosed as an error,
but the new code complains for a pathspec that does not match any
submodule path.

Arguably the new behaviour may give us a better diagnosis, but that
is inconsistent with the suggestion "deinit" gives, and also this
was an unintended accident. The new behaviour hopefully can be
redesigned and implemented better in future releases, but for now,
switch these two checks to restore the same behavior as before. In
an empty repository, giving the pathspec '.' will still get the same
"did not match" error, but that is the same bug we had before 1.7.0.

Reported-by: Per Cederqvist <cederp@opera.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tag: add the option to force signing of annotated tagsLaurent Arnoud Tue, 22 Mar 2016 20:41:26 +0000 (21:41 +0100)

tag: add the option to force signing of annotated tags

The `tag.forcesignannotated` configuration variable makes "git tag"
that would implicitly create an annotated tag to instead create a
signed tag. For example

$ git tag -m "This is a message" tag-with-message
$ git tag -F message-file tag-with-message

would create a signed tag if the configuration variable is in
effect. To override this from the command line, the user can
explicitly ask for an annotated tag, like so:

$ git tag -a -m "This is a message" tag-with-message
$ git tag -a -F message-file tag-with-message

Creation of a light-weight tag, i.e.

$ git tag lightweight

is not affected.

Signed-off-by: Laurent Arnoud <laurent@spkdev.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: remove unused call to free() in gitdiff_{old... Junio C Hamano Tue, 22 Mar 2016 21:41:08 +0000 (14:41 -0700)

apply: remove unused call to free() in gitdiff_{old,new}name()

These two functions keep a copy of filename it was given, let
gitdiff_verify_name() to rewrite it to a new filename and then free
the original if they receive a newly minted filename.

However

(1) when the original name is NULL, gitdiff_verify_name() returns
either NULL or a newly minted value. Either case, we do not
have to worry about calling free() on the original NULL.

(2) when the original name is not NULL, gitdiff_verify_name()
either returns that as-is, or calls die() when it finds
inconsistency in the patch. When the function returns, we know
that "if ()" statement always is false.

Noticed by Christian Couder.

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

builtin/apply: get rid of useless 'name' variableChristian Couder Tue, 22 Mar 2016 20:58:40 +0000 (21:58 +0100)

builtin/apply: get rid of useless 'name' variable

While at it put an 'else' on the same line as the previous '}'.

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

l10n: pt_PT: Update and add new translationsVasco Almeida Fri, 29 Jan 2016 20:06:29 +0000 (19:06 -0100)

l10n: pt_PT: Update and add new translations

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>

l10n: ca.po: update translationAlex Henrie Tue, 22 Mar 2016 05:04:22 +0000 (23:04 -0600)

l10n: ca.po: update translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>

commit: do not lose SQUASH_MSG contentsSven Strickroth Mon, 21 Mar 2016 22:29:40 +0000 (23:29 +0100)

commit: do not lose SQUASH_MSG contents

When concluding a conflicted "git merge --squash", the command
failed to read SQUASH_MSG that was prepared by "git merge", and
showed only the "# Conflicts:" list of conflicted paths.

Place the contents from SQUASH_MSG at the beginning, just like we
show the commit log skeleton first when concluding a normal merge,
and then show the "# Conflicts:" list, to help the user write the
log message for the resulting commit.

Test by Junio C Hamano <gitster@pobox.com>.

Signed-off-by: Sven Strickroth <sven@cs-ware.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.8-rc4 v2.8.0-rc4Junio C Hamano Mon, 21 Mar 2016 20:41:37 +0000 (13:41 -0700)

Git 2.8-rc4

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

Sync with maintJunio C Hamano Mon, 21 Mar 2016 20:32:42 +0000 (13:32 -0700)

Sync with maint

* maint:
Documentation: fix broken linkgit to git-config
git-compat-util: st_add4: work around gcc 4.2.x compiler crash

Merge branch 'mm/doc-hooks-linkgit-fix' into maintJunio C Hamano Mon, 21 Mar 2016 20:32:18 +0000 (13:32 -0700)

Merge branch 'mm/doc-hooks-linkgit-fix' into maint

* mm/doc-hooks-linkgit-fix:
Documentation: fix broken linkgit to git-config

Documentation: fix broken linkgit to git-configMatthieu Moy Mon, 21 Mar 2016 18:38:34 +0000 (19:38 +0100)

Documentation: fix broken linkgit to git-config

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

pull --rebase: add --[no-]autostash flagMehul Jain Mon, 21 Mar 2016 18:18:03 +0000 (23:48 +0530)

pull --rebase: add --[no-]autostash flag

If rebase.autoStash configuration variable is set, there is no way to
override it for "git pull --rebase" from the command line.

Teach "git pull --rebase" the --[no-]autostash command line flag which
overrides the current value of rebase.autoStash, if set. As "git rebase"
understands the --[no-]autostash option, it's just a matter of passing
the option to underlying "git rebase" when "git pull --rebase" is called.

Helped-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Paul Tan <pyokagan@gmail.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-pull.c: introduce git_pull_config()Mehul Jain Mon, 21 Mar 2016 18:18:02 +0000 (23:48 +0530)

git-pull.c: introduce git_pull_config()

git-pull makes a seperate call to git_config_get_bool() to read the value
of "rebase.autostash". This can be reduced as a call to git_config() is
already there in the code.

Introduce a callback function git_pull_config() to read "rebase.autostash"
along with other variables.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Paul Tan <pyokagan@gmail.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: use ASCII quotation marks in git-p4Lars Schneider Sun, 20 Mar 2016 18:39:21 +0000 (19:39 +0100)

Documentation: use ASCII quotation marks in git-p4

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

Merge branch 'tb/avoid-gcc-on-darwin-10-6'Junio C Hamano Mon, 21 Mar 2016 16:20:13 +0000 (09:20 -0700)

Merge branch 'tb/avoid-gcc-on-darwin-10-6'

* tb/avoid-gcc-on-darwin-10-6:
Revert "config.mak.uname: use clang for Mac OS X 10.6"

Revert "config.mak.uname: use clang for Mac OS X 10.6"Eric Sunshine Mon, 21 Mar 2016 04:35:58 +0000 (00:35 -0400)

Revert "config.mak.uname: use clang for Mac OS X 10.6"

This reverts commit 7b6daf8d2fee1a9866b1d4eddbfaa5dbc42c5dbb.

Now that st_add4() has been patched to work around the gcc 4.2.x
compiler crash, revert the sledge-hammer approach of forcing Mac OS X
10.6 to unconditionally use 'clang' rather than the default compiler
(gcc).

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

Merge branch 'es/st-add4-gcc-4.2-workaround' into maintJunio C Hamano Mon, 21 Mar 2016 16:19:27 +0000 (09:19 -0700)

Merge branch 'es/st-add4-gcc-4.2-workaround' into maint

* es/st-add4-gcc-4.2-workaround:
git-compat-util: st_add4: work around gcc 4.2.x compiler crash

git-compat-util: st_add4: work around gcc 4.2.x compile... Eric Sunshine Mon, 21 Mar 2016 04:35:57 +0000 (00:35 -0400)

git-compat-util: st_add4: work around gcc 4.2.x compiler crash

Although changes by 5b442c4 (tree-diff: catch integer overflow in
combine_diff_path allocation, 2016-02-19) are perfectly valid, they
unfortunately trigger an internal compiler error in gcc 4.2.x:

combine-diff.c: In function 'diff_tree_combined':
combine-diff.c:1391: internal compiler error: Segmentation fault: 11

Experimentation reveals that changing st_add4()'s argument evaluation
order is sufficient to sidestep this problem.

Although st_add3() does not trigger the compiler bug, for style
consistency, change its argument evaluation order to match.

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

Merge tag 'l10n-2.8.0-rnd3' of git://github.com/git... Junio C Hamano Mon, 21 Mar 2016 01:06:05 +0000 (18:06 -0700)

Merge tag 'l10n-2.8.0-rnd3' of git://github.com/git-l10n/git-po

l10n-2.8.0-rnd3

* tag 'l10n-2.8.0-rnd3' of git://github.com/git-l10n/git-po:
l10n: zh_CN: review for git v2.8.0 l10n round 2
l10n: de.po: add missing newlines
l10n: de.po: translate 22 new messages
l10n: ko.po: Update Korean translation
l10n: fr.po v2.8.0 round 3
l10n: sv.po: Update Swedish translation (2530t0f0u)
l10n: ru.po: update Russian translation

Merge branch 'master' of git://ozlabs.org/~paulus/gitkJunio C Hamano Mon, 21 Mar 2016 01:05:10 +0000 (18:05 -0700)

Merge branch 'master' of git://ozlabs.org/~paulus/gitk

* 'master' of git://ozlabs.org/~paulus/gitk:
gitk: Follow themed bgcolor in help dialogs
gitk: fr.po: Sync translations with git
gitk: Update French translation (311t)
gitk: Update German translation
gitk: Update Bulgarian translation (311t)

l10n: vi.po (2530t): Update translationTran Ngoc Quan Mon, 21 Mar 2016 00:21:04 +0000 (07:21 +0700)

l10n: vi.po (2530t): Update translation

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>

l10n: zh_CN: review for git v2.8.0 l10n round 2Ray Chen Wed, 16 Mar 2016 03:44:44 +0000 (11:44 +0800)

l10n: zh_CN: review for git v2.8.0 l10n round 2

Signed-off-by: Ray Chen <oldsharp@gmail.com>