git
8 years agoMerge branch 'bd/readme.markdown-more'
Junio C Hamano [Fri, 3 Jun 2016 21:38:02 +0000 (14:38 -0700)] 
Merge branch 'bd/readme.markdown-more'

The mark-up in the top-level README.md file has been updated to
typeset CLI command names differently from the body text.

* bd/readme.markdown-more:
  README.md: format CLI commands with code syntax

8 years agoMerge branch 'mm/makefile-developer-can-be-in-config-mak'
Junio C Hamano [Fri, 3 Jun 2016 21:38:02 +0000 (14:38 -0700)] 
Merge branch 'mm/makefile-developer-can-be-in-config-mak'

"make DEVELOPER=1" worked as expected; setting DEVELOPER=1 in
config.mak didn't.

* mm/makefile-developer-can-be-in-config-mak:
  Makefile: add $(DEVELOPER_CFLAGS) variable
  Makefile: move 'ifdef DEVELOPER' after config.mak* inclusion

8 years agoMerge branch 'em/man-bold-literal'
Junio C Hamano [Fri, 3 Jun 2016 21:38:02 +0000 (14:38 -0700)] 
Merge branch 'em/man-bold-literal'

The manpage output of our documentation did not render well in
terminal; typeset literals in bold by default to make them stand
out more.

* em/man-bold-literal:
  Documentation: bold literals in man

8 years agoMerge branch 'pa/cherry-pick-doc-typo'
Junio C Hamano [Fri, 3 Jun 2016 21:38:02 +0000 (14:38 -0700)] 
Merge branch 'pa/cherry-pick-doc-typo'

"git cherry-pick --help" had three instances of word "behavior",
one of which was spelled "behaviour", which is updated to match the
other two.

* pa/cherry-pick-doc-typo:
  git-cherry-pick.txt: correct a small typo

8 years agoMerge branch 'mr/send-email-doc-gmail-2fa'
Junio C Hamano [Fri, 3 Jun 2016 21:38:01 +0000 (14:38 -0700)] 
Merge branch 'mr/send-email-doc-gmail-2fa'

Typofix.

* mr/send-email-doc-gmail-2fa:
  Documentation/git-send-email: fix typo in gmail 2FA section

8 years agoMerge branch 'js/rebase-i-dedup-call-to-rerere'
Junio C Hamano [Fri, 3 Jun 2016 21:38:01 +0000 (14:38 -0700)] 
Merge branch 'js/rebase-i-dedup-call-to-rerere'

"git rebase -i", after it fails to auto-resolve the conflict, had
an unnecessary call to "git rerere" from its very early days, which
was spotted recently; the call has been removed.

* js/rebase-i-dedup-call-to-rerere:
  rebase -i: remove an unnecessary 'rerere' invocation

8 years agoMerge branch 'js/perf-rebase-i'
Junio C Hamano [Fri, 3 Jun 2016 21:38:00 +0000 (14:38 -0700)] 
Merge branch 'js/perf-rebase-i'

The one in 'master' has a brown-paper-bag bug that breaks the perf
test when used inside a usual Git repository with a working tree.

* js/perf-rebase-i:
  perf: make the tests work without a worktree

8 years agoDocumentation/git-send-email: fix typo in gmail 2FA section
SZEDER Gábor [Wed, 1 Jun 2016 23:37:41 +0000 (01:37 +0200)] 
Documentation/git-send-email: fix typo in gmail 2FA section

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMakefile: add $(DEVELOPER_CFLAGS) variable
Matthieu Moy [Wed, 1 Jun 2016 08:00:08 +0000 (10:00 +0200)] 
Makefile: add $(DEVELOPER_CFLAGS) variable

This does not change the behavior, but allows the user to tweak
DEVELOPER_CFLAGS on the command-line or in a config.mak* file if
needed.

This also makes the code somewhat cleaner as it follows the pattern

<initialisation of variables>
<include statements>
<actual build logic>

by specifying which flags to activate in the first part, and actually
activating them in the last one.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.9-rc1 v2.9.0-rc1
Junio C Hamano [Tue, 31 May 2016 21:07:08 +0000 (14:07 -0700)] 
Git 2.9-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'maint'
Junio C Hamano [Tue, 31 May 2016 21:12:08 +0000 (14:12 -0700)] 
Merge branch 'maint'

* maint:
  More topics for 2.8.4

8 years agoMore topics for 2.8.4
Junio C Hamano [Tue, 31 May 2016 21:11:38 +0000 (14:11 -0700)] 
More topics for 2.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'sb/submodule-deinit-all' into maint
Junio C Hamano [Tue, 31 May 2016 21:09:46 +0000 (14:09 -0700)] 
Merge branch 'sb/submodule-deinit-all' into maint

Correct faulty recommendation to use "git submodule deinit ." when
de-initialising all submodules, which would result in a strange
error message in a pathological corner case.

* sb/submodule-deinit-all:
  submodule deinit: require '--all' instead of '.' for all submodules

8 years agoMerge branch 'bn/http-cookiefile-config' into maint
Junio C Hamano [Tue, 31 May 2016 21:08:28 +0000 (14:08 -0700)] 
Merge branch 'bn/http-cookiefile-config' into maint

"http.cookieFile" configuration variable clearly wants a pathname,
but we forgot to treat it as such by e.g. applying tilde expansion.

* bn/http-cookiefile-config:
  http: expand http.cookieFile as a path
  Documentation: config: improve word ordering for http.cookieFile

