git
7 years agoMerge branch 'jn/credential-doc-on-clear'
Junio C Hamano [Tue, 16 May 2017 02:51:57 +0000 (11:51 +0900)] 
Merge branch 'jn/credential-doc-on-clear'

Doc update.

* jn/credential-doc-on-clear:
  credential doc: make multiple-helper behavior more prominent

7 years agoMerge branch 'jn/clone-add-empty-config-from-command-line'
Junio C Hamano [Tue, 16 May 2017 02:51:56 +0000 (11:51 +0900)] 
Merge branch 'jn/clone-add-empty-config-from-command-line'

"git clone --config var=val" is a way to populate the
per-repository configuration file of the new repository, but it did
not work well when val is an empty string.  This has been fixed.

* jn/clone-add-empty-config-from-command-line:
  clone: handle empty config values in -c

7 years agoMerge branch 'bw/submodule-has-commits-update'
Junio C Hamano [Tue, 16 May 2017 02:51:56 +0000 (11:51 +0900)] 
Merge branch 'bw/submodule-has-commits-update'

Code clean-up and duplicate removal.

* bw/submodule-has-commits-update:
  submodule: refactor logic to determine changed submodules
  submodule: improve submodule_has_commits()
  submodule: change string_list changed_submodule_paths
  submodule: remove add_oid_to_argv()
  submodule: rename free_submodules_sha1s()
  submodule: rename add_sha1_to_array()

7 years agoMerge branch 'ls/travis-doc-asciidoctor'
Junio C Hamano [Tue, 16 May 2017 02:51:55 +0000 (11:51 +0900)] 
Merge branch 'ls/travis-doc-asciidoctor'

Travis CI gained a task to format the documentation with both
AsciiDoc and AsciiDoctor.

* ls/travis-doc-asciidoctor:
  travis-ci: check AsciiDoc/AsciiDoctor stderr output
  travis-ci: unset compiler for jobs that do not need one
  travis-ci: parallelize documentation build
  travis-ci: build documentation with AsciiDoc and Asciidoctor

7 years agoMerge branch 'rs/large-zip'
Junio C Hamano [Tue, 16 May 2017 02:51:54 +0000 (11:51 +0900)] 
Merge branch 'rs/large-zip'

"git archive --format=zip" learned to use zip64 extension when
necessary to go beyond the 4GB limit.

* rs/large-zip:
  t5004: require 64-bit support for big ZIP tests
  archive-zip: set version field for big files correctly
  archive-zip: support files bigger than 4GB
  archive-zip: support archives bigger than 4GB
  archive-zip: write ZIP dir entry directly to strbuf
  archive-zip: use strbuf for ZIP directory
  archive-zip: add tests for big ZIP archives

7 years agoMerge branch 'ab/clone-no-tags'
Junio C Hamano [Tue, 16 May 2017 02:51:54 +0000 (11:51 +0900)] 
Merge branch 'ab/clone-no-tags'

"git clone" learned the "--no-tags" option not to fetch all tags
initially, and also set up the tagopt not to follow any tags in
subsequent fetches.

* ab/clone-no-tags:
  tests: rename a test having to do with shallow submodules
  clone: add a --no-tags option to clone without tags
  tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"

7 years agoMerge branch 'sk/status-short-branch-color-config'
Junio C Hamano [Tue, 16 May 2017 02:51:53 +0000 (11:51 +0900)] 
Merge branch 'sk/status-short-branch-color-config'

The colors in which "git status --short --branch" showed the names
of the current branch and its remote-tracking branch are now
configurable.

* sk/status-short-branch-color-config:
  status: add color config slots for branch info in "--short --branch"
  status: fix missing newline when comment chars are disabled

7 years agoMerge branch 'jk/am-leakfix'
Junio C Hamano [Tue, 16 May 2017 02:51:53 +0000 (11:51 +0900)] 
Merge branch 'jk/am-leakfix'

The codepath in "git am" that is used when running "git rebase"
leaked memory held for the log message of the commits being rebased.

* jk/am-leakfix:
  am: shorten ident_split variable name in get_commit_info()
  am: simplify allocations in get_commit_info()
  am: fix commit buffer leak in get_commit_info()

7 years agoMerge branch 'jt/use-trailer-api-in-commands'
Junio C Hamano [Tue, 16 May 2017 02:51:52 +0000 (11:51 +0900)] 
Merge branch 'jt/use-trailer-api-in-commands'

"git cherry-pick" and other uses of the sequencer machinery
mishandled a trailer block whose last line is an incomplete line.
This has been fixed so that an additional sign-off etc. are added
after completing the existing incomplete line.

* jt/use-trailer-api-in-commands:
  sequencer: add newline before adding footers

7 years agoMerge branch 'nd/worktree-kill-parse-ref'
Junio C Hamano [Tue, 16 May 2017 02:51:51 +0000 (11:51 +0900)] 
Merge branch 'nd/worktree-kill-parse-ref'

"git gc" did not interact well with "git worktree"-managed
per-worktree refs.

