gitweb.git
Merge branch 'sf/putty-w-args'Junio C Hamano Mon, 27 Feb 2017 21:57:14 +0000 (13:57 -0800)

Merge branch 'sf/putty-w-args'

The command line options for ssh invocation needs to be tweaked for
some implementations of SSH (e.g. PuTTY plink wants "-P <port>"
while OpenSSH wants "-p <port>" to specify port to connect to), and
the variant was guessed when GIT_SSH environment variable is used
to specify it. The logic to guess now applies to the command
specified by the newer GIT_SSH_COMMAND and also core.sshcommand
configuration variable, and comes with an escape hatch for users to
deal with misdetected cases.

* sf/putty-w-args:
connect.c: stop conflating ssh command names and overrides
connect: Add the envvar GIT_SSH_VARIANT and ssh.variant config
git_connect(): factor out SSH variant handling
connect: rename tortoiseplink and putty variables
connect: handle putty/plink also in GIT_SSH_COMMAND

Merge branch 'js/rebase-helper'Junio C Hamano Mon, 27 Feb 2017 21:57:14 +0000 (13:57 -0800)

Merge branch 'js/rebase-helper'

"git rebase -i" starts using the recently updated "sequencer" code.

* js/rebase-helper:
rebase -i: use the rebase--helper builtin
rebase--helper: add a builtin helper for interactive rebases

Merge branch 'bw/attr'Junio C Hamano Mon, 27 Feb 2017 21:57:14 +0000 (13:57 -0800)

Merge branch 'bw/attr'

The gitattributes machinery is being taught to work better in a
multi-threaded environment.

* bw/attr: (27 commits)
attr: reformat git_attr_set_direction() function
attr: push the bare repo check into read_attr()
attr: store attribute stack in attr_check structure
attr: tighten const correctness with git_attr and match_attr
attr: remove maybe-real, maybe-macro from git_attr
attr: eliminate global check_all_attr array
attr: use hashmap for attribute dictionary
attr: change validity check for attribute names to use positive logic
attr: pass struct attr_check to collect_some_attrs
attr: retire git_check_attrs() API
attr: convert git_check_attrs() callers to use the new API
attr: convert git_all_attrs() to use "struct attr_check"
attr: (re)introduce git_check_attr() and struct attr_check
attr: rename function and struct related to checking attributes
attr.c: outline the future plans by heavily commenting
Documentation: fix a typo
attr.c: add push_stack() helper
attr: support quoting pathname patterns in C style
attr.c: plug small leak in parse_attr_line()
attr.c: tighten constness around "git_attr" structure
...

Merge branch 'sg/completion'Junio C Hamano Mon, 27 Feb 2017 21:57:14 +0000 (13:57 -0800)

Merge branch 'sg/completion'

Clean-up and updates to command line completion (in contrib/).

* sg/completion: (22 commits)
completion: restore removed line continuating backslash
completion: cache the path to the repository
completion: extract repository discovery from __gitdir()
completion: don't guard git executions with __gitdir()
completion: consolidate silencing errors from git commands
completion: don't use __gitdir() for git commands
completion: respect 'git -C <path>'
rev-parse: add '--absolute-git-dir' option
completion: fix completion after 'git -C <path>'
completion: don't offer commands when 'git --opt' needs an argument
completion: list short refs from a remote given as a URL
completion: don't list 'HEAD' when trying refs completion outside of a repo
completion: list refs from remote when remote's name matches a directory
completion: respect 'git --git-dir=<path>' when listing remote refs
completion: fix most spots not respecting 'git --git-dir=<path>'
completion: ensure that the repository path given on the command line exists
completion tests: add tests for the __git_refs() helper function
completion tests: check __gitdir()'s output in the error cases
completion tests: consolidate getting path of current working directory
completion tests: make the $cur variable local to the test helper functions
...

Merge branch 'lt/pathspec-negative'Junio C Hamano Mon, 27 Feb 2017 21:57:13 +0000 (13:57 -0800)

Merge branch 'lt/pathspec-negative'

The "negative" pathspec feature was somewhat more cumbersome to use
than necessary in that its short-hand used "!" which needed to be
escaped from shells, and it required "exclude from what?" specified.

* lt/pathspec-negative:
pathspec: don't error out on all-exclusionary pathspec patterns
pathspec magic: add '^' as alias for '!'

Merge branch 'cw/tag-reflog-message'Junio C Hamano Mon, 27 Feb 2017 21:57:13 +0000 (13:57 -0800)

Merge branch 'cw/tag-reflog-message'