8 years agoMerge branch 'jk/test-send-sh-x-trace-elsewhere' into maint
Junio C Hamano [Tue, 31 May 2016 21:08:27 +0000 (14:08 -0700)] 
Merge branch 'jk/test-send-sh-x-trace-elsewhere' into maint

Running tests with '-x' option to trace the individual command
executions is a useful way to debug test scripts, but some tests
that capture the standard error stream and check what the command
said can be broken with the trace output mixed in.  When running
our tests under "bash", however, we can redirect the trace output
to another file descriptor to keep the standard error of programs
being tested intact.

* jk/test-send-sh-x-trace-elsewhere:
  test-lib: set BASH_XTRACEFD automatically

8 years agoMerge branch 'js/name-rev-use-oldest-ref' into maint
Junio C Hamano [Tue, 31 May 2016 21:08:26 +0000 (14:08 -0700)] 
Merge branch 'js/name-rev-use-oldest-ref' into maint

"git describe --contains" often made a hard-to-justify choice of
tag to give name to a given commit, because it tried to come up
with a name with smallest number of hops from a tag, causing an old
commit whose close descendant that is recently tagged were not
described with respect to an old tag but with a newer tag.  It did
not help that its computation of "hop" count was further tweaked to
penalize being on a side branch of a merge.  The logic has been
updated to favor using the tag with the oldest tagger date, which
is a lot easier to explain to the end users: "We describe a commit
in terms of the (chronologically) oldest tag that contains the
commit."

* js/name-rev-use-oldest-ref:
  name-rev: include taggerdate in considering the best name

8 years agorebase -i: remove an unnecessary 'rerere' invocation
Johannes Sixt [Fri, 27 May 2016 16:28:21 +0000 (18:28 +0200)] 
rebase -i: remove an unnecessary 'rerere' invocation

Interactive rebase uses 'git cherry-pick' and 'git merge' to replay
commits. Both invoke the 'rerere' machinery when they fail due to merge
conflicts. Note that all code paths with these two commands also invoke
the shell function die_with_patch when the commands fail.

Since commit 629716d2 ("rerere: do use multiple variants") the second
operation of the rerere machinery can be observed by a duplicated
message "Recorded preimage for 'file'". This second operation records
the same preimage as the first one and, hence, only wastes cycles.
Remove the 'git rerere' invocation from die_with_patch.

Shell function die_with_patch can be called after the failure of
"git commit", too, which also calls into the rerere machinery, but it
does so only after a successful commit to record the resolution.
Therefore, it is wrong to call 'git rerere' from die_with_patch after
"git commit" fails.

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>
8 years agoperf: make the tests work without a worktree
René Scharfe [Sun, 29 May 2016 16:43:41 +0000 (18:43 +0200)] 
perf: make the tests work without a worktree

In regular repositories $source_git and $objects_dir contain relative
paths based on $source.  Go there to allow cp to resolve them.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'es/t1500-modernize'
Junio C Hamano [Tue, 31 May 2016 19:40:55 +0000 (12:40 -0700)] 
Merge branch 'es/t1500-modernize'

test updates to make it more readable and maintainable.

* es/t1500-modernize:
  t1500: avoid setting environment variables outside of tests
  t1500: avoid setting configuration options outside of tests
  t1500: avoid changing working directory outside of tests
  t1500: test_rev_parse: facilitate future test enhancements
  t1500: be considerate to future potential tests

8 years agoMerge branch 'jk/cat-file-buffered-batch-all'
Junio C Hamano [Tue, 31 May 2016 19:40:54 +0000 (12:40 -0700)] 
Merge branch 'jk/cat-file-buffered-batch-all'

"git cat-file --batch-all" has been sped up, by taking advantage
of the fact that it does not have to read a list of objects, in two
ways.

* jk/cat-file-buffered-batch-all:
  cat-file: default to --buffer when --batch-all-objects is used
  cat-file: avoid noop calls to sha1_object_info_extended

8 years agoMerge branch 'fc/fast-import-broken-marks-file'
Junio C Hamano [Tue, 31 May 2016 19:40:53 +0000 (12:40 -0700)] 
Merge branch 'fc/fast-import-broken-marks-file'

"git fast-import --export-marks" would overwrite the existing marks
file even when it makes a dump from its custom die routine.
Prevent it from doing so when we have an import-marks file but
haven't finished reading it.

* fc/fast-import-broken-marks-file:
  fast-import: do not truncate exported marks file

8 years agoDocumentation: bold literals in man
Erwan Mathoniere [Tue, 31 May 2016 16:20:33 +0000 (18:20 +0200)] 
Documentation: bold literals in man

Backticks are emphasized through monospaced styling in the HTML
version of Git documentation. But they were left unstyled in the
manual pages.

To make the man pages more comfortably read, `MAN_BOLD_LITERAL` was
added by 5121a6d (Documentation: option to render literal text as
bold for manpages, 2009-03-27).  It allowed the user to build the
manpages with literals in bold style.

For precaution it was not set by default back then.

Since 79c461d (docs: default to more modern toolset, 2010-11-19), it
is assumed ASCIIDOC 8 and at least docbook-xsl 1.73 are used, so the
need for compatibility concern is much lessor now.

Remove `MAN_BOLD_LITERAL`, and typeset literals as bold by default .
Add `NO_MAN_BOLD_LITERAL`, a new Makefile option, disabling this
feature when defined.