* nd/worktree-kill-parse-ref:
  refs: kill set_worktree_head_symref()
  worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe()
  refs: introduce get_worktree_ref_store()
  refs: add REFS_STORE_ALL_CAPS
  refs.c: make submodule ref store hashmap generic
  environment.c: fix potential segfault by get_git_common_dir()

7 years agoMerge branch 'dt/gc-ignore-old-gc-logs'
Junio C Hamano [Tue, 16 May 2017 02:51:50 +0000 (11:51 +0900)] 
Merge branch 'dt/gc-ignore-old-gc-logs'

Attempt to allow us notice "fishy" situation where we fail to
remove the temporary directory used during the test.

* dt/gc-ignore-old-gc-logs:
  test-lib: retire $remove_trash variable
  test-lib.sh: do not barf under --debug at the end of the test
  test-lib: abort when can't remove trash directory

7 years agoMerge branch 'jk/no-null-sha1-in-cache-tree'
Junio C Hamano [Tue, 16 May 2017 02:51:50 +0000 (11:51 +0900)] 
Merge branch 'jk/no-null-sha1-in-cache-tree'

Code to update the cache-tree has been tightened so that we won't
accidentally write out any 0{40} entry in the tree object.

* jk/no-null-sha1-in-cache-tree:
  cache-tree: reject entries with null sha1

7 years agoMerge branch 'dt/raise-core-packed-git-limit'
Junio C Hamano [Tue, 16 May 2017 02:51:49 +0000 (11:51 +0900)] 
Merge branch 'dt/raise-core-packed-git-limit'

The default packed-git limit value has been raised on larger
platforms to save "git fetch" from a (recoverable) failure while
"gc" is running in parallel.

* dt/raise-core-packed-git-limit:
  Increase core.packedGitLimit

7 years agoGit 2.13 v2.13.0
Junio C Hamano [Tue, 9 May 2017 14:26:02 +0000 (23:26 +0900)] 
Git 2.13

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 9 May 2017 14:25:26 +0000 (23:25 +0900)] 
Merge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po

l10n for Git 2.13.0 round 2.1

* tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.13.0 l10n round 2
  l10n: sv.po: Update Swedish translation (3195t0f0u)
  l10n: zh_CN: review for git v2.13.0 l10n round 1
  l10n: Update Catalan translation
  l10n: bg.po: Updated Bulgarian translation (3195t)
  l10n: fr.po v2.13 rnd 2
  l10n: de.po: translate 4 new messages
  l10n: de.po: update German translation
  l10n: de.po: lower case after semi-colon
  l10n: vi.po(3195t): Update translation for v2.13.0 round 2
  l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)
  l10n: zh_CN: for git v2.13.0 l10n round 1
  l10n: fr.po v2.13 round 1
  l10n: pt_PT: update Portuguese translation
  l10n: bg.po: Updated Bulgarian translation (3201t)
  l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0
  l10n: sv.po: Update Swedish translation (3199t0f0u)
  l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)

7 years agoMerge branch 'master' of git://github.com/nafmo/git-l10n-sv
Jiang Xin [Tue, 9 May 2017 14:12:34 +0000 (22:12 +0800)] 
Merge branch 'master' of git://github.com/nafmo/git-l10n-sv

* 'master' of git://github.com/nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation (3195t0f0u)

7 years agol10n: zh_CN: for git v2.13.0 l10n round 2
Jiang Xin [Tue, 9 May 2017 13:55:38 +0000 (21:55 +0800)] 
l10n: zh_CN: for git v2.13.0 l10n round 2