"git tag" did not leave useful message when adding a new entry to
reflog; this was left unnoticed for a long time because refs/tags/*
doesn't keep reflog by default.

* cw/tag-reflog-message:
tag: generate useful reflog message

Merge branch 'jk/alternate-ref-optim'Junio C Hamano Mon, 27 Feb 2017 21:57:13 +0000 (13:57 -0800)

Merge branch 'jk/alternate-ref-optim'

Optimizes resource usage while enumerating refs from alternate
object store, to help receiving end of "push" that hosts a
repository with many "forks".

* jk/alternate-ref-optim:
receive-pack: avoid duplicates between our refs and alternates
receive-pack: treat namespace .have lines like alternates
receive-pack: fix misleading namespace/.have comment
receive-pack: use oidset to de-duplicate .have lines
add oidset API
fetch-pack: cache results of for_each_alternate_ref
for_each_alternate_ref: replace transport code with for-each-ref
for_each_alternate_ref: pass name/oid instead of ref struct
for_each_alternate_ref: use strbuf for path allocation
for_each_alternate_ref: stop trimming trailing slashes
for_each_alternate_ref: handle failure from real_pathdup()

Merge branch 'kn/ref-filter-branch-list'Junio C Hamano Mon, 27 Feb 2017 21:57:13 +0000 (13:57 -0800)

Merge branch 'kn/ref-filter-branch-list'

The code to list branches in "git branch" has been consolidated
with the more generic ref-filter API.

* kn/ref-filter-branch-list: (21 commits)
ref-filter: resurrect "strip" as a synonym to "lstrip"
branch: implement '--format' option
branch: use ref-filter printing APIs
branch, tag: use porcelain output
ref-filter: allow porcelain to translate messages in the output
ref-filter: add an 'rstrip=<N>' option to atoms which deal with refnames
ref-filter: modify the 'lstrip=<N>' option to work with negative '<N>'
ref-filter: Do not abruptly die when using the 'lstrip=<N>' option
ref-filter: rename the 'strip' option to 'lstrip'
ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal()
ref-filter: introduce refname_atom_parser()
ref-filter: introduce refname_atom_parser_internal()
ref-filter: make "%(symref)" atom work with the ':short' modifier
ref-filter: add support for %(upstream:track,nobracket)
ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams
ref-filter: introduce format_ref_array_item()
ref-filter: move get_head_description() from branch.c
ref-filter: modify "%(objectname:short)" to take length
ref-filter: implement %(if:equals=<string>) and %(if:notequals=<string>)
ref-filter: include reference to 'used_atom' within 'atom_value'
...

Merge branch 'ps/urlmatch-wildcard'Junio C Hamano Mon, 27 Feb 2017 21:57:12 +0000 (13:57 -0800)

Merge branch 'ps/urlmatch-wildcard'

The <url> part in "http.<url>.<variable>" configuration variable
can now be spelled with '*' that serves as wildcard.
E.g. "http.https://*.example.com.proxy" can be used to specify the
proxy used for https://a.example.com, https://b.example.com, etc.,
i.e. any host in the example.com domain.

* ps/urlmatch-wildcard:
urlmatch: allow globbing for the URL host part
urlmatch: include host in urlmatch ranking
urlmatch: split host and port fields in `struct url_info`
urlmatch: enable normalization of URLs with globs
mailmap: add Patrick Steinhardt's work address

Merge branch 'mm/merge-rename-delete-message'Junio C Hamano Mon, 27 Feb 2017 21:57:12 +0000 (13:57 -0800)

Merge branch 'mm/merge-rename-delete-message'

When "git merge" detects a path that is renamed in one history
while the other history deleted (or modified) it, it now reports
both paths to help the user understand what is going on in the two
histories being merged.

* mm/merge-rename-delete-message:
merge-recursive: make "CONFLICT (rename/delete)" message show both paths

Merge branch 'mh/ref-remove-empty-directory'Junio C Hamano Mon, 27 Feb 2017 21:57:12 +0000 (13:57 -0800)

Merge branch 'mh/ref-remove-empty-directory'

Deletion of a branch "foo/bar" could remove .git/refs/heads/foo
once there no longer is any other branch whose name begins with
"foo/", but we didn't do so so far. Now we do.

* mh/ref-remove-empty-directory: (23 commits)
files_transaction_commit(): clean up empty directories
try_remove_empty_parents(): teach to remove parents of reflogs, too
try_remove_empty_parents(): don't trash argument contents
try_remove_empty_parents(): rename parameter "name" -> "refname"
delete_ref_loose(): inline function
delete_ref_loose(): derive loose reference path from lock
log_ref_write_1(): inline function
log_ref_setup(): manage the name of the reflog file internally
log_ref_write_1(): don't depend on logfile argument
log_ref_setup(): pass the open file descriptor back to the caller
log_ref_setup(): improve robustness against races
log_ref_setup(): separate code for create vs non-create
log_ref_write(): inline function
rename_tmp_log(): improve error reporting
rename_tmp_log(): use raceproof_create_file()
lock_ref_sha1_basic(): use raceproof_create_file()
lock_ref_sha1_basic(): inline constant
raceproof_create_file(): new function
safe_create_leading_directories(): set errno on SCLD_EXISTS
safe_create_leading_directories_const(): preserve errno
...

Merge branch 'jk/delta-chain-limit'Junio C Hamano Mon, 27 Feb 2017 21:57:11 +0000 (13:57 -0800)

Merge branch 'jk/delta-chain-limit'

"git repack --depth=<n>" for a long time busted the specified depth
when reusing delta from existing packs. This has been corrected.

* jk/delta-chain-limit:
pack-objects: convert recursion to iteration in break_delta_chain()
pack-objects: enforce --depth limit in reused deltas

Merge branch 'jk/describe-omit-some-refs'Junio C Hamano Mon, 27 Feb 2017 21:57:11 +0000 (13:57 -0800)

Merge branch 'jk/describe-omit-some-refs'

"git describe" and "git name-rev" have been taught to take more
than one refname patterns to restrict the set of refs to base their
naming output on, and also learned to take negative patterns to
name refs not to be used for naming via their "--exclude" option.

* jk/describe-omit-some-refs:
describe: teach describe negative pattern matches
describe: teach --match to accept multiple patterns
name-rev: add support to exclude refs by pattern match
name-rev: extend --refs to accept multiple patterns
doc: add documentation for OPT_STRING_LIST

Git 2.12 v2.12.0Junio C Hamano Fri, 24 Feb 2017 18:49:58 +0000 (10:49 -0800)

Git 2.12

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

Merge branch 'ps/doc-gc-aggressive-depth-update'Junio C Hamano Fri, 24 Feb 2017 18:48:10 +0000 (10:48 -0800)

Merge branch 'ps/doc-gc-aggressive-depth-update'

Doc update.

* ps/doc-gc-aggressive-depth-update:
docs/git-gc: fix default value for `--aggressiveDepth`

Merge branch 'bc/worktree-doc-fix-detached'Junio C Hamano Fri, 24 Feb 2017 18:48:10 +0000 (10:48 -0800)

Merge branch 'bc/worktree-doc-fix-detached'

Doc update.

* bc/worktree-doc-fix-detached:
Documentation: correctly spell git worktree --detach

Merge branch 'dr/doc-check-ref-format-normalize'Junio C Hamano Fri, 24 Feb 2017 18:48:09 +0000 (10:48 -0800)

Merge branch 'dr/doc-check-ref-format-normalize'

Doc update.

* dr/doc-check-ref-format-normalize:
git-check-ref-format: clarify documentation for --normalize

Merge branch 'gp/document-dotfiles-in-templates-are... Junio C Hamano Fri, 24 Feb 2017 18:48:09 +0000 (10:48 -0800)

Merge branch 'gp/document-dotfiles-in-templates-are-not-copied'

Doc update.

* gp/document-dotfiles-in-templates-are-not-copied:
init: document dotfiles exclusion on template copy

Merge branch 'rt/align-add-i-help-text'Junio C Hamano Fri, 24 Feb 2017 18:48:08 +0000 (10:48 -0800)

Merge branch 'rt/align-add-i-help-text'

Doc update.

* rt/align-add-i-help-text:
git add -i: replace \t with blanks in the help message

Merge branch 'bc/blame-doc-fix'Junio C Hamano Fri, 24 Feb 2017 18:48:07 +0000 (10:48 -0800)

Merge branch 'bc/blame-doc-fix'

Doc update.

* bc/blame-doc-fix:
Documentation: use brackets for optional arguments

docs/git-gc: fix default value for `--aggressiveDepth`Patrick Steinhardt Fri, 24 Feb 2017 08:46:45 +0000 (09:46 +0100)

docs/git-gc: fix default value for `--aggressiveDepth`

In commit 07e7dbf0d (gc: default aggressive depth to 50, 2016-08-11),
the default aggressive depth of git-gc has been changed to 50. While
git-config(1) has been updated to represent the new default value,
git-gc(1) still mentions the old value. This patch fixes it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge tag 'l10n-2.12.0-rnd2' of git://github.com/git... Junio C Hamano Fri, 24 Feb 2017 17:55:41 +0000 (09:55 -0800)

Merge tag 'l10n-2.12.0-rnd2' of git://github.com/git-l10n/git-po

l10n-2.12.0-rnd2

* tag 'l10n-2.12.0-rnd2' of git://github.com/git-l10n/git-po: (22 commits)
l10n: zh_CN: for git v2.12.0 l10n round 2
l10n: Update Catalan translation
l10n: pt_PT: update Portuguese tranlation
l10n: sv.po: Update Swedish translation (3139t0f0u)
l10n: de.po: translate 241 messages
l10n: ko.po: Update Korean translation
l10n: vi.po (3139t): Updated 2 new messages for rc1
l10n: fr.po: v2.12.0 round 2 3139t
l10n: git.pot: v2.12.0 round 2 (2 new)
l10n: vi.po: Updated Vietnamese translation (3137t)
l10n: update Catalan translation
l10n: sv.po: Update Swedish translation (3137t0f0u)
l10n: fr.po: v2.11-rc0 first round
l10n: ko.po: Update Korean translation
l10n: fr.po: Fix a typo in the French translation
l10n: fr.po: Remove gender specific adjectives
l10n: fr.po: Fix typos
l10n: git.pot: v2.12.0 round 1 (239 new, 15 removed)
l10n: bg: Updated Bulgarian translation (2913t+0f+0u)
l10n: fixes to Catalan translation
...

l10n: zh_CN: for git v2.12.0 l10n round 2Jiang Xin Fri, 27 Jan 2017 14:50:57 +0000 (22:50 +0800)

l10n: zh_CN: for git v2.12.0 l10n round 2

Translate 241 messages (3139t0f0u) for git v2.12.0-rc1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

l10n: Update Catalan translationJordi Mas Tue, 21 Feb 2017 17:32:29 +0000 (18:32 +0100)

l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>

l10n: pt_PT: update Portuguese tranlationVasco Almeida Sun, 5 Feb 2017 18:43:34 +0000 (17:43 -0100)

l10n: pt_PT: update Portuguese tranlation

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

git add -i: replace \t with blanks in the help messageRalf Thielow Wed, 22 Feb 2017 18:46:27 +0000 (19:46 +0100)

git add -i: replace \t with blanks in the help message

Within the help message of 'git add -i', the 'diff' command uses one
tab character and blanks to create the space between the name and the
description while the others use blanks only. So if the tab size is
not at 4 characters, this description will not be in range.
Replace the tab character with blanks.

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

Documentation: use brackets for optional argumentsbrian m. carlson Wed, 22 Feb 2017 12:25:46 +0000 (12:25 +0000)

Documentation: use brackets for optional arguments

The documentation for git blame used vertical bars for optional
arguments to -M and -C, which is unusual and potentially confusing.
Since most man pages use brackets for optional items, and that's
consistent with how we document the same options for git diff and
friends, use brackets here, too.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: correctly spell git worktree --detachbrian m. carlson Wed, 22 Feb 2017 12:34:42 +0000 (12:34 +0000)

Documentation: correctly spell git worktree --detach

The option is “--detach”, but we accidentally spelled it “--detached” at
one point in the man page.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reported-by: Casey Rodarmor <casey@rodarmor.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-ref-format: clarify documentation for --normalizeDamien Regad Sun, 19 Feb 2017 22:32:32 +0000 (23:32 +0100)

git-check-ref-format: clarify documentation for --normalize

Use of 'iff' may be confusing to people not familiar with this term.

Improving the --normalize option's documentation to remove the use of
'iff', and clearly describe what happens when the condition is not met.

Signed-off-by: Damien Regad <dregad@mantisbt.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of git://github.com/nafmo/git... Jiang Xin Tue, 21 Feb 2017 16:06:44 +0000 (00:06 +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 (3139t0f0u)

Merge branch 'svn-escape-backslash' of git://bogomips... Junio C Hamano Tue, 21 Feb 2017 06:01:59 +0000 (22:01 -0800)

Merge branch 'svn-escape-backslash' of git://bogomips.org/git-svn

* 'svn-escape-backslash' of git://bogomips.org/git-svn:
git-svn: escape backslashes in refnames

l10n: sv.po: Update Swedish translation (3139t0f0u)Peter Krefting Mon, 20 Feb 2017 18:40:11 +0000 (19:40 +0100)

l10n: sv.po: Update Swedish translation (3139t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>

l10n: de.po: translate 241 messagesRalf Thielow Mon, 20 Feb 2017 17:40:36 +0000 (18:40 +0100)

l10n: de.po: translate 241 messages

Translate 241 messages came from git.pot update in 673bfad09
(l10n: git.pot: v2.12.0 round 1 (239 new, 15 removed)) and a4d94835a
(l10n: git.pot: v2.12.0 round 2 (2 new)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Phillip Sz <phillip.szelat@gmail.com>

Merge branch 'ko/merge-l10n' of https://github.com... Jiang Xin Sun, 19 Feb 2017 14:08:05 +0000 (22:08 +0800)

Merge branch 'ko/merge-l10n' of https://github.com/changwoo/git-l10n-ko

* 'ko/merge-l10n' of https://github.com/changwoo/git-l10n-ko:
l10n: ko.po: Update Korean translation

Merge branch 'master' of https://github.com/vnwildman/gitJiang Xin Sun, 19 Feb 2017 14:04:41 +0000 (22:04 +0800)

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

* 'master' of https://github.com/vnwildman/git:
l10n: vi.po (3139t): Updated 2 new messages for rc1

l10n: ko.po: Update Korean translationChangwoo Ryu Sun, 19 Feb 2017 10:34:24 +0000 (19:34 +0900)

l10n: ko.po: Update Korean translation

Signed-off-by: Changwoo Ryu <cwryu@debian.org>

l10n: vi.po (3139t): Updated 2 new messages for rc1Tran Ngoc Quan Sat, 18 Feb 2017 00:18:54 +0000 (07:18 +0700)

l10n: vi.po (3139t): Updated 2 new messages for rc1

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

init: document dotfiles exclusion on template copyGrégoire Paris Fri, 17 Feb 2017 23:37:00 +0000 (00:37 +0100)

init: document dotfiles exclusion on template copy

Not just . and .., but any path that begins with dot is not copied
when copying the template directory to a new repository. You can
customize the template directory, copying some dotfiles might make
sense, but it's actually a good thing not to, because you would not
want to have your git directory copied in every git directory that
is created should you decide to put your template directory under
version control, for example. Plus, it might be used as a feature
by people who would want to exclude some files.

Signed-off-by: Grégoire Paris <postmaster@greg0ire.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: fr.po: v2.12.0 round 2 3139tJean-Noel Avila Fri, 17 Feb 2017 23:10:04 +0000 (00:10 +0100)

l10n: fr.po: v2.12.0 round 2 3139t

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

Git 2.12-rc2 v2.12.0-rc2Junio C Hamano Fri, 17 Feb 2017 22:00:19 +0000 (14:00 -0800)

Git 2.12-rc2

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

l10n: git.pot: v2.12.0 round 2 (2 new)Jiang Xin Fri, 17 Feb 2017 17:00:54 +0000 (01:00 +0800)

l10n: git.pot: v2.12.0 round 2 (2 new)

Generate po/git.pot from v2.12.0-rc1 for git v2.12.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

Merge branch 'master' of git://github.com/git-l10n... Jiang Xin Fri, 17 Feb 2017 16:59:51 +0000 (00:59 +0800)

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

* 'master' of git://github.com/git-l10n/git-po:
l10n: vi.po: Updated Vietnamese translation (3137t)
l10n: update Catalan translation
l10n: sv.po: Update Swedish translation (3137t0f0u)
l10n: fr.po: v2.11-rc0 first round
l10n: ko.po: Update Korean translation
l10n: fr.po: Fix a typo in the French translation
l10n: fr.po: Remove gender specific adjectives
l10n: fr.po: Fix typos
l10n: git.pot: v2.12.0 round 1 (239 new, 15 removed)
l10n: bg: Updated Bulgarian translation (2913t+0f+0u)
l10n: fixes to Catalan translation
l10n: zh_CN: review for git v2.11.0 l10n
l10n: New Catalan translation maintainer

Merge branch 'master' of https://github.com/vnwildman/gitJiang Xin Fri, 17 Feb 2017 16:54:49 +0000 (00:54 +0800)

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

* 'master' of https://github.com/vnwildman/git:
l10n: vi.po: Updated Vietnamese translation (3137t)

Merge branch 'master' of https://github.com/Softcatala... Jiang Xin Fri, 17 Feb 2017 16:49:06 +0000 (00:49 +0800)

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

* 'master' of https://github.com/Softcatala/git-po:
l10n: update Catalan translation

l10n: vi.po: Updated Vietnamese translation (3137t)Tran Ngoc Quan Fri, 17 Feb 2017 06:51:34 +0000 (13:51 +0700)

l10n: vi.po: Updated Vietnamese translation (3137t)

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

Hopefully the final batch of mini-topics before the... Junio C Hamano Thu, 16 Feb 2017 22:46:35 +0000 (14:46 -0800)

Hopefully the final batch of mini-topics before the final

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

Merge branch 'jk/tempfile-ferror-fclose-confusion'Junio C Hamano Thu, 16 Feb 2017 22:45:15 +0000 (14:45 -0800)

Merge branch 'jk/tempfile-ferror-fclose-confusion'

Code clean-up.

* jk/tempfile-ferror-fclose-confusion:
tempfile: avoid "ferror | fclose" trick

Merge branch 'dp/submodule-doc-markup-fix'Junio C Hamano Thu, 16 Feb 2017 22:45:15 +0000 (14:45 -0800)

Merge branch 'dp/submodule-doc-markup-fix'

Doc fix.

* dp/submodule-doc-markup-fix:
config.txt: fix formatting of submodule.alternateErrorStrategy section

Merge branch 'jk/reset-to-break-a-commit-doc-updated'Junio C Hamano Thu, 16 Feb 2017 22:45:14 +0000 (14:45 -0800)

Merge branch 'jk/reset-to-break-a-commit-doc-updated'

Doc update.

* jk/reset-to-break-a-commit-doc-updated:
reset: add an example of how to split a commit into two

Merge branch 'jk/reset-to-break-a-commit-doc'Junio C Hamano Thu, 16 Feb 2017 22:45:14 +0000 (14:45 -0800)

Merge branch 'jk/reset-to-break-a-commit-doc'

Doc update.

* jk/reset-to-break-a-commit-doc:
Revert "reset: add an example of how to split a commit into two"

Merge branch 'js/mingw-isatty'Junio C Hamano Thu, 16 Feb 2017 22:45:13 +0000 (14:45 -0800)

Merge branch 'js/mingw-isatty'

A hotfix for a topic already in 'master'.

* js/mingw-isatty:
mingw: make stderr unbuffered again

Merge branch 'rs/strbuf-cleanup-in-rmdir-recursively'Junio C Hamano Thu, 16 Feb 2017 22:45:13 +0000 (14:45 -0800)

Merge branch 'rs/strbuf-cleanup-in-rmdir-recursively'

Code clean-up.

* rs/strbuf-cleanup-in-rmdir-recursively:
rm: reuse strbuf for all remove_dir_recursively() calls, again

Merge branch 'rs/ls-files-partial-optim'Junio C Hamano Thu, 16 Feb 2017 22:45:13 +0000 (14:45 -0800)

Merge branch 'rs/ls-files-partial-optim'

"ls-files" run with pathspec has been micro-optimized to avoid
having to memmove(3) unnecessary bytes.

* rs/ls-files-partial-optim:
ls-files: move only kept cache entries in prune_cache()
ls-files: pass prefix length explicitly to prune_cache()

Merge branch 'rs/cocci-check-free-only-null'Junio C Hamano Thu, 16 Feb 2017 22:45:13 +0000 (14:45 -0800)

Merge branch 'rs/cocci-check-free-only-null'

A new coccinelle rule that catches a check of !pointer before the
pointer is free(3)d, which most likely is a bug.

* rs/cocci-check-free-only-null:
cocci: detect useless free(3) calls

Merge branch 'ls/p4-path-encoding'Junio C Hamano Thu, 16 Feb 2017 22:45:12 +0000 (14:45 -0800)

Merge branch 'ls/p4-path-encoding'

When "git p4" imports changelist that removes paths, it failed to
convert pathnames when the p4 used encoding different from the one
used on the Git side. This has been corrected.

* ls/p4-path-encoding:
git-p4: fix git-p4.pathEncoding for removed files

tempfile: avoid "ferror | fclose" trickJeff King Thu, 16 Feb 2017 21:31:40 +0000 (16:31 -0500)

tempfile: avoid "ferror | fclose" trick

The current code wants to record an error condition from
either ferror() or fclose(), but makes sure that we always
call both functions. So it can't use logical-OR "||", which
would short-circuit when ferror() is true. Instead, it uses
bitwise-OR "|" to evaluate both functions and set one or
more bits in the "err" flag if they reported a failure.

Unlike logical-OR, though, bitwise-OR does not introduce a
sequence point, and the order of evaluation for its operands
is unspecified. So a compiler would be free to generate code
which calls fclose() first, and then ferror() on the
now-freed filehandle.

There's no indication that this has happened in practice,
but let's write it out in a way that follows the standard.

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

config.txt: fix formatting of submodule.alternateErrorS... David Pursehouse Thu, 16 Feb 2017 05:05:35 +0000 (14:05 +0900)

config.txt: fix formatting of submodule.alternateErrorStrategy section

Add missing `::` after the title.

Signed-off-by: David Pursehouse <dpursehouse@collab.net>
Acked-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

reset: add an example of how to split a commit into twoJacob Keller Thu, 16 Feb 2017 00:22:12 +0000 (16:22 -0800)

reset: add an example of how to split a commit into two

It is often useful to break a commit into multiple parts that are more
logical separations. This can be tricky to learn how to do without the
brute-force method if re-writing code or commit messages from scratch.

Add a section to the git-reset documentation which shows an example
process for how to use git add -p and git commit -c HEAD@{1} to
interactively break a commit apart and re-use the original commit
message as a starting point when making the new commit message.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Revert "reset: add an example of how to split a commit... Junio C Hamano Thu, 16 Feb 2017 21:35:50 +0000 (13:35 -0800)

Revert "reset: add an example of how to split a commit into two"

This reverts commit 7326451bedaa67d29afe02184b166e28d9393c91; a
better rewrite will be queued separately.

l10n: update Catalan translationJordi Mas Thu, 16 Feb 2017 04:10:04 +0000 (05:10 +0100)

l10n: update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>

A bit more for -rc2Junio C Hamano Wed, 15 Feb 2017 22:58:25 +0000 (14:58 -0800)

A bit more for -rc2

Merge branch 'tg/stash-doc-cleanup'Junio C Hamano Wed, 15 Feb 2017 22:56:41 +0000 (14:56 -0800)

Merge branch 'tg/stash-doc-cleanup'

The documentation explained what "git stash" does to the working
tree (after stashing away the local changes) in terms of "reset
--hard", which was exposing an unnecessary implementation detail.

* tg/stash-doc-cleanup:
Documentation/stash: remove mention of git reset --hard

Merge branch 'jk/doc-submodule-markup-fix'Junio C Hamano Wed, 15 Feb 2017 22:56:40 +0000 (14:56 -0800)

Merge branch 'jk/doc-submodule-markup-fix'

Doc markup fix.

* jk/doc-submodule-markup-fix:
docs/git-submodule: fix unbalanced quote

Merge branch 'jk/doc-remote-helpers-markup-fix'Junio C Hamano Wed, 15 Feb 2017 22:56:40 +0000 (14:56 -0800)

Merge branch 'jk/doc-remote-helpers-markup-fix'

Doc markup fix.

* jk/doc-remote-helpers-markup-fix:
docs/gitremote-helpers: fix unbalanced quotes

Merge branch 'sb/doc-unify-bottom'Junio C Hamano Wed, 15 Feb 2017 20:54:20 +0000 (12:54 -0800)

Merge branch 'sb/doc-unify-bottom'

Doc clean-up.

* sb/doc-unify-bottom:
Documentation: unify bottom "part of git suite" lines

Merge branch 'sb/push-options-via-transport'Junio C Hamano Wed, 15 Feb 2017 20:54:19 +0000 (12:54 -0800)

Merge branch 'sb/push-options-via-transport'

The push-options given via the "--push-options" option were not
passed through to external remote helpers such as "smart HTTP" that
are invoked via the transport helper.

* sb/push-options-via-transport:
push options: pass push options to the transport helper

Merge branch 'cw/completion'Junio C Hamano Wed, 15 Feb 2017 20:54:19 +0000 (12:54 -0800)

Merge branch 'cw/completion'

More command line completion (in contrib/) for recent additions.

* cw/completion:
completion: recognize more long-options
completion: teach remote subcommands to complete options
completion: teach replace to complete options
completion: teach ls-remote to complete options
completion: improve bash completion for git-add
completion: add subcommand completion for rerere
completion: teach submodule subcommands to complete options

Merge branch 'rs/swap'Junio C Hamano Wed, 15 Feb 2017 20:54:19 +0000 (12:54 -0800)

Merge branch 'rs/swap'

Code clean-up.

* rs/swap:
graph: use SWAP macro
diff: use SWAP macro
use SWAP macro
apply: use SWAP macro
add SWAP macro

Merge branch 'sb/submodule-doc'Junio C Hamano Wed, 15 Feb 2017 20:54:18 +0000 (12:54 -0800)

Merge branch 'sb/submodule-doc'

Doc updates.

* sb/submodule-doc:
submodule update documentation: don't repeat ourselves
submodule documentation: add options to the subcommand

mingw: make stderr unbuffered againJohannes Schindelin Mon, 13 Feb 2017 22:34:06 +0000 (23:34 +0100)

mingw: make stderr unbuffered again

When removing the hack for isatty(), we actually removed more than just
an isatty() hack: we removed the hack where internal data structures of
the MSVC runtime are modified in order to redirect stdout/stderr.

Instead of using that hack (that does not work with newer versions of
the runtime, anyway), we replaced it by reopening the respective file
descriptors.

What we forgot was to mark stderr as unbuffered again.

Reported by Hannes Sixt. Fixed with Jeff Hostetler's assistance.

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

rm: reuse strbuf for all remove_dir_recursively() calls... René Scharfe Sat, 11 Feb 2017 19:51:08 +0000 (20:51 +0100)

rm: reuse strbuf for all remove_dir_recursively() calls, again

Don't throw the memory allocated for remove_dir_recursively() away after
a single call, use it for the other entries as well instead.

This change was done before in deb8e15a (rm: reuse strbuf for all
remove_dir_recursively() calls), but was reverted as a side-effect of
55856a35 (rm: absorb a submodules git dir before deletion). Reinstate
the optimization.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/stash: remove mention of git reset -... Thomas Gummerer Sun, 12 Feb 2017 21:54:14 +0000 (21:54 +0000)

Documentation/stash: remove mention of git reset --hard

Don't mention git reset --hard in the documentation for git stash save.
It's an implementation detail that doesn't matter to the end user and
thus shouldn't be exposed to them. In addition it's not quite true for
git stash -p, and will not be true when a filename argument to limit the
stash to a few files is introduced.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

docs/git-submodule: fix unbalanced quoteJeff King Mon, 13 Feb 2017 21:05:49 +0000 (16:05 -0500)

docs/git-submodule: fix unbalanced quote

The documentation gives an example of the submodule foreach
command that uses both backticks and single-quotes. We stick
the whole thing inside "+" markers to make it monospace, but
the inside punctuation still needs escaping. We handle the
backticks with "{backtick}", and use backslash-escaping for
the single-quotes.

But we missed the escaping on the second quote. Fortunately,
asciidoc renders this unbalanced quote as we want (showing
the quote), but asciidoctor does not. We could fix it by
adding the missing backslash.

However, let's take a step back. Even when rendered
correctly, it's hard to read a long command stuck into the
middle of a paragraph, and the important punctuation is hard
to notice. Let's instead bump it into its own single-line
code block. That makes both the source and the rendered
result more readable, and as a bonus we don't have to worry
about quoting at all.

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

docs/gitremote-helpers: fix unbalanced quotesJeff King Mon, 13 Feb 2017 20:38:35 +0000 (15:38 -0500)

docs/gitremote-helpers: fix unbalanced quotes

Each of these options is missing the closing single-quote on
the option name. This understandably confuses asciidoc,
which ends up rendering a stray quote, like:

option cloning {'true|false}

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

completion: restore removed line continuating backslashSZEDER Gábor Mon, 13 Feb 2017 19:20:36 +0000 (20:20 +0100)

completion: restore removed line continuating backslash

Recent commit 1cd23e9e0 (completion: don't use __gitdir() for git
commands, 2017-02-03) rewrapped a couple of long lines, and while
doing so it inadvertently removed a '\' from the end of a line, thus
breaking completion for 'git config remote.name.push <TAB>'.

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

ls-files: move only kept cache entries in prune_cache()René Scharfe Fri, 10 Feb 2017 20:03:30 +0000 (21:03 +0100)

ls-files: move only kept cache entries in prune_cache()

prune_cache() first identifies those entries at the start of the sorted
array that can be discarded. Then it moves the rest of the entries up.
Last it identifies the unwanted trailing entries among the moved ones
and cuts them off.

Change the order: Identify both start *and* end of the range to keep
first and then move only those entries to the top. The resulting code
is slightly shorter and a bit more efficient.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: pass prefix length explicitly to prune_cache()René Scharfe Fri, 10 Feb 2017 19:42:28 +0000 (20:42 +0100)

ls-files: pass prefix length explicitly to prune_cache()

The function prune_cache() relies on the fact that it is only called on
max_prefix and sneakily uses the matching global variable max_prefix_len
directly. Tighten its interface by passing both the string and its
length as parameters. While at it move the NULL check into the function
to collect all cache-pruning related logic in one place.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of git://github.com/nafmo/git... Jiang Xin Mon, 13 Feb 2017 16:19:11 +0000 (00:19 +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 (3137t0f0u)

Merge branch 'fr_v2.11.0_rnd1' of git://github.com... Jiang Xin Mon, 13 Feb 2017 16:17:21 +0000 (00:17 +0800)

Merge branch 'fr_v2.11.0_rnd1' of git://github.com/jnavila/git

* 'fr_v2.11.0_rnd1' of git://github.com/jnavila/git:
l10n: fr.po: v2.11-rc0 first round
l10n: fr.po: Fix a typo in the French translation
l10n: fr.po: Remove gender specific adjectives
l10n: fr.po: Fix typos

cocci: detect useless free(3) callsRené Scharfe Sat, 11 Feb 2017 13:58:44 +0000 (14:58 +0100)

cocci: detect useless free(3) calls

Add a semantic patch for removing checks that cause free(3) to only be
called with a NULL pointer, as that must be a programming mistake.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: sv.po: Update Swedish translation (3137t0f0u)Peter Krefting Sat, 11 Feb 2017 19:19:48 +0000 (20:19 +0100)

l10n: sv.po: Update Swedish translation (3137t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>

l10n: fr.po: v2.11-rc0 first roundJean-Noel Avila Wed, 8 Feb 2017 20:36:33 +0000 (21:36 +0100)

l10n: fr.po: v2.11-rc0 first round

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

l10n: ko.po: Update Korean translationChangwoo Ryu Sat, 11 Feb 2017 02:29:32 +0000 (11:29 +0900)

l10n: ko.po: Update Korean translation

Signed-off-by: Changwoo Ryu <cwryu@debian.org>

git-p4: fix git-p4.pathEncoding for removed filesLars Schneider Thu, 9 Feb 2017 15:06:56 +0000 (16:06 +0100)

git-p4: fix git-p4.pathEncoding for removed files

In a9e38359e3 we taught git-p4 a way to re-encode path names from what
was used in Perforce to UTF-8. This path re-encoding worked properly for
"added" paths. "Removed" paths were not re-encoded and therefore
different from the "added" paths. Consequently, these files were not
removed in a git-p4 cloned Git repository because the path names did not
match.

Fix this by moving the re-encoding to a place that affects "added" and
"removed" paths. Add a test to demonstrate the issue.

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

connect.c: stop conflating ssh command names and overridesJunio C Hamano Thu, 9 Feb 2017 17:20:25 +0000 (09:20 -0800)

connect.c: stop conflating ssh command names and overrides

dd33e07766 ("connect: Add the envvar GIT_SSH_VARIANT and ssh.variant
config", 2017-02-01) attempted to add support for configuration and
environment variable to override the different handling of
port_option and needs_batch settings suitable for variants of the
ssh implementation that was autodetected by looking at the ssh
command name. Because it piggybacked on the code that turns command
name to specific override (e.g. "plink.exe" and "plink" means
port_option needs to be set to 'P' instead of the default 'p'), yet
it defined a separate namespace for these overrides (e.g. "putty"
can be usable to signal that port_option needs to be 'P'), however,
it made the auto-detection based on the command name less robust
(e.g. the code now accepts "putty" as a SSH command name and applies
the same override).

Separate the code that interprets the override that was read from
the configuration & environment from the original code that handles
the command names, as they are in separate namespaces, to fix this
confusion.

This incidentally also makes it easier for future enhancement of the
override syntax (e.g. "port_option=p,needs_batch=1" may want to be
accepted as a more explicit syntax) without affecting the code for
auto-detection based on the command name.

While at it, update the return type of the handle_ssh_variant()
helper function to void; the caller does not use it, and the
function does not return any meaningful value.

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

pathspec: don't error out on all-exclusionary pathspec... Linus Torvalds Wed, 8 Feb 2017 05:08:15 +0000 (21:08 -0800)

pathspec: don't error out on all-exclusionary pathspec patterns

Instead of erroring out and telling the user that they should add a
positive pattern that covers everything else, just _do_ that.

For commands where we honor the current cwd by default (ie grep, ls-files
etc), we make that default positive pathspec be the current working
directory. And for commands that default to the whole project (ie diff,
log, etc), the default positive pathspec is the whole project.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pathspec magic: add '^' as alias for '!'Linus Torvalds Wed, 8 Feb 2017 05:05:28 +0000 (21:05 -0800)

pathspec magic: add '^' as alias for '!'

The choice of '!' for a negative pathspec ends up not only not matching
what we do for revisions, it's also a horrible character for shell
expansion since it needs quoting.

So add '^' as an alternative alias for an excluding pathspec entry.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.12-rc1 v2.12.0-rc1Junio C Hamano Fri, 10 Feb 2017 20:54:23 +0000 (12:54 -0800)

Git 2.12-rc1

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

Merge branch 'nd/rev-list-all-includes-HEAD-doc'Junio C Hamano Fri, 10 Feb 2017 20:52:27 +0000 (12:52 -0800)

Merge branch 'nd/rev-list-all-includes-HEAD-doc'

Doc update.

* nd/rev-list-all-includes-HEAD-doc:
rev-list-options.txt: update --all about HEAD

Merge branch 'rs/fill-directory-optim'Junio C Hamano Fri, 10 Feb 2017 20:52:27 +0000 (12:52 -0800)

Merge branch 'rs/fill-directory-optim'

Code clean-up.

* rs/fill-directory-optim:
dir: avoid allocation in fill_directory()

Merge branch 'jk/log-graph-name-only'Junio C Hamano Fri, 10 Feb 2017 20:52:26 +0000 (12:52 -0800)

Merge branch 'jk/log-graph-name-only'

"git log --graph" did not work well with "--name-only", even though
other forms of "diff" output were handled correctly.

* jk/log-graph-name-only:
diff: print line prefix for --name-only output

Merge branch 'da/t7800-cleanup'Junio C Hamano Fri, 10 Feb 2017 20:52:26 +0000 (12:52 -0800)

Merge branch 'da/t7800-cleanup'

Test updates.

* da/t7800-cleanup:
t7800: replace "wc -l" with test_line_count

Merge branch 'dl/difftool-doc-no-gui-option'Junio C Hamano Fri, 10 Feb 2017 20:52:26 +0000 (12:52 -0800)

Merge branch 'dl/difftool-doc-no-gui-option'

Doc update.

* dl/difftool-doc-no-gui-option:
Document the --no-gui option in difftool

Merge branch 'js/difftool-builtin'Junio C Hamano Fri, 10 Feb 2017 20:52:25 +0000 (12:52 -0800)

Merge branch 'js/difftool-builtin'

A few hot-fixes to C-rewrite of "git difftool".

* js/difftool-builtin:
t7800: simplify basic usage test
difftool: fix bug when printing usage

Merge branch 'rs/p5302-create-repositories-before-tests'Junio C Hamano Fri, 10 Feb 2017 20:52:25 +0000 (12:52 -0800)

Merge branch 'rs/p5302-create-repositories-before-tests'

Adjust a perf test to new world order where commands that do
require a repository are really strict about having a repository.

* rs/p5302-create-repositories-before-tests:
p5302: create repositories for index-pack results explicitly

Merge branch 'ps/worktree-prune-help-fix'Junio C Hamano Fri, 10 Feb 2017 20:52:25 +0000 (12:52 -0800)

Merge branch 'ps/worktree-prune-help-fix'

Incorrect usage help message for "git worktree prune" has been fixed.

* ps/worktree-prune-help-fix:
worktree: fix option descriptions for `prune`

Merge branch 'ew/complete-svn-authorship-options'Junio C Hamano Fri, 10 Feb 2017 20:52:24 +0000 (12:52 -0800)

Merge branch 'ew/complete-svn-authorship-options'

Correct command line completion (in contrib/) on "git svn"

* ew/complete-svn-authorship-options:
completion: fix git svn authorship switches

Merge branch 'jk/reset-to-break-a-commit-doc'Junio C Hamano Fri, 10 Feb 2017 20:52:23 +0000 (12:52 -0800)

Merge branch 'jk/reset-to-break-a-commit-doc'

A minor doc update.

* jk/reset-to-break-a-commit-doc:
reset: add an example of how to split a commit into two

Merge branch 'bw/push-submodule-only'Junio C Hamano Fri, 10 Feb 2017 20:52:23 +0000 (12:52 -0800)

Merge branch 'bw/push-submodule-only'

Add missing documentation update to a recent topic.

* bw/push-submodule-only:
completion: add completion for --recurse-submodules=only
doc: add doc for git-push --recurse-submodules=only

Documentation: unify bottom "part of git suite" linesStefan Beller Thu, 9 Feb 2017 01:29:30 +0000 (17:29 -0800)

Documentation: unify bottom "part of git suite" lines

We currently have 168 man pages that mention they are part of Git, you
can check yourself easily via:
$ git grep "Part of the linkgit:git\[1\] suite" |wc -l
168
However some have a trailing period, i.e.
$ git grep "Part of the linkgit:git\[1\] suite." |wc -l
8

Unify the bottom line in all man pages to not end with a period.

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