Signed-off-by: Erwan MATHONIERE <erwan.mathoniere@grenoble-inp.org>
Signed-off-by: Samuel GROOT <samuel.groot@grenoble-inp.org>
Signed-off-by: Tom RUSSELLO <tom.russello@grenoble-inp.org>
Signed-off-by: Matthieu MOY <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMakefile: move 'ifdef DEVELOPER' after config.mak* inclusion
Matthieu Moy [Tue, 31 May 2016 13:24:43 +0000 (15:24 +0200)] 
Makefile: move 'ifdef DEVELOPER' after config.mak* inclusion

The DEVELOPER knob was introduced in 658df95 (add DEVELOPER makefile
knob to check for acknowledged warnings, 2016-02-25), and works well
when used as "make DEVELOPER=1", and when the configure script was not
used.

However, the advice given in CodingGuidelines to add DEVELOPER=1 to
config.mak does not: config.mak is included after testing for
DEVELOPER in the Makefile, and at least GNU Make's manual specifies
"Conditional directives are parsed immediately", hence the config.mak
declaration is not visible at the time the conditional is evaluated.

Also, when using the configure script to generate a
config.mak.autogen, the later file contained a "CFLAGS = <flags>"
initialization, which overrode the "CFLAGS += -W..." triggered by
DEVELOPER.

This patch fixes both issues.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoREADME.md: format CLI commands with code syntax
Benjamin Dopplinger [Mon, 30 May 2016 03:08:16 +0000 (03:08 +0000)] 
README.md: format CLI commands with code syntax

CLI commands which are mentioned in the readme are now formatted with
the Markdown code syntax to make the documentation more readable.

Signed-off-by: Benjamin Dopplinger <b.dopplinger@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoFinal batch before 2.9-rc1
Junio C Hamano [Mon, 30 May 2016 01:08:26 +0000 (18:08 -0700)] 
Final batch before 2.9-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'ak/t0008-ksh88-workaround'
Junio C Hamano [Mon, 30 May 2016 01:06:44 +0000 (18:06 -0700)] 
Merge branch 'ak/t0008-ksh88-workaround'

Test portability workaround.

* ak/t0008-ksh88-workaround:
  t0008: 4 tests fail with ksh88

8 years agoMerge branch 'js/t6044-use-test-seq'
Junio C Hamano [Mon, 30 May 2016 01:06:43 +0000 (18:06 -0700)] 
Merge branch 'js/t6044-use-test-seq'

Test portability fix.

* js/t6044-use-test-seq:
  t6044: replace seq by test_seq

8 years agoMerge branch 'ak/t4204-shell-portability'
Junio C Hamano [Mon, 30 May 2016 01:06:43 +0000 (18:06 -0700)] 
Merge branch 'ak/t4204-shell-portability'

Update a test to run also under ksh88.

* ak/t4204-shell-portability:
  t4204: do not let $name variable clobbered

8 years agoMerge branch 'rj/log-decorate-auto'
Junio C Hamano [Mon, 30 May 2016 01:06:42 +0000 (18:06 -0700)] 
Merge branch 'rj/log-decorate-auto'

We forgot to add "git log --decorate=auto" to documentation when we
added the feature back in v2.1.0 timeframe.

* rj/log-decorate-auto:
  log: document the --decorate=auto option

8 years agoMerge branch 'mr/send-email-doc-gmail-2fa'
Junio C Hamano [Mon, 30 May 2016 01:06:42 +0000 (18:06 -0700)] 
Merge branch 'mr/send-email-doc-gmail-2fa'

Give hints to GMail users with two-factor auth enabled that
they need app-specific-password when using send-email.

* mr/send-email-doc-gmail-2fa:
  Documentation: add instructions to help setup gmail 2FA

8 years agoMerge branch 'kb/msys2-tty'
Junio C Hamano [Mon, 30 May 2016 01:06:41 +0000 (18:06 -0700)] 
Merge branch 'kb/msys2-tty'

The "are we talking with TTY, doing an interactive session?"
detection has been updated to work better for "Git for Windows".

* kb/msys2-tty:
  mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)

8 years agogit-cherry-pick.txt: correct a small typo
Pablo Santiago Blum de Aguiar [Sun, 29 May 2016 19:29:29 +0000 (16:29 -0300)] 
git-cherry-pick.txt: correct a small typo

Most of the document mentions `behavior` instead of the British
variation, `behaviour`. This change makes it consistent.

Signed-off-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoDocumentation: add instructions to help setup gmail 2FA
Michael Rappazzo [Fri, 27 May 2016 20:39:57 +0000 (16:39 -0400)] 
Documentation: add instructions to help setup gmail 2FA

For those who use two-factor authentication with gmail, git-send-email
will not work unless it is setup with an app-specific password. The
example for setting up git-send-email for use with gmail will now
include information on generating and storing the app-specific password.

Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agolog: document the --decorate=auto option
Ramsay Jones [Fri, 27 May 2016 15:56:02 +0000 (16:56 +0100)] 
log: document the --decorate=auto option

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoSync with maint
Junio C Hamano [Thu, 26 May 2016 20:28:24 +0000 (13:28 -0700)] 
Sync with maint

* maint:
  Start preparing for 2.8.4
  archive-tar: convert snprintf to xsnprintf

8 years agoStart preparing for 2.8.4
Junio C Hamano [Thu, 26 May 2016 20:21:00 +0000 (13:21 -0700)] 
Start preparing for 2.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'jc/linkgit-fix' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:26 +0000 (13:17 -0700)] 
Merge branch 'jc/linkgit-fix' into maint