Translate 4 messages (3195t0f0u) for git v2.13.0-rc2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agol10n: sv.po: Update Swedish translation (3195t0f0u)
Peter Krefting [Tue, 9 May 2017 07:05:09 +0000 (08:05 +0100)] 
l10n: sv.po: Update Swedish translation (3195t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
7 years agoSync with v2.12.3
Junio C Hamano [Tue, 9 May 2017 03:20:21 +0000 (20:20 -0700)] 
Sync with v2.12.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jh/verify-index-checksum-only-in-fsck'
Junio C Hamano [Tue, 9 May 2017 03:17:42 +0000 (12:17 +0900)] 
Merge branch 'jh/verify-index-checksum-only-in-fsck'

* jh/verify-index-checksum-only-in-fsck:
  t1450: avoid use of "sed" on the index, which is a binary file

7 years agol10n: zh_CN: review for git v2.13.0 l10n round 1
Ray Chen [Tue, 2 May 2017 15:42:43 +0000 (23:42 +0800)] 
l10n: zh_CN: review for git v2.13.0 l10n round 1

Signed-off-by: Ray Chen <oldsharp@gmail.com>
7 years agoMerge branch 'master' of https://github.com/vnwildman/git
Jiang Xin [Mon, 8 May 2017 22:39:31 +0000 (06:39 +0800)] 
Merge branch 'master' of https://github.com/vnwildman/git

* 'master' of https://github.com/vnwildman/git:
  l10n: vi.po(3195t): Update translation for v2.13.0 round 2

7 years agol10n: Update Catalan translation
Jordi Mas [Sun, 7 May 2017 08:12:01 +0000 (10:12 +0200)] 
l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>
7 years agol10n: bg.po: Updated Bulgarian translation (3195t)
Alexander Shopov [Sun, 7 May 2017 07:25:19 +0000 (09:25 +0200)] 
l10n: bg.po: Updated Bulgarian translation (3195t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
7 years agoMerge branch 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git
Jiang Xin [Mon, 8 May 2017 22:18:53 +0000 (06:18 +0800)] 
Merge branch 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git

* 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git:
  l10n: fr.po v2.13 rnd 2

7 years agol10n: fr.po v2.13 rnd 2
Jean-Noel Avila [Fri, 5 May 2017 09:55:14 +0000 (11:55 +0200)] 
l10n: fr.po v2.13 rnd 2

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
7 years agol10n: de.po: translate 4 new messages
Ralf Thielow [Fri, 5 May 2017 09:23:53 +0000 (11:23 +0200)] 
l10n: de.po: translate 4 new messages

Translate 4 new messages came from git.pot update in 28e1aaa48 (l10n:
git.pot: v2.13.0 round 2 (4 new, 7 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
7 years agol10n: de.po: update German translation
Ralf Thielow [Thu, 13 Apr 2017 14:45:29 +0000 (16:45 +0200)] 
l10n: de.po: update German translation

Translate 96 new messages came from git.pot update in dfc182b (l10n:
git.pot: v2.13.0 round 1 (96 new, 37 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
7 years agol10n: de.po: lower case after semi-colon
Michael J Gruber [Fri, 17 Mar 2017 15:04:19 +0000 (16:04 +0100)] 
l10n: de.po: lower case after semi-colon

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
7 years agol10n: vi.po(3195t): Update translation for v2.13.0 round 2
Tran Ngoc Quan [Fri, 5 May 2017 06:41:32 +0000 (13:41 +0700)] 
l10n: vi.po(3195t): Update translation for v2.13.0 round 2

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
7 years agoGit 2.12.3 v2.12.3
Junio C Hamano [Fri, 5 May 2017 04:33:22 +0000 (13:33 +0900)] 
Git 2.12.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.11' into maint
Junio C Hamano [Fri, 5 May 2017 04:31:40 +0000 (13:31 +0900)] 
Merge branch 'maint-2.11' into maint

7 years agoGit 2.11.2 v2.11.2
Junio C Hamano [Fri, 5 May 2017 04:29:43 +0000 (13:29 +0900)] 
Git 2.11.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.10' into maint-2.11
Junio C Hamano [Fri, 5 May 2017 04:26:31 +0000 (13:26 +0900)] 
Merge branch 'maint-2.10' into maint-2.11

7 years agoGit 2.10.3 v2.10.3
Junio C Hamano [Fri, 5 May 2017 04:24:10 +0000 (13:24 +0900)] 
Git 2.10.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.9' into maint-2.10
Junio C Hamano [Fri, 5 May 2017 04:21:52 +0000 (13:21 +0900)] 
Merge branch 'maint-2.9' into maint-2.10

7 years agoGit 2.9.4 v2.9.4
Junio C Hamano [Fri, 5 May 2017 04:18:23 +0000 (13:18 +0900)] 
Git 2.9.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.8' into maint-2.9
Junio C Hamano [Fri, 5 May 2017 04:13:48 +0000 (13:13 +0900)] 
Merge branch 'maint-2.8' into maint-2.9

7 years agoGit 2.8.5 v2.8.5
Junio C Hamano [Fri, 5 May 2017 04:08:54 +0000 (13:08 +0900)] 
Git 2.8.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.7' into maint-2.8
Junio C Hamano [Fri, 5 May 2017 04:05:03 +0000 (13:05 +0900)] 
Merge branch 'maint-2.7' into maint-2.8

7 years agoGit 2.7.5 v2.7.5
Junio C Hamano [Fri, 5 May 2017 04:03:40 +0000 (13:03 +0900)] 
Git 2.7.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.6' into maint-2.7
Junio C Hamano [Fri, 5 May 2017 03:59:16 +0000 (12:59 +0900)] 
Merge branch 'maint-2.6' into maint-2.7

7 years agoGit 2.6.7 v2.6.7
Junio C Hamano [Fri, 5 May 2017 03:56:19 +0000 (12:56 +0900)] 
Git 2.6.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.5' into maint-2.6
Junio C Hamano [Fri, 5 May 2017 03:52:26 +0000 (12:52 +0900)] 
Merge branch 'maint-2.5' into maint-2.6

7 years agoGit 2.5.6 v2.5.6
Junio C Hamano [Fri, 5 May 2017 03:49:00 +0000 (12:49 +0900)] 
Git 2.5.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.4' into maint-2.5
Junio C Hamano [Fri, 5 May 2017 03:46:53 +0000 (12:46 +0900)] 
Merge branch 'maint-2.4' into maint-2.5

7 years agoGit 2.4.12 v2.4.12
Junio C Hamano [Fri, 5 May 2017 03:25:09 +0000 (12:25 +0900)] 
Git 2.4.12

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jk/shell-no-repository-that-begins-with-dash' into maint-2.4
Junio C Hamano [Fri, 5 May 2017 03:17:55 +0000 (12:17 +0900)] 
Merge branch 'jk/shell-no-repository-that-begins-with-dash' into maint-2.4

* jk/shell-no-repository-that-begins-with-dash:
  shell: disallow repo names beginning with dash

7 years agoshell: disallow repo names beginning with dash
Jeff King [Sat, 29 Apr 2017 12:36:44 +0000 (08:36 -0400)] 
shell: disallow repo names beginning with dash

When a remote server uses git-shell, the client side will
connect to it like:

  ssh server "git-upload-pack 'foo.git'"

and we literally exec ("git-upload-pack", "foo.git"). In
early versions of upload-pack and receive-pack, we took a
repository argument and nothing else. But over time they
learned to accept dashed options. If the user passes a
repository name that starts with a dash, the results are
confusing at best (we complain of a bogus option instead of
a non-existent repository) and malicious at worst (the user
can start an interactive pager via "--help").

We could pass "--" to the sub-process to make sure the
user's argument is interpreted as a branch name. I.e.:

  git-upload-pack -- -foo.git

But adding "--" automatically would make us inconsistent
with a normal shell (i.e., when git-shell is not in use),
where "-foo.git" would still be an error. For that case, the
client would have to specify the "--", but they can't do so
reliably, as existing versions of git-shell do not allow
more than a single argument.

The simplest thing is to simply disallow "-" at the start of
the repo name argument. This hasn't worked either with or
without git-shell since version 1.0.0, and nobody has
complained.

Note that this patch just applies to do_generic_cmd(), which
runs upload-pack, receive-pack, and upload-archive. There
are two other types of commands that git-shell runs:

  - do_cvs_cmd(), but this already restricts the argument to
    be the literal string "server"

  - admin-provided commands in the git-shell-commands
    directory. We'll pass along arbitrary arguments there,
    so these commands could have similar problems. But these
    commands might actually understand dashed arguments, so
    we cannot just block them here. It's up to the writer of
    the commands to make sure they are safe. With great
    power comes great responsibility.

Reported-by: Timo Schmid <tschmid@ernw.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)
Jiang Xin [Fri, 5 May 2017 01:37:02 +0000 (09:37 +0800)] 
l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)

Generate po/git.pot from v2.13.0-rc2 for git v2.13.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agoMerge branch 'master' of git://github.com/git-l10n/git-po
Jiang Xin [Fri, 5 May 2017 01:35:22 +0000 (09:35 +0800)] 
Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.13.0 l10n round 1
  l10n: fr.po v2.13 round 1
  l10n: pt_PT: update Portuguese translation
  l10n: bg.po: Updated Bulgarian translation (3201t)
  l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0
  l10n: sv.po: Update Swedish translation (3199t0f0u)
  l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)

7 years agol10n: zh_CN: for git v2.13.0 l10n round 1
Jiang Xin [Sun, 23 Apr 2017 01:55:51 +0000 (09:55 +0800)] 
l10n: zh_CN: for git v2.13.0 l10n round 1

Translate 96 messages (3198t0f0u) for git v2.13.0-rc0.

Reviewed-by: 依云 <lilydjwg@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agoMerge branch 'fr_l10n_v2.13_rnd1' of git://github.com/jnavila/git
Jiang Xin [Fri, 5 May 2017 01:30:33 +0000 (09:30 +0800)] 
Merge branch 'fr_l10n_v2.13_rnd1' of git://github.com/jnavila/git

* 'fr_l10n_v2.13_rnd1' of git://github.com/jnavila/git:
  l10n: fr.po v2.13 round 1

7 years agoGit 2.13-rc2 v2.13.0-rc2
Junio C Hamano [Thu, 4 May 2017 07:27:19 +0000 (16:27 +0900)] 
Git 2.13-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'rg/a-the-typo'
Junio C Hamano [Thu, 4 May 2017 07:26:47 +0000 (16:26 +0900)] 
Merge branch 'rg/a-the-typo'

Typofix.

* rg/a-the-typo:
  fix minor typos

7 years agoMerge branch 'sr/hooks-cwd-doc'
Junio C Hamano [Thu, 4 May 2017 07:26:46 +0000 (16:26 +0900)] 
Merge branch 'sr/hooks-cwd-doc'

* sr/hooks-cwd-doc:
  githooks.txt: clarify push hooks are always executed in $GIT_DIR

7 years agoMerge branch 'rg/doc-submittingpatches-wordfix'
Junio C Hamano [Thu, 4 May 2017 07:26:46 +0000 (16:26 +0900)] 
Merge branch 'rg/doc-submittingpatches-wordfix'

* rg/doc-submittingpatches-wordfix:
  doc: update SubmittingPatches

7 years agoMerge branch 'rg/doc-pull-typofix'
Junio C Hamano [Thu, 4 May 2017 07:26:45 +0000 (16:26 +0900)] 
Merge branch 'rg/doc-pull-typofix'

* rg/doc-pull-typofix:
  doc: git-pull.txt use US spelling, fix minor typo

7 years agoMerge branch 'ja/i18n-cleanup'
Junio C Hamano [Thu, 4 May 2017 07:26:44 +0000 (16:26 +0900)] 
Merge branch 'ja/i18n-cleanup'

* ja/i18n-cleanup:
  i18n: read-cache: typofix
  i18n: remove i18n from tag reflog message

7 years agol10n: fr.po v2.13 round 1
Jean-Noel Avila [Sun, 23 Apr 2017 21:29:44 +0000 (23:29 +0200)] 
l10n: fr.po v2.13 round 1

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
7 years agoclone: handle empty config values in -c
Jonathan Nieder [Tue, 2 May 2017 00:05:15 +0000 (17:05 -0700)] 
clone: handle empty config values in -c

"git clone --config" uses the following incantation to add an item to
a config file, instead of replacing an existing value:

git_config_set_multivar_gently(key, value, "^$", 0)

As long as no existing value matches the regex ^$, that works as
intended and adds to the config.  When a value is empty, though, it
replaces the existing value.

Noticed while trying to set credential.helper during a clone to use a
specific helper without inheriting from ~/.gitconfig and
/etc/gitconfig.  That is, I ran

git clone -c credential.helper= \
-c credential.helper=myhelper \
https://example.com/repo

intending to produce the configuration

[credential]
helper =
helper = myhelper

Without this patch, the 'helper =' line is not included and the
credential helper from /etc/gitconfig gets used.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocredential doc: make multiple-helper behavior more prominent
Jonathan Nieder [Tue, 2 May 2017 00:21:14 +0000 (17:21 -0700)] 
credential doc: make multiple-helper behavior more prominent

Git's configuration system works by reading multiple configuration
files in order, from general to specific:

 - first, the system configuration /etc/gitconfig
 - then the user's configuration (~/.gitconfig or ~/.config/git/config)
 - then the repository configuration (.git/config)

For single-valued configuration items, the latest value wins.  For
multi-valued configuration items, values accumulate in that order.

For example, this allows setting a credential helper globally in
~/.gitconfig that git will try to use in all repositories, regardless
of whether they additionally provide another helper.  This is usually
a nice thing --- e.g. I can install helpers to use my OS keychain and
to cache credentials for a short period of time globally.

Sometimes people want to be able to override an inherited setting.
For the credential.helper setting, this is done by setting the
configuration item to empty before giving it a new value.  This is
already documented but the documentation is hard to find ---
git-config(1) says to look at gitcredentials(7) and the config
reference in gitcredentials(7) doesn't mention this issue.

Move the documentation to the config reference to make it easier to
find.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule: refactor logic to determine changed submodules
Brandon Williams [Tue, 2 May 2017 01:02:39 +0000 (18:02 -0700)] 
submodule: refactor logic to determine changed submodules

There are currently two instances (fetch and push) where we want to
determine if submodules have changed given some revision specification.
These two instances don't use the same logic to generate a list of
changed submodules and as a result there is a fair amount of code
duplication.

This patch refactors these two code paths such that they both use the
same logic to generate a list of changed submodules.  This also makes it
easier for future callers to be able to reuse this logic as they only
need to create an argv_array with the revision specification to be using
during the revision walk.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule: improve submodule_has_commits()
Brandon Williams [Tue, 2 May 2017 01:02:38 +0000 (18:02 -0700)] 
submodule: improve submodule_has_commits()

Teach 'submodule_has_commits()' to ensure that if a commit exists in a
submodule, that it is also reachable from a ref.

This is a preparatory step prior to merging the logic which checks for
changed submodules when fetching or pushing.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: pt_PT: update Portuguese translation
Vasco Almeida [Tue, 25 Apr 2017 14:35:41 +0000 (14:35 +0000)] 
l10n: pt_PT: update Portuguese translation

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
7 years agoMerging a handful of topics before -rc2
Junio C Hamano [Mon, 1 May 2017 05:16:18 +0000 (22:16 -0700)] 
Merging a handful of topics before -rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'sh/rebase-i-reread-todo-after-exec'
Junio C Hamano [Mon, 1 May 2017 05:14:44 +0000 (14:14 +0900)] 
Merge branch 'sh/rebase-i-reread-todo-after-exec'

"git rebase -i" failed to re-read the todo list file when the
command specified with the `exec` instruction updated it.

* sh/rebase-i-reread-todo-after-exec:
  rebase -i: reread the todo list if `exec` touched it

7 years agoMerge branch 'ls/travis-stricter-linux32-builds'
Junio C Hamano [Mon, 1 May 2017 05:14:44 +0000 (14:14 +0900)] 
Merge branch 'ls/travis-stricter-linux32-builds'

32-bit Linux build on Travis CI uses stricter compilation options.

* ls/travis-stricter-linux32-builds:
  travis-ci: set DEVELOPER knob for Linux32 build

7 years agoMerge branch 'ls/travis-win-fix-status'
Junio C Hamano [Mon, 1 May 2017 05:14:44 +0000 (14:14 +0900)] 
Merge branch 'ls/travis-win-fix-status'

Relaying status from Windows build by Travis CI was done with an
unsafe invocation of printf.

* ls/travis-win-fix-status:
  travis-ci: printf $STATUS as string

7 years agoMerge branch 'jk/submodule-init-segv-fix'
Junio C Hamano [Mon, 1 May 2017 05:14:43 +0000 (14:14 +0900)] 
Merge branch 'jk/submodule-init-segv-fix'

Fix a segv in 'submodule init' when url is not given for a submodule.

* jk/submodule-init-segv-fix:
  submodule_init: die cleanly on submodules without url defined

7 years agoMerge branch 'jk/prio-queue-avoid-swap-with-self'
Junio C Hamano [Mon, 1 May 2017 05:14:43 +0000 (14:14 +0900)] 
Merge branch 'jk/prio-queue-avoid-swap-with-self'

Code clean-up.

* jk/prio-queue-avoid-swap-with-self:
  prio_queue_reverse: don't swap elements with themselves

7 years agoMerge branch 'ab/align-perf-descriptions'
Junio C Hamano [Mon, 1 May 2017 05:14:42 +0000 (14:14 +0900)] 
Merge branch 'ab/align-perf-descriptions'

Output from perf tests have been updated to align their titles.

* ab/align-perf-descriptions:
  t/perf: correctly align non-ASCII descriptions in output

7 years agoMerge branch 'jk/complete-checkout-sans-dwim-remote'
Junio C Hamano [Mon, 1 May 2017 05:14:41 +0000 (14:14 +0900)] 
Merge branch 'jk/complete-checkout-sans-dwim-remote'

Completion for "git checkout <branch>" that auto-creates the branch
out of a remote tracking branch can now be disabled, as this
completion often gets in the way when completing to checkout an
existing local branch that happens to share the same prefix with
bunch of remote tracking branches.

* jk/complete-checkout-sans-dwim-remote:
  completion: optionally disable checkout DWIM

7 years agosubmodule: change string_list changed_submodule_paths
Brandon Williams [Fri, 28 Apr 2017 23:54:00 +0000 (16:54 -0700)] 
submodule: change string_list changed_submodule_paths

Eliminate a call to 'xstrdup()' by changing the string_list
'changed_submodule_paths' to duplicated strings added to it.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule: remove add_oid_to_argv()
Brandon Williams [Fri, 28 Apr 2017 23:53:59 +0000 (16:53 -0700)] 
submodule: remove add_oid_to_argv()

The function 'add_oid_to_argv()' provides the same functionality as
'append_oid_to_argv()'.  Remove this duplicate function and instead use
'append_oid_to_argv()' where 'add_oid_to_argv()' was previously used.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule: rename free_submodules_sha1s()
Brandon Williams [Fri, 28 Apr 2017 23:53:58 +0000 (16:53 -0700)] 
submodule: rename free_submodules_sha1s()

Rename 'free_submodules_sha1s()' to 'free_submodules_oids()' since the
function frees a 'struct string_list' which has a 'struct oid_array'
stored in the 'util' field.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule: rename add_sha1_to_array()
Brandon Williams [Fri, 28 Apr 2017 23:53:57 +0000 (16:53 -0700)] 
submodule: rename add_sha1_to_array()

Rename 'add_sha1_to_array()' to 'append_oid_to_array()' to more
accurately describe what the function does, since it handles
'struct object_id' and not sha1 character arrays.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotests: rename a test having to do with shallow submodules
Ævar Arnfjörð Bjarmason [Wed, 26 Apr 2017 23:12:34 +0000 (23:12 +0000)] 
tests: rename a test having to do with shallow submodules

Rename the t5614-clone-submodules.sh test to
t5614-clone-submodules-shallow.sh. It's not a general test of
submodules, but of shallow cloning in relation to submodules. Move it
to create another similar t56*-clone-submodules-*.sh test.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoclone: add a --no-tags option to clone without tags
Ævar Arnfjörð Bjarmason [Wed, 26 Apr 2017 23:12:33 +0000 (23:12 +0000)] 
clone: add a --no-tags option to clone without tags

Add a --no-tags option to clone without fetching any tags.

Without this change there's no easy way to clone a repository without
also fetching its tags.

When supplying --single-branch the primary remote branch will be
cloned, but in addition tags will be followed & retrieved. Now
--no-tags can be added --single-branch to clone a repository without
tags, and which only tracks a single upstream branch.

This option works without --single-branch as well, and will do a
normal clone but not fetch any tags.

Many git commands pay some fixed overhead as a function of the number
of references. E.g. creating ~40k tags in linux.git will cause a
command like `git log -1 >/dev/null` to run in over a second instead
of in a matter of milliseconds, in addition numerous other things will
slow down, e.g. "git log <TAB>" with the bash completion will slowly
show ~40k references instead of 1.

The user might want to avoid all of that overhead to simply use a
repository like that to browse the "master" branch, or something like
a CI tool might want to keep that one branch up-to-date without caring
about any other references.

Without this change the only way of accomplishing this was either by
manually tweaking the config in a fresh repository:

    git init git &&
    cat >git/.git/config <<EOF &&
    [remote "origin"]
        url = git@github.com:git/git.git
        tagOpt = --no-tags
        fetch = +refs/heads/master:refs/remotes/origin/master
    [branch "master"]
        remote = origin
        merge = refs/heads/master
    EOF
    cd git &&
    git pull

Which requires hardcoding the "master" name, which may not be the main
--single-branch would have retrieved, or alternatively by setting
tagOpt=--no-tags right after cloning & deleting any existing tags:

    git clone --single-branch git@github.com:git/git.git &&
    cd git &&
    git config remote.origin.tagOpt --no-tags &&
    git tag -l | xargs git tag -d

Which of course was also subtly buggy if --branch was pointed at a
tag, leaving the user in a detached head:

    git clone --single-branch --branch v2.12.0 git@github.com:git/git.git &&
    cd git &&
    git config remote.origin.tagOpt --no-tags &&
    git tag -l | xargs git tag -d

Now all this complexity becomes the much simpler:

    git clone --single-branch --no-tags git@github.com:git/git.git

Or in the case of cloning a single tag "branch":

    git clone --single-branch --branch v2.12.0 --no-tags git@github.com:git/git.git

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"
Ævar Arnfjörð Bjarmason [Wed, 26 Apr 2017 23:12:32 +0000 (23:12 +0000)] 
tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"

Change occurrences "cd" followed by "fetch" on a single line to be on
two lines.

This is purely a stylistic change pointed out in code review for an
unrelated patch. Change the these tests use so new tests added later
using the more common style don't look out of place.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoi18n: read-cache: typofix
Peter Krefting [Sun, 30 Apr 2017 21:32:48 +0000 (23:32 +0200)] 
i18n: read-cache: typofix

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoi18n: remove i18n from tag reflog message
Jean-Noel Avila [Sun, 30 Apr 2017 21:32:47 +0000 (23:32 +0200)] 
i18n: remove i18n from tag reflog message

The building of the reflog message is using strbuf, which is not
friendly with internationalization frameworks. No other reflog
messages are translated right now and switching all the messages to
i18n would require a major rework of the way the messages are built.

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodoc: git-pull.txt use US spelling, fix minor typo
René Genz [Sun, 30 Apr 2017 14:54:25 +0000 (16:54 +0200)] 
doc: git-pull.txt use US spelling, fix minor typo

Signed-off-by: René Genz <liebundartig@freenet.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agofix minor typos
René Genz [Sun, 30 Apr 2017 15:48:27 +0000 (17:48 +0200)] 
fix minor typos

Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: René Genz <liebundartig@freenet.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogithooks.txt: clarify push hooks are always executed in $GIT_DIR
Simon Ruderich [Sat, 29 Apr 2017 12:28:29 +0000 (14:28 +0200)] 
githooks.txt: clarify push hooks are always executed in $GIT_DIR

Listing the specific hooks might feel verbose but without it the
reader is left to wonder which hooks are triggered during the
push. Something which is not immediately obvious when only trying
to find out where the hook is executed.

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodoc: update SubmittingPatches
René Genz [Sun, 30 Apr 2017 15:42:21 +0000 (17:42 +0200)] 
doc: update SubmittingPatches

-use US English spelling
-minor wording change for better readability

Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: René Genz <liebundartig@freenet.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot5004: require 64-bit support for big ZIP tests
René Scharfe [Sun, 30 Apr 2017 07:53:52 +0000 (09:53 +0200)] 
t5004: require 64-bit support for big ZIP tests

Check if unzip supports the ZIP64 format and skip the tests that create
big archives otherwise.  Also skip the test that archives a big file on
32-bit platforms because the git object systems can't unpack files
bigger than 4GB there.

Reported-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: bg.po: Updated Bulgarian translation (3201t)
Alexander Shopov [Fri, 10 Mar 2017 08:39:56 +0000 (10:39 +0200)] 
l10n: bg.po: Updated Bulgarian translation (3201t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
7 years agoMerge branch 'master' of https://github.com/vnwildman/git
Jiang Xin [Sat, 29 Apr 2017 02:01:41 +0000 (10:01 +0800)] 
Merge branch 'master' of https://github.com/vnwildman/git

* 'master' of https://github.com/vnwildman/git:
  l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0

7 years agostatus: add color config slots for branch info in "--short --branch"
Stephen Kent [Sat, 22 Apr 2017 05:42:02 +0000 (22:42 -0700)] 
status: add color config slots for branch info in "--short --branch"

Add color config slots to be used in the status short-format when
displaying local and remote tracking branch information.

[jc: rebased on top of Peff's fix to 'git status' and tweaked the
test to check both local and remote-tracking branch output]

Signed-off-by: Stephen Kent <smkent@smkent.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agostatus: fix missing newline when comment chars are disabled
Jeff King [Thu, 27 Apr 2017 09:01:05 +0000 (05:01 -0400)] 
status: fix missing newline when comment chars are disabled

When git-status shows tracking data for the current branch
in the long format, we try to end the stanza with a blank
line. When status.displayCommentPrefix is true, we call
color_fprintf_ln() to do so. But when it's false, we call
the enigmatic:

  fputs("", s->fp);

which does nothing at all! This is a bug from 7d7d68022
(silence a bunch of format-zero-length warnings,
2014-05-04). Prior to that, we called fprintf_ln() with an
empty string. Switching to fputs() meant we needed to
include the "newline in the string, but we didn't.

So you see:

  On branch jk/status-tracking-newline
  Your branch is ahead of 'origin/master' by 1 commit.
  Changes not staged for commit:
          modified:  foo

  Untracked files:
     bar

whereas there should be a blank line before the "Changes not
staged" line.

The fix itself is a one-liner. But we never noticed this
bug because t7508 doesn't exercise the ahead/behind code at
all.  So let's configure an upstream during the initial
setup, which means that the code will be exercised as part
of all of the various invocations in that script. This makes
the diff rather noisy, but should give us good coverage.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoarchive-zip: set version field for big files correctly
René Scharfe [Thu, 27 Apr 2017 20:25:45 +0000 (22:25 +0200)] 
archive-zip: set version field for big files correctly

Signal that extractors need to implement spec version 4.5 (or higher)
for files with sizes of 4GB and more.  Older unzippers might produce
truncated results otherwise; they should rather refuse to extract.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoam: shorten ident_split variable name in get_commit_info()
Jeff King [Thu, 27 Apr 2017 03:28:31 +0000 (23:28 -0400)] 
am: shorten ident_split variable name in get_commit_info()

The local ident_split variable is often mentioned three
times per line when dealing with its begin/end pointer
pairs. Let's use a shorter name which lets us get rid of
some long lines.  Since this is a short self-contained
function, readability doesn't suffer.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoam: simplify allocations in get_commit_info()
Jeff King [Thu, 27 Apr 2017 03:27:17 +0000 (23:27 -0400)] 
am: simplify allocations in get_commit_info()

After we call split_ident_line(), we have several begin/end
pairs for various parts of the ident. We then copy each into
a strbuf to create a single string, and then detach that
string.  We can instead skip the strbuf entirely and just
duplicate the strings directly.

This is shorter, and it makes it more obvious that we are
not leaking the strbuf (we were not before, because every
code path either died or hit a strbuf_detach).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoam: fix commit buffer leak in get_commit_info()
Jeff King [Thu, 27 Apr 2017 03:25:55 +0000 (23:25 -0400)] 
am: fix commit buffer leak in get_commit_info()

Calling logmsg_reencode() may allocate a buffer for the
commit message (because we need to load it from disk, or
because it needs re-encoded). We must "unuse" it afterwards
to free it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agorebase -i: reread the todo list if `exec` touched it
Stephen Hicks [Wed, 26 Apr 2017 19:17:40 +0000 (21:17 +0200)] 
rebase -i: reread the todo list if `exec` touched it

In the scripted version of the interactive rebase, there was no internal
representation of the todo list; it was re-read before every command.
That allowed the hack that an `exec` command could append (or even
completely rewrite) the todo list.

This hack was broken by the partial conversion of the interactive rebase
to C, and this patch reinstates it.

We also add a small test to verify that this fix does not regress in the
future.

Signed-off-by: Stephen Hicks <sdh@google.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotravis-ci: set DEVELOPER knob for Linux32 build
Lars Schneider [Wed, 26 Apr 2017 19:18:57 +0000 (21:18 +0200)] 
travis-ci: set DEVELOPER knob for Linux32 build

The Linux32 build was not build with our strict compiler settings (e.g.
warnings as errors). Fix this by passing the DEVELOPER environment
variable to the docker container.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotravis-ci: printf $STATUS as string
Lars Schneider [Wed, 26 Apr 2017 19:39:33 +0000 (21:39 +0200)] 
travis-ci: printf $STATUS as string

If the $STATUS variable contains a "%" character then printf will
interpret that as invalid format string. Fix this by formatting $STATUS
as string.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotravis-ci: check AsciiDoc/AsciiDoctor stderr output
Lars Schneider [Wed, 26 Apr 2017 19:15:44 +0000 (21:15 +0200)] 
travis-ci: check AsciiDoc/AsciiDoctor stderr output

`make` does not necessarily fail with an error code if
Asciidoc/AsciiDoctor encounters problems. Anything written to stderr
might be a better indicator for problems.

Ensure that nothing is written to stderr during a documentation build.

The redirects do not work in `sh`, therefore the script uses `bash`.
This shouldn't be a problem as the script is only executed on TravisCI.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosequencer: add newline before adding footers
Jonathan Tan [Wed, 26 Apr 2017 20:50:03 +0000 (13:50 -0700)] 
sequencer: add newline before adding footers

When encountering a commit message that does not end in a newline,
sequencer does not complete the line before determining if a blank line
should be added.  This causes the "(cherry picked..." and sign-off lines
to sometimes appear on the same line as the last line of the commit
message.

This behavior was introduced by commit 967dfd4 ("sequencer: use
trailer's trailer layout", 2016-11-29). However, a revert of that commit
would not resolve this issue completely: prior to that commit, a
conforming footer was deemed to be non-conforming by
has_conforming_footer() if there was no terminating newline, resulting
in both conforming and non-conforming footers being treated the same
when they should not be.

Resolve this issue, both for conforming and non-conforming footers, and
in both do_pick_commit() and append_signoff(), by always adding a
newline to the commit message if it does not end in one before checking
the footer for conformity.

Reported-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>