Many 'linkgit:<git documentation page>' references were broken,
which are all fixed with this.

* jc/linkgit-fix:
  Documentation: fix linkgit references

8 years agoMerge branch 'ls/travis-build-doc' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:25 +0000 (13:17 -0700)] 
Merge branch 'ls/travis-build-doc' into maint

CI test was taught to build documentation pages.

* ls/travis-build-doc:
  travis-ci: build documentation

8 years agoMerge branch 'jc/fsck-nul-in-commit' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:24 +0000 (13:17 -0700)] 
Merge branch 'jc/fsck-nul-in-commit' into maint

"git fsck" learned to catch NUL byte in a commit object as
potential error and warn.

* jc/fsck-nul-in-commit:
  fsck: detect and warn a commit with embedded NUL
  fsck_commit_buffer(): do not special case the last validation

8 years agoMerge branch 'jk/rebase-interative-eval-fix' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:24 +0000 (13:17 -0700)] 
Merge branch 'jk/rebase-interative-eval-fix' into maint

Portability enhancement for "rebase -i" to help platforms whose
shell does not like "for i in <empty>" (which is not POSIX-kosher).

* jk/rebase-interative-eval-fix:
  rebase--interactive: avoid empty list in shell for-loop

8 years agoMerge branch 'js/windows-dotgit' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:23 +0000 (13:17 -0700)] 
Merge branch 'js/windows-dotgit' into maint

On Windows, .git and optionally any files whose name starts with a
dot are now marked as hidden, with a core.hideDotFiles knob to
customize this behaviour.

* js/windows-dotgit:
  mingw: remove unnecessary definition
  mingw: introduce the 'core.hideDotFiles' setting

8 years agoMerge branch 'kf/gpg-sig-verification-doc' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:22 +0000 (13:17 -0700)] 
Merge branch 'kf/gpg-sig-verification-doc' into maint

Documentation for "git merge --verify-signatures" has been updated
to clarify that the signature of only the commit at the tip is
verified.  Also the phrasing used for signature and key validity is
adjusted to align with that used by OpenPGP.

* kf/gpg-sig-verification-doc:
  Documentation: clarify signature verification

8 years agoMerge branch 'lp/typofixes' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:21 +0000 (13:17 -0700)] 
Merge branch 'lp/typofixes' into maint

Typofixes.

* lp/typofixes:
  typofix: assorted typofixes in comments, documentation and messages

8 years agoMerge branch 'sb/z-is-gnutar-ism' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:21 +0000 (13:17 -0700)] 
Merge branch 'sb/z-is-gnutar-ism' into maint

Test fix.

* sb/z-is-gnutar-ism:
  t6041: do not compress backup tar file
  t3513: do not compress backup tar file

8 years agoMerge branch 'va/i18n-misc-updates' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:20 +0000 (13:17 -0700)] 
Merge branch 'va/i18n-misc-updates' into maint

Mark several messages for translation.

* va/i18n-misc-updates:
  i18n: unpack-trees: avoid substituting only a verb in sentences
  i18n: builtin/pull.c: split strings marked for translation
  i18n: builtin/pull.c: mark placeholders for translation
  i18n: git-parse-remote.sh: mark strings for translation
  i18n: branch: move comment for translators
  i18n: branch: unmark string for translation
  i18n: builtin/rm.c: remove a comma ',' from string
  i18n: unpack-trees: mark strings for translation
  i18n: builtin/branch.c: mark option for translation
  i18n: index-pack: use plural string instead of normal one

8 years agoMerge branch 'bn/config-doc-tt-varnames' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:19 +0000 (13:17 -0700)] 
Merge branch 'bn/config-doc-tt-varnames' into maint

Doc formatting fixes.

* bn/config-doc-tt-varnames:
  config: consistently format $variables in monospaced font
  config: describe 'pathname' value type

8 years agoMerge branch 'nd/remote-plural-ours-plus-theirs' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:18 +0000 (13:17 -0700)] 
Merge branch 'nd/remote-plural-ours-plus-theirs' into maint

Message fix.

* nd/remote-plural-ours-plus-theirs:
  remote.c: specify correct plural form in "commit diverge" message

8 years agoMerge branch 'ak/t4151-ls-files-could-be-empty' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:17 +0000 (13:17 -0700)] 
Merge branch 'ak/t4151-ls-files-could-be-empty' into maint

Test fix.

* ak/t4151-ls-files-could-be-empty:
  t4151: make sure argument to 'test -z' is given

8 years agoMerge branch 'jc/test-seq' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:16 +0000 (13:17 -0700)] 
Merge branch 'jc/test-seq' into maint

Test fix.

* jc/test-seq:
  test-lib-functions.sh: rewrite test_seq without Perl
  test-lib-functions.sh: remove misleading comment on test_seq

8 years agoMerge branch 'tb/t5601-sed-fix' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:15 +0000 (13:17 -0700)] 
Merge branch 'tb/t5601-sed-fix' into maint

Test fix.

* tb/t5601-sed-fix:
  t5601: Remove trailing space in sed expression

8 years agoMerge branch 'va/i18n-remote-comment-to-align' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:14 +0000 (13:17 -0700)] 
Merge branch 'va/i18n-remote-comment-to-align' into maint

Message fix.

* va/i18n-remote-comment-to-align:
  i18n: remote: add comment for translators

8 years agoMerge branch 'va/mailinfo-doc-typofix' into maint
Junio C Hamano [Thu, 26 May 2016 20:17:13 +0000 (13:17 -0700)] 
Merge branch 'va/mailinfo-doc-typofix' into maint

Typofix.

* va/mailinfo-doc-typofix:
  Documentation/git-mailinfo: fix typo

8 years agoMerge branch 'maint-2.7' into maint
Junio C Hamano [Thu, 26 May 2016 20:16:51 +0000 (13:16 -0700)] 
Merge branch 'maint-2.7' into maint

* maint-2.7:
  archive-tar: convert snprintf to xsnprintf

8 years agomingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)
Karsten Blees [Wed, 27 Apr 2016 15:16:37 +0000 (17:16 +0200)] 
mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)

MSYS2 emulates pseudo terminals via named pipes, and isatty() returns 0
for such file descriptors. Therefore, some interactive functionality
(such as launching a pager, asking if a failed unlink should be repeated
etc.) doesn't work when run in a terminal emulator that uses MSYS2's
ptys (such as mintty).

However, MSYS2 uses special names for its pty pipes ('msys-*-pty*'),
which allows us to distinguish them from normal piped input / output.

On startup, check if stdin / stdout / stderr are connected to such pipes
using the NtQueryObject API from NTDll.dll. If the names match, adjust
the flags in MSVCRT's ioinfo structure accordingly.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'jk/war-on-sprintf' into maint-2.7
Junio C Hamano [Thu, 26 May 2016 17:45:37 +0000 (10:45 -0700)] 
Merge branch 'jk/war-on-sprintf' into maint-2.7

* jk/war-on-sprintf:
  archive-tar: convert snprintf to xsnprintf

8 years agoarchive-tar: convert snprintf to xsnprintf
Jeff King [Thu, 26 May 2016 04:28:08 +0000 (00:28 -0400)] 
archive-tar: convert snprintf to xsnprintf

Commit f2f0267 (archive-tar: use xsnprintf for trivial
formatting, 2015-09-24) converted cases of "sprintf" to
"xsnprintf", but accidentally left one as just "snprintf".
This meant that we could silently truncate the resulting
buffer instead of flagging an error.

In practice, this is impossible to achieve, as we are
formatting a ustar checksum, which can be at most 7
characters. But the point of xsnprintf is to document and
check for "should be impossible" conditions; this site was
just accidentally mis-converted during f2f0267.

Noticed-by: Paul Green <Paul.Green@stratus.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agot4204: do not let $name variable clobbered
Junio C Hamano [Mon, 23 May 2016 22:23:56 +0000 (15:23 -0700)] 
t4204: do not let $name variable clobbered

test_patch_id_file_order shell function uses $name variable to hold
one filename, and calls another shell function calc_patch_id as a
downstream of one pipeline.  The called function, however, also uses
the same $name variable.  With a shell implementation that runs the
callee in the current shell environment, the caller's $name would
be clobbered by the callee's use of the same variable.

This hasn't been an issue with dash and bash.  ksh93 reveals the
breakage in the test script.

Fix it by using a distinct variable name in the callee.

Reported-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.9-rc0 v2.9.0-rc0
Junio C Hamano [Mon, 23 May 2016 22:02:48 +0000 (15:02 -0700)] 
Git 2.9-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'svn-travis' of git://bogomips.org/git-svn
Junio C Hamano [Mon, 23 May 2016 22:01:03 +0000 (15:01 -0700)] 
Merge branch 'svn-travis' of git://bogomips.org/git-svn

* 'svn-travis' of git://bogomips.org/git-svn:
  travis-ci: enable Git SVN tests t91xx on Linux

8 years agoMerge branch 'jc/rerere-multi'
Junio C Hamano [Mon, 23 May 2016 21:54:37 +0000 (14:54 -0700)] 
Merge branch 'jc/rerere-multi'

* jc/rerere-multi:
  rerere: remove an null statement
  rerere: plug memory leaks upon "rerere forget" failure

8 years agoMerge branch 'da/difftool'
Junio C Hamano [Mon, 23 May 2016 21:54:36 +0000 (14:54 -0700)] 
Merge branch 'da/difftool'

"git difftool" learned to handle unmerged paths correctly in
dir-diff mode.

* da/difftool:
  difftool: handle unmerged files in dir-diff mode
  difftool: initialize variables for readability

8 years agoMerge branch 'jk/test-z-n-unquoted'
Junio C Hamano [Mon, 23 May 2016 21:54:35 +0000 (14:54 -0700)] 
Merge branch 'jk/test-z-n-unquoted'

t9xxx series has been updated primarily for readability, while
fixing small bugs in it.  A few scripted Porcelains have also been
updated to fix possible bugs around their use of "test -z" and
"test -n".

* jk/test-z-n-unquoted:
  always quote shell arguments to test -z/-n
  t9103: modernize test style
  t9107: switch inverted single/double quotes in test
  t9107: use "return 1" instead of "exit 1"
  t9100,t3419: enclose all test code in single-quotes
  t/lib-git-svn: drop $remote_git_svn and $git_svn_id

8 years agoMerge branch 'ar/diff-args-osx-precompose'
Junio C Hamano [Mon, 23 May 2016 21:54:35 +0000 (14:54 -0700)] 
Merge branch 'ar/diff-args-osx-precompose'

Many commands normalize command line arguments from NFD to NFC
variant of UTF-8 on OSX, but commands in the "diff" family did
not, causing "git diff $path" to complain that no such path is
known to Git.  They have been taught to do the normalization.

* ar/diff-args-osx-precompose:
  diff: run arguments through precompose_argv

8 years agoMerge branch 'jc/doc-lint'
Junio C Hamano [Mon, 23 May 2016 21:54:34 +0000 (14:54 -0700)] 
Merge branch 'jc/doc-lint'

Find common mistakes when writing gitlink: in our documentation and
drive the check from "make check-docs".

I am not entirely happy with the way the script chooses what input
file to validate, but it is not worse than not having anything, so
let's move it forward and have the logic improved later when people
care about it deeply.

* jc/doc-lint:
  ci: validate "linkgit:" in documentation

8 years agoMerge branch 'js/perf-rebase-i'
Junio C Hamano [Mon, 23 May 2016 21:54:33 +0000 (14:54 -0700)] 
Merge branch 'js/perf-rebase-i'

Add perf test for "rebase -i"

* js/perf-rebase-i:
  perf: run "rebase -i" under perf
  perf: make the tests work in worktrees
  perf: let's disable symlinks when they are not available

8 years agoMerge branch 'jc/test-parse-options-expect'
Junio C Hamano [Mon, 23 May 2016 21:54:32 +0000 (14:54 -0700)] 
Merge branch 'jc/test-parse-options-expect'

t0040 had too many unnecessary repetitions in its test data.  Teach
test-parse-options program so that a caller can tell what it
expects in its output, so that these repetitions can be cleaned up.

* jc/test-parse-options-expect:
  t0040: convert a few tests to use test-parse-options --expect
  t0040: remove unused test helpers
  test-parse-options: --expect=<string> option to simplify tests
  test-parse-options: fix output when callback option fails

8 years agoMerge branch 'pb/commit-verbose-config'
Junio C Hamano [Mon, 23 May 2016 21:54:31 +0000 (14:54 -0700)] 
Merge branch 'pb/commit-verbose-config'

"git commit" learned to pay attention to "commit.verbose"
configuration variable and act as if "--verbose" option was
given from the command line.

* pb/commit-verbose-config:
  commit: add a commit.verbose config variable
  t7507-commit-verbose: improve test coverage by testing number of diffs
  parse-options.c: make OPTION_COUNTUP respect "unspecified" values
  t/t7507: improve test coverage
  t0040-parse-options: improve test coverage
  test-parse-options: print quiet as integer
  t0040-test-parse-options.sh: fix style issues

8 years agoMerge branch 'xy/format-patch-base'
Junio C Hamano [Mon, 23 May 2016 21:54:31 +0000 (14:54 -0700)] 
Merge branch 'xy/format-patch-base'

"git format-patch" learned a new "--base" option to record what
(public, well-known) commit the original series was built on in
its output.

* xy/format-patch-base:
  format-patch: introduce format.useAutoBase configuration
  format-patch: introduce --base=auto option
  format-patch: add '--base' option to record base tree info
  patch-ids: make commit_patch_id() a public helper function

8 years agoMerge branch 'tb/core-eol-fix'
Junio C Hamano [Mon, 23 May 2016 21:54:30 +0000 (14:54 -0700)] 
Merge branch 'tb/core-eol-fix'

A couple of bugs around core.autocrlf have been fixed.

* tb/core-eol-fix:
  convert.c: ident + core.autocrlf didn't work
  t0027: test cases for combined attributes
  convert: allow core.autocrlf=input and core.eol=crlf
  t0027: make commit_chk_wrnNNO() reliable

8 years agoMerge branch 'nd/worktree-various-heads'
Junio C Hamano [Mon, 23 May 2016 21:54:29 +0000 (14:54 -0700)] 
Merge branch 'nd/worktree-various-heads'

The experimental "multiple worktree" feature gains more safety to
forbid operations on a branch that is checked out or being actively
worked on elsewhere, by noticing that e.g. it is being rebased.

* nd/worktree-various-heads:
  branch: do not rename a branch under bisect or rebase
  worktree.c: check whether branch is bisected in another worktree
  wt-status.c: split bisect detection out of wt_status_get_state()
  worktree.c: check whether branch is rebased in another worktree
  worktree.c: avoid referencing to worktrees[i] multiple times
  wt-status.c: make wt_status_check_rebase() work on any worktree
  wt-status.c: split rebase detection out of wt_status_get_state()
  path.c: refactor and add worktree_git_path()
  worktree.c: mark current worktree
  worktree.c: make find_shared_symref() return struct worktree *
  worktree.c: store "id" instead of "git_dir"
  path.c: add git_common_path() and strbuf_git_common_path()
  dir.c: rename str(n)cmp_icase to fspath(n)cmp

8 years agoMerge branch 'ss/commit-dry-run-resolve-merge-to-no-op'
Junio C Hamano [Mon, 23 May 2016 21:54:28 +0000 (14:54 -0700)] 
Merge branch 'ss/commit-dry-run-resolve-merge-to-no-op'

"git commit --dry-run" reported "No, no, you cannot commit." in one
case where "git commit" would have allowed you to commit, and this
improves it a little bit ("git commit --dry-run --short" still does
not give you the correct answer, for example).  This is a stop-gap
measure in that "commit --short --dry-run" still gives an incorrect
result.

* ss/commit-dry-run-resolve-merge-to-no-op:
  wt-status.c: set commitable bit if there is a meaningful merge.

8 years agotravis-ci: enable Git SVN tests t91xx on Linux
Lars Schneider [Thu, 19 May 2016 09:10:08 +0000 (11:10 +0200)] 
travis-ci: enable Git SVN tests t91xx on Linux

Install the "git-svn" package to make the Perl SVN libraries available
to the Git SVN tests on Travis-CI Linux build machines.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Eric Wong <e@80x24.org>
8 years agot0008: 4 tests fail with ksh88
Armin Kunaschik [Fri, 20 May 2016 14:31:30 +0000 (16:31 +0200)] 
t0008: 4 tests fail with ksh88

In t0008, we have

cat <<-EOF
...
a/b/.gitignore:8:!on* "a/b/one\"three"
...
EOF

and expect that the backslash-dq is passed through literally.

ksh88 eats the backslash and produces a wrong expect file to
compare the actual output with.

Using \\" works this around without breaking other POSIX shells
(which collapse backslash-backslash to a single backslash), and
ksh88 does so, too.

It makes it easier to read, too, because the reason why we are
writing backslash there is *not* because we think dq is special and
want to quote it (if that were the case we would have two more
backslashes on that line).  It is simply because we want a single
literal backslash there.  Since backslash is treated specially in
unquoted here-document, explicitly doubling it to quote it expresses
our intent better than relying on the character that immediately
comes after it (i.e. '"') not being a special character.

Signed-off-by: Armin Kunaschik <megabreit@googlemail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agorerere: remove an null statement
Junio C Hamano [Thu, 19 May 2016 19:51:22 +0000 (12:51 -0700)] 
rerere: remove an null statement

J6t spotted that previous commit added an empty statement by
mistake.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoSync with 2.8.3
Junio C Hamano [Wed, 18 May 2016 22:33:57 +0000 (15:33 -0700)] 
Sync with 2.8.3

* maint:
  Git 2.8.3

8 years agoGit 2.8.3 v2.8.3
Junio C Hamano [Wed, 18 May 2016 21:45:08 +0000 (14:45 -0700)] 
Git 2.8.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'jk/push-client-deadlock-fix'
Junio C Hamano [Wed, 18 May 2016 22:11:46 +0000 (15:11 -0700)] 
Merge branch 'jk/push-client-deadlock-fix'

Some Windows SDK lacks pthread_sigmask() implementation and fails
to compile the recently updated "git push" codepath that uses it.

* jk/push-client-deadlock-fix:
  Windows: only add a no-op pthread_sigmask() when needed
  Windows: add pthread_sigmask() that does nothing

8 years agoMerge branch 'sb/misc-cleanups' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:15 +0000 (14:40 -0700)] 
Merge branch 'sb/misc-cleanups' into HEAD

* sb/misc-cleanups:
  submodule-config: don't shadow `cache`
  config.c: drop local variable
  credential-cache, send_request: close fd when done
  bundle: don't leak an fd in case of early return
  abbrev_sha1_in_line: don't leak memory
  notes: don't leak memory in git_config_get_notes_strategy

8 years agoMerge branch 'ew/doc-split-pack-disables-bitmap' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:15 +0000 (14:40 -0700)] 
Merge branch 'ew/doc-split-pack-disables-bitmap' into HEAD

Doc update.

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

8 years agoMerge branch 'sb/clean-test-fix' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:14 +0000 (14:40 -0700)] 
Merge branch 'sb/clean-test-fix' into HEAD

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

8 years agoMerge branch 'rn/glossary-typofix' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:13 +0000 (14:40 -0700)] 
Merge branch 'rn/glossary-typofix' into HEAD

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

8 years agoMerge branch 'ew/normal-to-e' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:12 +0000 (14:40 -0700)] 
Merge branch 'ew/normal-to-e' into HEAD

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

8 years agoMerge branch 'sb/config-exit-status-list' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:12 +0000 (14:40 -0700)] 
Merge branch 'sb/config-exit-status-list' into HEAD

Doc update.

* sb/config-exit-status-list:
  config doc: improve exit code listing

8 years agoMerge branch 'rt/string-list-lookup-cleanup' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:12 +0000 (14:40 -0700)] 
Merge branch 'rt/string-list-lookup-cleanup' into HEAD

Code cleanup.

* rt/string-list-lookup-cleanup:
  string_list: use string-list API in unsorted_string_list_lookup()

8 years agoMerge branch 'jk/fix-attribute-macro-in-2.5' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:12 +0000 (14:40 -0700)] 
Merge branch 'jk/fix-attribute-macro-in-2.5' into HEAD

Code fixup.

* jk/fix-attribute-macro-in-2.5:
  remote.c: spell __attribute__ correctly

8 years agoMerge branch 'sg/test-lib-simplify-expr-away' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:11 +0000 (14:40 -0700)] 
Merge branch 'sg/test-lib-simplify-expr-away' into HEAD

Code cleanup.

* sg/test-lib-simplify-expr-away:
  test-lib: simplify '--option=value' parsing

8 years agoMerge branch 'nd/remove-unused' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:11 +0000 (14:40 -0700)] 
Merge branch 'nd/remove-unused' into HEAD

Code cleanup.

* nd/remove-unused:
  wrapper.c: delete dead function git_mkstemps()
  dir.c: remove dead function fnmatch_icase()

8 years agoMerge branch 'sk/gitweb-highlight-encoding' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:10 +0000 (14:40 -0700)] 
Merge branch 'sk/gitweb-highlight-encoding' into HEAD

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

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

8 years agoMerge branch 'ls/travis-submitting-patches' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:09 +0000 (14:40 -0700)] 
Merge branch 'ls/travis-submitting-patches' into HEAD

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

8 years agoMerge branch 'js/close-packs-before-gc' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:09 +0000 (14:40 -0700)] 
Merge branch 'js/close-packs-before-gc' into HEAD

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

8 years agoMerge branch 'ls/p4-lfs' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:08 +0000 (14:40 -0700)] 
Merge branch 'ls/p4-lfs' into HEAD

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

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

8 years agoMerge branch 'ls/p4-lfs-test-fix-2.7.0' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:08 +0000 (14:40 -0700)] 
Merge branch 'ls/p4-lfs-test-fix-2.7.0' into HEAD

Fix a broken test.

* ls/p4-lfs-test-fix-2.7.0:
  t9824: fix wrong reference value
  t9824: fix broken &&-chain in a subshell

8 years agoMerge branch 'nf/mergetool-prompt' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:07 +0000 (14:40 -0700)] 
Merge branch 'nf/mergetool-prompt' into HEAD

UI consistency improvements.

* nf/mergetool-prompt:
  difftool/mergetool: make the form of yes/no questions consistent

8 years agoMerge branch 'jd/send-email-to-whom' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:07 +0000 (14:40 -0700)] 
Merge branch 'jd/send-email-to-whom' into HEAD

A question by "git send-email" to ask the identity of the sender
has been updated.

* jd/send-email-to-whom:
  send-email: fix grammo in the prompt that asks e-mail recipients

8 years agoMerge branch 'js/win32-mmap' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:06 +0000 (14:40 -0700)] 
Merge branch 'js/win32-mmap' into HEAD

mmap emulation on Windows has been optimized and work better without
consuming paging store when not needed.

* js/win32-mmap:
  mmap(win32): avoid expensive fstat() call
  mmap(win32): avoid copy-on-write when it is unnecessary
  win32mmap: set errno appropriately

8 years agoMerge branch 'jk/push-client-deadlock-fix' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:06 +0000 (14:40 -0700)] 
Merge branch 'jk/push-client-deadlock-fix' into HEAD

Some Windows SDK lacks pthread_sigmask() implementation and fails
to compile the recently updated "git push" codepath that uses it.

* jk/push-client-deadlock-fix:
  Windows: only add a no-op pthread_sigmask() when needed
  Windows: add pthread_sigmask() that does nothing
  t5504: drop sigpipe=ok from push tests
  fetch-pack: isolate sigpipe in demuxer thread
  send-pack: isolate sigpipe in demuxer thread
  run-command: teach async threads to ignore SIGPIPE
  send-pack: close demux pipe before finishing async process

8 years agoMerge branch 'sb/mv-submodule-fix' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:05 +0000 (14:40 -0700)] 
Merge branch 'sb/mv-submodule-fix' into HEAD

"git mv old new" did not adjust the path for a submodule that lives
as a subdirectory inside old/ directory correctly.

* sb/mv-submodule-fix:
  mv: allow moving nested submodules

8 years agoMerge branch 'da/user-useconfigonly' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:05 +0000 (14:40 -0700)] 
Merge branch 'da/user-useconfigonly' into HEAD

The "user.useConfigOnly" configuration variable makes it an error
if users do not explicitly set user.name and user.email.  However,
its check was not done early enough and allowed another error to
trigger, reporting that the default value we guessed from the
system setting was unusable.  This was a suboptimal end-user
experience as we want the users to set user.name/user.email without
relying on the auto-detection at all.

* da/user-useconfigonly:
  ident: give "please tell me" message upon useConfigOnly error
  ident: check for useConfigOnly before auto-detection of name/email

8 years agoMerge branch 'ld/p4-test-py3' into HEAD
Junio C Hamano [Wed, 18 May 2016 21:40:04 +0000 (14:40 -0700)] 
Merge branch 'ld/p4-test-py3' into HEAD

The test scripts for "git p4" (but not "git p4" implementation
itself) has been updated so that they would work even on a system
where the installed version of Python is python 3.

* ld/p4-test-py3:
  git-p4 tests: time_in_seconds should use $PYTHON_PATH
  git-p4 tests: work with python3 as well as python2
  git-p4 tests: cd to / before running python

8 years agocat-file: default to --buffer when --batch-all-objects is used
Jeff King [Wed, 18 May 2016 16:56:14 +0000 (12:56 -0400)] 
cat-file: default to --buffer when --batch-all-objects is used

Traditionally cat-file's batch-mode does not do any output
buffering. The reason is that a caller may have pipes
connected to its input and output, and would want to use
cat-file interactively, getting output immediately for each
input it sends.

This may involve a lot of small write() calls, which can be
slow. So we introduced --buffer to improve this, but we
can't turn it on by default, as it would break the
interactive case above.

However, when --batch-all-objects is used, we do not read
stdin at all. We generate the output ourselves as quickly as
possible, and then exit. In this case buffering is a strict
win, and it is simply a hassle for the user to have to
remember to specify --buffer.

This patch makes --buffer the default when --batch-all-objects
is used. Specifying "--buffer" manually is still OK, and you
can even override it with "--no-buffer" if you're a
masochist (or debugging).

For some real numbers, running:

  git cat-file --batch-all-objects --batch-check='%(objectname)'

on torvalds/linux goes from:

  real    0m1.464s
  user    0m1.208s
  sys     0m0.252s

to:

  real    0m1.230s
  user    0m1.172s
  sys     0m0.056s

for a 16% speedup.

Suggested-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>