git
8 years agoMerge branch 'tk/stripspace'
Junio C Hamano [Mon, 26 Oct 2015 22:55:20 +0000 (15:55 -0700)] 
Merge branch 'tk/stripspace'

The internal stripspace() function has been moved to where it
logically belongs to, i.e. strbuf API, and the command line parser
of "git stripspace" has been updated to use the parse_options API.

* tk/stripspace:
  stripspace: use parse-options for command-line parsing
  strbuf: make stripspace() part of strbuf

8 years agoMerge branch 'rt/placeholder-in-usage'
Junio C Hamano [Mon, 26 Oct 2015 22:55:18 +0000 (15:55 -0700)] 
Merge branch 'rt/placeholder-in-usage'

A couple of commands still showed "[options]" in their usage string
to note where options should come on their command line, but we
spell that "[<options>]" in most places these days.

* rt/placeholder-in-usage:
  am, credential-cache: add angle brackets to usage string

8 years agoMerge branch 'jc/usage-stdin'
Junio C Hamano [Mon, 26 Oct 2015 22:55:17 +0000 (15:55 -0700)] 
Merge branch 'jc/usage-stdin'

The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
  usage: do not insist that standard input must come from a file

8 years agoMerge branch 'mr/worktree-list'
Junio C Hamano [Mon, 26 Oct 2015 22:55:16 +0000 (15:55 -0700)] 
Merge branch 'mr/worktree-list'

Add the "list" subcommand to "git worktree".

* mr/worktree-list:
  worktree: add 'list' command
  worktree: add details to the worktree struct
  worktree: add a function to get worktree details
  worktree: refactor find_linked_symref function
  worktree: add top-level worktree.c

8 years agoMerge branch 'jc/am-3-fallback-regression-fix'
Junio C Hamano [Mon, 26 Oct 2015 22:55:15 +0000 (15:55 -0700)] 
Merge branch 'jc/am-3-fallback-regression-fix'

"git am -3" had a small regression where it is aborted in its error
handling codepath when underlying merge-recursive failed in certain
ways, as it assumed that the internal call to merge-recursive will
never die, which is not the case (yet).

* jc/am-3-fallback-regression-fix:
  am -3: do not let failed merge from completing the error codepath

8 years agoSync with maint
Junio C Hamano [Tue, 20 Oct 2015 22:29:57 +0000 (15:29 -0700)] 
Sync with maint

* maint:

8 years agoSixth batch for 2.7
Junio C Hamano [Tue, 20 Oct 2015 22:29:50 +0000 (15:29 -0700)] 
Sixth batch for 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'tb/t0027-crlf'
Junio C Hamano [Tue, 20 Oct 2015 22:26:18 +0000 (15:26 -0700)] 
Merge branch 'tb/t0027-crlf'

The test for various line-ending conversions has been enhanced.

* tb/t0027-crlf:
  t0027: improve test for not-normalized files

8 years agoMerge branch 'ls/p4-test-updates'
Junio C Hamano [Tue, 20 Oct 2015 22:26:09 +0000 (15:26 -0700)] 
Merge branch 'ls/p4-test-updates'

A few test scripts around "git p4" have been improved for
portability.

* ls/p4-test-updates:
  git-p4: skip t9819 test case on case insensitive file systems
  git-p4: avoid "stat" command in t9815 git-p4-submit-fail

8 years agoMerge branch 'jk/war-on-sprintf'
Junio C Hamano [Tue, 20 Oct 2015 22:24:00 +0000 (15:24 -0700)] 
Merge branch 'jk/war-on-sprintf'

Many allocations that is manually counted (correctly) that are
followed by strcpy/sprintf have been replaced with a less error
prone constructs such as xstrfmt.

Macintosh-specific breakage was noticed and corrected in this
reroll.

* jk/war-on-sprintf: (70 commits)
  name-rev: use strip_suffix to avoid magic numbers
  use strbuf_complete to conditionally append slash
  fsck: use for_each_loose_file_in_objdir
  Makefile: drop D_INO_IN_DIRENT build knob
  fsck: drop inode-sorting code
  convert strncpy to memcpy
  notes: document length of fanout path with a constant
  color: add color_set helper for copying raw colors
  prefer memcpy to strcpy
  help: clean up kfmclient munging
  receive-pack: simplify keep_arg computation
  avoid sprintf and strcpy with flex arrays
  use alloc_ref rather than hand-allocating "struct ref"
  color: add overflow checks for parsing colors
  drop strcpy in favor of raw sha1_to_hex
  use sha1_to_hex_r() instead of strcpy
  daemon: use cld->env_array when re-spawning
  stat_tracking_info: convert to argv_array
  http-push: use an argv_array for setup_revisions
  fetch-pack: use argv_array for index-pack / unpack-objects
  ...

8 years agoMerge branch 'js/gc-with-stale-symref' into maint
Junio C Hamano [Tue, 20 Oct 2015 22:22:41 +0000 (15:22 -0700)] 
Merge branch 'js/gc-with-stale-symref' into maint

"git gc" used to barf when a symbolic ref has gone dangling
(e.g. the branch that used to be your upstream's default when you
cloned from it is now gone, and you did "fetch --prune").

* js/gc-with-stale-symref:
  pack-objects: do not get distracted by broken symrefs
  gc: demonstrate failure with stale remote HEAD

8 years agoMerge branch 'rd/test-path-utils' into maint
Junio C Hamano [Tue, 20 Oct 2015 22:22:40 +0000 (15:22 -0700)] 
Merge branch 'rd/test-path-utils' into maint

The normalize_ceiling_entry() function does not muck with the end
of the path it accepts, and the real world callers do rely on that,
but a test insisted that the function drops a trailing slash.

* rd/test-path-utils:
  test-path-utils.c: remove incorrect assumption

8 years agoMerge branch 'jc/doc-gc-prune-now' into maint
Junio C Hamano [Tue, 20 Oct 2015 22:22:40 +0000 (15:22 -0700)] 
Merge branch 'jc/doc-gc-prune-now' into maint

"git gc" is safe to run anytime only because it has the built-in
grace period to protect young objects.  In order to run with no
grace period, the user must make sure that the repository is
quiescent.

* jc/doc-gc-prune-now:
  Documentation/gc: warn against --prune=<now>

8 years agoMerge branch 'jk/filter-branch-use-of-sed-on-incomplete-line' into maint
Junio C Hamano [Tue, 20 Oct 2015 22:22:39 +0000 (15:22 -0700)] 
Merge branch 'jk/filter-branch-use-of-sed-on-incomplete-line' into maint

A recent "filter-branch --msg-filter" broke skipping of the commit
object header, which is fixed.

* jk/filter-branch-use-of-sed-on-incomplete-line:
  filter-branch: remove multi-line headers in msg filter

8 years agoSync with maint for Russian translation
Junio C Hamano [Mon, 19 Oct 2015 06:39:20 +0000 (23:39 -0700)] 
Sync with maint for Russian translation

* maint:
  l10n: ru.po: update Russian translation

8 years agoMerge branch 'maint' of git://github.com/git-l10n/git-po into maint
Junio C Hamano [Mon, 19 Oct 2015 06:37:35 +0000 (23:37 -0700)] 
Merge branch 'maint' of git://github.com/git-l10n/git-po into maint

* 'maint' of git://github.com/git-l10n/git-po:
  l10n: ru.po: update Russian translation

8 years agousage: do not insist that standard input must come from a file
Junio C Hamano [Fri, 16 Oct 2015 18:27:42 +0000 (11:27 -0700)] 
usage: do not insist that standard input must come from a file

The synopsys text and the usage string of subcommands that read list
of things from the standard input are often shown like this:

git gostak [--distim] < <list-of-doshes>

This is problematic in a number of ways:

 * The way to use these commands is more often to feed them the
   output from another command, not feed them from a file.

 * Manual pages outside Git, commands that operate on the data read
   from the standard input, e.g "sort", "grep", "sed", etc., are not
   described with such a "< redirection-from-file" in their synopsys
   text.  Our doing so introduces inconsistency.

 * We do not insist on where the output should go, by saying

git gostak [--distim] < <list-of-doshes> > <output>

 * As it is our convention to enclose placeholders inside <braket>,
   the redirection operator followed by a placeholder filename
   becomes very hard to read, both in the documentation and in the
   help text.

Let's clean them all up, after making sure that the documentation
clearly describes the modes that take information from the standard
input and what kind of things are expected on the input.

[jc: stole example for fmt-merge-msg from Jonathan]

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoSync with 2.6.2
Junio C Hamano [Fri, 16 Oct 2015 21:45:46 +0000 (14:45 -0700)] 
Sync with 2.6.2

8 years agoFifth batch for 2.7
Junio C Hamano [Fri, 16 Oct 2015 21:43:59 +0000 (14:43 -0700)] 
Fifth batch for 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'jc/doc-gc-prune-now'
Junio C Hamano [Fri, 16 Oct 2015 21:42:50 +0000 (14:42 -0700)] 
Merge branch 'jc/doc-gc-prune-now'

"git gc" is safe to run anytime only because it has the built-in
grace period to protect young objects.  In order to run with no
grace period, the user must make sure that the repository is
quiescent.

* jc/doc-gc-prune-now:
  Documentation/gc: warn against --prune=<now>

8 years agoMerge branch 'sb/submodule-config-parse'
Junio C Hamano [Fri, 16 Oct 2015 21:42:49 +0000 (14:42 -0700)] 
Merge branch 'sb/submodule-config-parse'

Code simplification.

* sb/submodule-config-parse:
  submodule-config: "goto" removal in parse_config()

8 years agoMerge branch 'jk/filter-branch-use-of-sed-on-incomplete-line'
Junio C Hamano [Fri, 16 Oct 2015 21:42:47 +0000 (14:42 -0700)] 
Merge branch 'jk/filter-branch-use-of-sed-on-incomplete-line'

A recent "filter-branch --msg-filter" broke skipping of the commit
object header, which is fixed.

* jk/filter-branch-use-of-sed-on-incomplete-line:
  filter-branch: remove multi-line headers in msg filter

8 years agoMerge branch 'rd/test-path-utils'
Junio C Hamano [Fri, 16 Oct 2015 21:42:44 +0000 (14:42 -0700)] 
Merge branch 'rd/test-path-utils'

The normalize_ceiling_entry() function does not muck with the end
of the path it accepts, and the real world callers do rely on that,
but a test insisted that the function drops a trailing slash.

* rd/test-path-utils:
  test-path-utils.c: remove incorrect assumption

8 years agoGit 2.6.2 v2.6.2
Junio C Hamano [Fri, 16 Oct 2015 21:40:04 +0000 (14:40 -0700)] 
Git 2.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'cc/quote-comments' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:58 +0000 (14:32 -0700)] 
Merge branch 'cc/quote-comments' into maint

A no-op code-health maintenance.

* cc/quote-comments:
  quote: move comment before sq_quote_buf()
  quote: fix broken sq_quote_buf() related comment

8 years agoMerge branch 'es/worktree-add-cleanup' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:57 +0000 (14:32 -0700)] 
Merge branch 'es/worktree-add-cleanup' into maint

A no-op code-health maintenance.

* es/worktree-add-cleanup:
  t2026: rename worktree prune test

8 years agoMerge branch 'tk/doc-interpret-trailers-grammo' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:56 +0000 (14:32 -0700)] 
Merge branch 'tk/doc-interpret-trailers-grammo' into maint

* tk/doc-interpret-trailers-grammo:
  Documentation/interpret-trailers: Grammar fix

8 years agoMerge branch 'tk/typofix-connect-unknown-proto-error' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:55 +0000 (14:32 -0700)] 
Merge branch 'tk/typofix-connect-unknown-proto-error' into maint

* tk/typofix-connect-unknown-proto-error:
  connect: fix typo in result string of prot_name()

8 years agoMerge branch 'jk/asciidoctor-section-heading-markup-fix' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:53 +0000 (14:32 -0700)] 
Merge branch 'jk/asciidoctor-section-heading-markup-fix' into maint

* jk/asciidoctor-section-heading-markup-fix:
  Documentation: fix section header mark-up

8 years agoMerge branch 'nd/ls-remote-does-not-have-u-option' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:52 +0000 (14:32 -0700)] 
Merge branch 'nd/ls-remote-does-not-have-u-option' into maint

* nd/ls-remote-does-not-have-u-option:
  ls-remote.txt: delete unsupported option

8 years agoMerge branch 'jc/fsck-dropped-errors' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:50 +0000 (14:32 -0700)] 
Merge branch 'jc/fsck-dropped-errors' into maint

There were some classes of errors that "git fsck" diagnosed to its
standard error that did not cause it to exit with non-zero status.

* jc/fsck-dropped-errors:
  fsck: exit with non-zero when problems are found

8 years agoMerge branch 'sb/http-flaky-test-fix' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:49 +0000 (14:32 -0700)] 
Merge branch 'sb/http-flaky-test-fix' into maint

A test script for the HTTP service had a timing dependent bug,
which was fixed.

* sb/http-flaky-test-fix:
  t5561: get rid of racy appending to logfile

8 years agoMerge branch 'sb/perf-without-installed-git' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:47 +0000 (14:32 -0700)] 
Merge branch 'sb/perf-without-installed-git' into maint

Performance-measurement tests did not work without an installed Git.

* sb/perf-without-installed-git:
  t/perf: make runner work even if Git is not installed

8 years agoMerge branch 'js/icase-wt-detection' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:46 +0000 (14:32 -0700)] 
Merge branch 'js/icase-wt-detection' into maint

On a case insensitive filesystems, setting GIT_WORK_TREE variable
using a random cases that does not agree with what the filesystem
thinks confused Git that it wasn't inside the working tree.

* js/icase-wt-detection:
  setup: fix "inside work tree" detection on case-insensitive filesystems

8 years agoMerge branch 'pt/am-builtin' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:45 +0000 (14:32 -0700)] 
Merge branch 'pt/am-builtin' into maint

When "git am" was rewritten as a built-in, it stopped paying
attention to user.signingkey, which was fixed.

* pt/am-builtin:
  am: configure gpg at startup

8 years agoMerge branch 'mm/detach-at-HEAD-reflog' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:44 +0000 (14:32 -0700)] 
Merge branch 'mm/detach-at-HEAD-reflog' into maint

After "git checkout --detach", "git status" reported a fairly
useless "HEAD detached at HEAD", instead of saying at which exact
commit.

* mm/detach-at-HEAD-reflog:
  status: don't say 'HEAD detached at HEAD'
  t3203: test 'detached at' after checkout --detach

8 years agoMerge branch 'gr/rebase-i-drop-warn' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:43 +0000 (14:32 -0700)] 
Merge branch 'gr/rebase-i-drop-warn' into maint

"git rebase -i" had a minor regression recently, which stopped
considering a line that begins with an indented '#' in its insn
sheet not a comment, which is now fixed.

* gr/rebase-i-drop-warn:
  rebase-i: loosen over-eager check_bad_cmd check
  rebase-i: explicitly accept tab as separator in commands

8 years agoMerge branch 'dt/log-follow-config' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:42 +0000 (14:32 -0700)] 
Merge branch 'dt/log-follow-config' into maint

Description of the "log.follow" configuration variable in "git log"
documentation is now also copied to "git config" documentation.

* dt/log-follow-config:
  log: Update log.follow doc and add to config.txt

8 years agoMerge branch 'ti/glibc-stdio-mutex-from-signal-handler' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:41 +0000 (14:32 -0700)] 
Merge branch 'ti/glibc-stdio-mutex-from-signal-handler' into maint

Allocation related functions and stdio are unsafe things to call
inside a signal handler, and indeed killing the pager can cause
glibc to deadlock waiting on allocation mutex as our signal handler
tries to free() some data structures in wait_for_pager().  Reduce
these unsafe calls.

* ti/glibc-stdio-mutex-from-signal-handler:
  pager: don't use unsafe functions in signal handlers

8 years agoMerge branch 'jk/notes-dwim-doc' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:40 +0000 (14:32 -0700)] 
Merge branch 'jk/notes-dwim-doc' into maint

The way how --ref/--notes to specify the notes tree reference are
DWIMmed was not clearly documented.

* jk/notes-dwim-doc:
  notes: correct documentation of DWIMery for notes references

8 years agoMerge branch 'jk/make-findstring-makeflags-fix' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:38 +0000 (14:32 -0700)] 
Merge branch 'jk/make-findstring-makeflags-fix' into maint

Customization to change the behaviour with "make -w" and "make -s"
in our Makefile was broken when they were used together.

* jk/make-findstring-makeflags-fix:
  Makefile: fix MAKEFLAGS tests with multiple flags

8 years agoMerge branch 'jw/make-arflags-customizable' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:36 +0000 (14:32 -0700)] 
Merge branch 'jw/make-arflags-customizable' into maint

The Makefile always runs the library archiver with hardcoded "crs"
options, which was inconvenient for exotic platforms on which
people want to use programs with totally different set of command
line options.

* jw/make-arflags-customizable:
  Makefile: allow $(ARFLAGS) specified from the command line

8 years agoMerge branch 'jk/connect-clear-env' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:35 +0000 (14:32 -0700)] 
Merge branch 'jk/connect-clear-env' into maint

The ssh transport, just like any other transport over the network,
did not clear GIT_* environment variables, but it is possible to
use SendEnv and AcceptEnv to leak them to the remote invocation of
Git, which is not a good idea at all.  Explicitly clear them just
like we do for the local transport.

* jk/connect-clear-env:
  git_connect: clarify conn->use_shell flag
  git_connect: clear GIT_* environment for ssh

8 years agoMerge branch 'jk/blame-first-parent' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:34 +0000 (14:32 -0700)] 
Merge branch 'jk/blame-first-parent' into maint

"git blame --first-parent v1.0..v2.0" was not rejected but did not
limit the blame to commits on the first parent chain.

* jk/blame-first-parent:
  blame: handle --first-parent

8 years agoMerge branch 'mm/keyid-docs' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:33 +0000 (14:32 -0700)] 
Merge branch 'mm/keyid-docs' into maint

Very small number of options take a parameter that is optional
(which is not a great UI element as they can only appear at the end
of the command line).  Add notice to documentation of each and
every one of them.

* mm/keyid-docs:
  Documentation: explain optional arguments better
  Documentation/grep: fix documentation of -O
  Documentation: use 'keyid' consistently, not 'key-id'

8 years agoMerge branch 'pt/pull-builtin' into maint
Junio C Hamano [Fri, 16 Oct 2015 21:32:32 +0000 (14:32 -0700)] 
Merge branch 'pt/pull-builtin' into maint

* pt/pull-builtin:
  pull: enclose <options> in brackets in the usage string
  merge: grammofix in please-commit-before-merge message

8 years agoam, credential-cache: add angle brackets to usage string
Ralf Thielow [Fri, 16 Oct 2015 17:09:57 +0000 (19:09 +0200)] 
am, credential-cache: add angle brackets to usage string

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agostripspace: use parse-options for command-line parsing
Tobias Klauser [Fri, 16 Oct 2015 15:16:43 +0000 (17:16 +0200)] 
stripspace: use parse-options for command-line parsing

Use parse-options to parse command-line options instead of a
hand-crafted implementation.  The users can now use a unique
prefix of the long option to say e.g. "git stripspace --strip".

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agostrbuf: make stripspace() part of strbuf
Tobias Klauser [Fri, 16 Oct 2015 15:16:42 +0000 (17:16 +0200)] 
strbuf: make stripspace() part of strbuf

This function is also used in other builtins than stripspace, so it
makes sense to have it in a more generic place.  Since it operates
on an strbuf and the function is declared in strbuf.h, move it to
strbuf.c and add the corresponding prefix to its name, just like
other API functions in the strbuf_* family.

Also switch all current users of stripspace() to the new function
name and keep a temporary wrapper inline function for any topic
branches still using stripspace().

Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agopull: enclose <options> in brackets in the usage string
Alex Henrie [Fri, 16 Oct 2015 02:22:13 +0000 (20:22 -0600)] 
pull: enclose <options> in brackets in the usage string

All the other placeholders are already shown that way.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoFourth batch for 2.7
Junio C Hamano [Thu, 15 Oct 2015 22:48:56 +0000 (15:48 -0700)] 
Fourth batch for 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'ls/p4-lfs'
Junio C Hamano [Thu, 15 Oct 2015 22:43:52 +0000 (15:43 -0700)] 
Merge branch 'ls/p4-lfs'

Teach "git p4" to send large blobs outside the repository by
talking to Git LFS.

* ls/p4-lfs:
  git-p4: add Git LFS backend for large file system
  git-p4: add support for large file systems
  git-p4: check free space during streaming
  git-p4: add file streaming progress in verbose mode
  git-p4: return an empty list if a list config has no values
  git-p4: add gitConfigInt reader
  git-p4: add optional type specifier to gitConfig reader

8 years agoMerge branch 'js/gc-with-stale-symref'
Junio C Hamano [Thu, 15 Oct 2015 22:43:51 +0000 (15:43 -0700)] 
Merge branch 'js/gc-with-stale-symref'

"git gc" used to barf when a symbolic ref has gone dangling
(e.g. the branch that used to be your upstream's default when you
cloned from it is now gone, and you did "fetch --prune").

* js/gc-with-stale-symref:
  pack-objects: do not get distracted by broken symrefs
  gc: demonstrate failure with stale remote HEAD

8 years agoMerge branch 'js/clone-dissociate'
Junio C Hamano [Thu, 15 Oct 2015 22:43:49 +0000 (15:43 -0700)] 
Merge branch 'js/clone-dissociate'

"git clone --dissociate" runs a big "git repack" process at the
end, and it helps to close file descriptors that are open on the
packs and their idx files before doing so on filesystems that
cannot remove a file that is still open.

* js/clone-dissociate:
  clone --dissociate: avoid locking pack files
  sha1_file.c: add a function to release all packs
  sha1_file: consolidate code to close a pack's file descriptor
  t5700: demonstrate a Windows file locking issue with `git clone --dissociate`

8 years agoMerge branch 'tk/doc-interpret-trailers-grammo'
Junio C Hamano [Thu, 15 Oct 2015 22:43:48 +0000 (15:43 -0700)] 
Merge branch 'tk/doc-interpret-trailers-grammo'

* tk/doc-interpret-trailers-grammo:
  Documentation/interpret-trailers: Grammar fix

8 years agoMerge branch 'es/worktree-add-cleanup'
Junio C Hamano [Thu, 15 Oct 2015 22:43:47 +0000 (15:43 -0700)] 
Merge branch 'es/worktree-add-cleanup'

A no-op code-health maintenance.

* es/worktree-add-cleanup:
  t2026: rename worktree prune test

8 years agoMerge branch 'dt/log-follow-config'
Junio C Hamano [Thu, 15 Oct 2015 22:43:46 +0000 (15:43 -0700)] 
Merge branch 'dt/log-follow-config'

Description of the "log.follow" configuration variable in "git log"
documentation is now also copied to "git config" documentation.

* dt/log-follow-config:
  log: Update log.follow doc and add to config.txt

8 years agoMerge branch 'cc/quote-comments'
Junio C Hamano [Thu, 15 Oct 2015 22:43:44 +0000 (15:43 -0700)] 
Merge branch 'cc/quote-comments'

A no-op code-health maintenance.

* cc/quote-comments:
  quote: move comment before sq_quote_buf()
  quote: fix broken sq_quote_buf() related comment

8 years agoMerge branch 'gr/rebase-i-drop-warn'
Junio C Hamano [Thu, 15 Oct 2015 22:43:44 +0000 (15:43 -0700)] 
Merge branch 'gr/rebase-i-drop-warn'

"git rebase -i" had a minor regression recently, which stopped
considering a line that begins with an indented '#' in its insn
sheet not a comment, which is now fixed.

* gr/rebase-i-drop-warn:
  rebase-i: loosen over-eager check_bad_cmd check
  rebase-i: explicitly accept tab as separator in commands

8 years agoMerge branch 'mm/detach-at-HEAD-reflog'
Junio C Hamano [Thu, 15 Oct 2015 22:43:42 +0000 (15:43 -0700)] 
Merge branch 'mm/detach-at-HEAD-reflog'

After "git checkout --detach", "git status" reported a fairly
useless "HEAD detached at HEAD", instead of saying at which exact
commit.

* mm/detach-at-HEAD-reflog:
  status: don't say 'HEAD detached at HEAD'
  t3203: test 'detached at' after checkout --detach

8 years agoMerge branch 'sa/send-email-smtp-batch-data-limit'
Junio C Hamano [Thu, 15 Oct 2015 22:43:41 +0000 (15:43 -0700)] 
Merge branch 'sa/send-email-smtp-batch-data-limit'

When "git send-email" wanted to talk over Net::SMTP::SSL,
Net::Cmd::datasend() did not like to be fed too many bytes at the
same time and failed to send messages.  Send the payload one line
at a time to work around the problem.

* sa/send-email-smtp-batch-data-limit:
  git-send-email.perl: Fixed sending of many/huge changes/patches

8 years agoMerge branch 'pt/am-builtin'
Junio C Hamano [Thu, 15 Oct 2015 22:43:40 +0000 (15:43 -0700)] 
Merge branch 'pt/am-builtin'

When "git am" was rewritten as a built-in, it stopped paying
attention to user.signingkey, which was fixed.

* pt/am-builtin:
  am: configure gpg at startup

8 years agoMerge branch 'nd/clone-linked-checkout'
Junio C Hamano [Thu, 15 Oct 2015 22:43:39 +0000 (15:43 -0700)] 
Merge branch 'nd/clone-linked-checkout'

It was not possible to use a repository-lookalike created by "git
worktree add" as a local source of "git clone".

* nd/clone-linked-checkout:
  clone: better error when --reference is a linked checkout
  clone: allow --local from a linked checkout
  enter_repo: allow .git files in strict mode
  enter_repo: avoid duplicating logic, use is_git_directory() instead
  t0002: add test for enter_repo(), non-strict mode
  path.c: delete an extra space

8 years agoMerge branch 'js/icase-wt-detection'
Junio C Hamano [Thu, 15 Oct 2015 22:43:39 +0000 (15:43 -0700)] 
Merge branch 'js/icase-wt-detection'

On a case insensitive filesystems, setting GIT_WORK_TREE variable
using a random cases that does not agree with what the filesystem
thinks confused Git that it wasn't inside the working tree.

* js/icase-wt-detection:
  setup: fix "inside work tree" detection on case-insensitive filesystems

8 years agoMerge branch 'kn/for-each-branch'
Junio C Hamano [Thu, 15 Oct 2015 22:43:38 +0000 (15:43 -0700)] 
Merge branch 'kn/for-each-branch'

Update "git branch" that list existing branches, using the
ref-filter API that is shared with "git tag" and "git
for-each-ref".

* kn/for-each-branch:
  branch: add '--points-at' option
  branch.c: use 'ref-filter' APIs
  branch.c: use 'ref-filter' data structures
  branch: drop non-commit error reporting
  branch: move 'current' check down to the presentation layer
  branch: roll show_detached HEAD into regular ref_list
  branch: bump get_head_description() to the top
  branch: refactor width computation

8 years agoMerge branch 'sb/perf-without-installed-git'
Junio C Hamano [Thu, 15 Oct 2015 22:43:37 +0000 (15:43 -0700)] 
Merge branch 'sb/perf-without-installed-git'

Performance-measurement tests did not work without an installed Git.

* sb/perf-without-installed-git:
  t/perf: make runner work even if Git is not installed

8 years agoMerge branch 'sb/http-flaky-test-fix'
Junio C Hamano [Thu, 15 Oct 2015 22:43:35 +0000 (15:43 -0700)] 
Merge branch 'sb/http-flaky-test-fix'

A test script for the HTTP service had a timing dependent bug,
which was fixed.

* sb/http-flaky-test-fix:
  t5561: get rid of racy appending to logfile

8 years agoMerge branch 'jc/fsck-dropped-errors'
Junio C Hamano [Thu, 15 Oct 2015 22:43:35 +0000 (15:43 -0700)] 
Merge branch 'jc/fsck-dropped-errors'

There were some classes of errors that "git fsck" diagnosed to its
standard error that did not cause it to exit with non-zero status.

* jc/fsck-dropped-errors:
  fsck: exit with non-zero when problems are found

8 years agoMerge branch 'ls/p4-translation-failure'
Junio C Hamano [Thu, 15 Oct 2015 22:43:34 +0000 (15:43 -0700)] 
Merge branch 'ls/p4-translation-failure'

Work around "git p4" failing when the P4 depot records the contents
in UTF-16 without UTF-16 BOM.

* ls/p4-translation-failure:
  git-p4: handle "Translation of file content failed"
  git-p4: add test case for "Translation of file content failed" error

8 years agoMerge branch 'nd/gc-auto-background-fix'
Junio C Hamano [Thu, 15 Oct 2015 22:43:32 +0000 (15:43 -0700)] 
Merge branch 'nd/gc-auto-background-fix'

When "git gc --auto" is backgrounded, its diagnosis message is
lost.  Save it to a file in $GIT_DIR and show it next time the "gc
--auto" is run.

* nd/gc-auto-background-fix:
  gc: save log from daemonized gc --auto and print it next time

8 years agoMerge branch 'mk/submodule-gitdir-path'
Junio C Hamano [Thu, 15 Oct 2015 22:43:31 +0000 (15:43 -0700)] 
Merge branch 'mk/submodule-gitdir-path'

The submodule code has been taught to work better with separate
work trees created via "git worktree add".

* mk/submodule-gitdir-path:
  path: implement common_dir handling in git_pathdup_submodule()
  submodule refactor: use strbuf_git_path_submodule() in add_submodule_odb()

8 years agoThird batch for 2.7
Junio C Hamano [Wed, 14 Oct 2015 21:31:23 +0000 (14:31 -0700)] 
Third batch for 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'pt/pull-builtin'
Junio C Hamano [Wed, 14 Oct 2015 21:30:20 +0000 (14:30 -0700)] 
Merge branch 'pt/pull-builtin'

* pt/pull-builtin:
  merge: grammofix in please-commit-before-merge message

8 years agoMerge branch 'nd/ls-remote-does-not-have-u-option'
Junio C Hamano [Wed, 14 Oct 2015 21:30:19 +0000 (14:30 -0700)] 
Merge branch 'nd/ls-remote-does-not-have-u-option'

* nd/ls-remote-does-not-have-u-option:
  ls-remote.txt: delete unsupported option

8 years agoMerge branch 'jk/asciidoctor-section-heading-markup-fix'
Junio C Hamano [Wed, 14 Oct 2015 21:30:17 +0000 (14:30 -0700)] 
Merge branch 'jk/asciidoctor-section-heading-markup-fix'

* jk/asciidoctor-section-heading-markup-fix:
  Documentation: fix section header mark-up

8 years agoMerge branch 'tk/typofix-connect-unknown-proto-error'
Junio C Hamano [Wed, 14 Oct 2015 21:30:16 +0000 (14:30 -0700)] 
Merge branch 'tk/typofix-connect-unknown-proto-error'

* tk/typofix-connect-unknown-proto-error:
  connect: fix typo in result string of prot_name()

8 years agoMerge branch 'jk/notes-dwim-doc'
Junio C Hamano [Wed, 14 Oct 2015 21:30:15 +0000 (14:30 -0700)] 
Merge branch 'jk/notes-dwim-doc'

The way how --ref/--notes to specify the notes tree reference are
DWIMmed was not clearly documented.

* jk/notes-dwim-doc:
  notes: correct documentation of DWIMery for notes references

8 years agoDocumentation/gc: warn against --prune=<now>
Junio C Hamano [Wed, 14 Oct 2015 20:48:39 +0000 (13:48 -0700)] 
Documentation/gc: warn against --prune=<now>

"git gc" is safe to run anytime only because it has the built-in
grace period to protect objects that are created by other processes
that are waiting for ref updates to anchor them to the history.  In
order to run with no grace period, the user must make sure that the
repository is quiescent.

Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agot0027: improve test for not-normalized files
Torsten Bögershausen [Sat, 10 Oct 2015 04:23:53 +0000 (06:23 +0200)] 
t0027: improve test for not-normalized files

When a text file with mixed line endings is commited into the repo,
it is called "not normalized" (or NNO) in t0027.  The existing test
case using repoMIX did not fully test all combinations: (Especially
when core.autocrlf = true) Files with NL are not converted at
commit, but at checkout, so a warning NL->CRLF is given.  Files with
CRLF are not converted at all (so no warning will be given), unless
they are marked as "text" or "auto".

Remove repoMIX introduced in commit 8eeab92f02, and replace it with
a combination of NNO tests.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
8 years agosubmodule-config: "goto" removal in parse_config()
Stefan Beller [Mon, 12 Oct 2015 17:58:58 +0000 (10:58 -0700)] 
submodule-config: "goto" removal in parse_config()

Many components in if/else if/... cascade jumped to a shared
clean-up with "goto release_return", but we can restructure the
function a bit and make them disappear, which reduces the line count
as well.  Also reformat overlong lines and poorly indented ones
while at it.

The order of rules to verify the value for "ignore" used to be to
complain on multiple values first and then complain to boolean, but
swap the order to match how the values for "path" and "url" are
verified.

CC: Eric Sunshine <sunshine@sunshineco.com>
CC: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agofilter-branch: remove multi-line headers in msg filter
James McCoy [Fri, 9 Oct 2015 00:21:13 +0000 (20:21 -0400)] 
filter-branch: remove multi-line headers in msg filter

df062010 (filter-branch: avoid passing commit message through sed)
introduced a regression when filtering commits with multi-line headers,
if the header contains a blank line.  An example of this is a gpg-signed
commit:

  $ git cat-file commit signed-commit
  tree 3d4038e029712da9fc59a72afbfcc90418451630
  parent 110eac945dc1713b27bdf49e74e5805db66971f0
  author A U Thor <author@example.com> 1112912413 -0700
  committer C O Mitter <committer@example.com> 1112912413 -0700
  gpgsig -----BEGIN PGP SIGNATURE-----
   Version: GnuPG v1

   iEYEABECAAYFAlYXADwACgkQE7b1Hs3eQw23CACgldB/InRyDgQwyiFyMMm3zFpj
   pUsAnA+f3aMUsd9mNroloSmlOgL6jIMO
   =0Hgm
   -----END PGP SIGNATURE-----

  Adding gpg

As a consequence, "filter-branch --msg-filter cat" (which should leave the
commit message unchanged) spills the signature (after the internal blank
line) into the original commit message.

The reason is that although the signature is indented, making the line a
whitespace only line, the "read" call is splitting the line based on
the shell's IFS, which defaults to <space><tab><newline>.  The leading
space is consumed and $header_line is empty, causing the "skip header
lines" loop to exit.

The rest of the commit object is then re-used as the rewritten commit
message, causing the new message to include the signature of the
original commit.

Set IFS to an empty string for the "read" call, thus disabling the word
splitting, which causes $header_line to be set to the non-empty value ' '.
This allows the loop to fully consume the header lines before
emitting the original, intact commit message.

[jc: this is literally based on MJG's suggestion]

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: James McCoy <vega.james@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit-multimail: update to release 1.2.0
Matthieu Moy [Sun, 11 Oct 2015 18:43:20 +0000 (20:43 +0200)] 
git-multimail: update to release 1.2.0

The changes are described in CHANGES.

Contributions-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Contributions-by: Elijah Newren <newren@palantir.com>
Contributions-by: Edward d'Auvergne <edward@nmr-relax.com>
Contributions-by: Vadim Zeitlin <vadim@zeitlins.org>
Contributions-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Contributions-by: Michael Haggerty <mhagger@alum.mit.edu>
Contributions-by: Elijah Newren <newren@gmail.com>
Contributions-by: Richard Hansen <rhansen@rhansen.org>
Contributions-by: Job Snijders <job@instituut.net>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit-p4: skip t9819 test case on case insensitive file systems
Lars Schneider [Mon, 12 Oct 2015 17:03:04 +0000 (10:03 -0700)] 
git-p4: skip t9819 test case on case insensitive file systems

Windows and OS X file systems are case insensitive by default.
Consequently the "git-p4-case-folding" test case does not apply to
them.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit-p4: avoid "stat" command in t9815 git-p4-submit-fail
Lars Schneider [Mon, 12 Oct 2015 17:03:03 +0000 (10:03 -0700)] 
git-p4: avoid "stat" command in t9815 git-p4-submit-fail

Replace the stat command with the ls command to check file mode
bits.  The stats command is not available on Windows and has
different command line options on OS X.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoam -3: do not let failed merge from completing the error codepath
Junio C Hamano [Fri, 9 Oct 2015 20:38:30 +0000 (13:38 -0700)] 
am -3: do not let failed merge from completing the error codepath

When "am" was rewritten in C, the codepath for falling back to
three-way merge was mistakenly made to make an internal call to
merge-recursive, disabling the error reporting code for certain
types of errors merge-recursive detects and reports by calling
die().

This is a quick-fix for correctness.  The ideal endgame would be to
replace run_command() in run_fallback_merge_recursive() with a
direct call after making sure that internal call to merge-recursive
does not die().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agotest-path-utils.c: remove incorrect assumption
Ray Donnelly [Thu, 1 Oct 2015 19:04:17 +0000 (20:04 +0100)] 
test-path-utils.c: remove incorrect assumption

In normalize_ceiling_entry(), we test that normalized paths end with
slash, *unless* the path to be normalized was already the root
directory.

However, normalize_path_copy() does not even enforce this condition.

Even worse: on Windows, the root directory gets translated into a
Windows directory by the Bash before being passed to `git.exe` (or
`test-path-utils.exe`), which means that we cannot even know whether
the path that was passed to us was the root directory to begin with.

This issue has already caused endless hours of trying to "fix" the
MSYS2 runtime, only to break other things due to MSYS2 ensuring that
the converted path maintains the same state as the input path with
respect to any final '/'.

So let's just forget about this test. It is non-essential to Git's
operation, anyway.

Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
8 years agopack-objects: do not get distracted by broken symrefs
Johannes Schindelin [Mon, 28 Sep 2015 14:01:25 +0000 (16:01 +0200)] 
pack-objects: do not get distracted by broken symrefs

It is quite possible for, say, a remote HEAD to become broken, e.g.
when the default branch was renamed.

We should still be able to pack our objects when such a thing happens;
simply ignore broken symrefs (because they cannot matter for the packing
process anyway).

This fixes https://github.com/git-for-windows/git/issues/423

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoworktree: add 'list' command
Michael Rappazzo [Thu, 8 Oct 2015 17:01:05 +0000 (13:01 -0400)] 
worktree: add 'list' command

'git worktree list' iterates through the worktree list, and outputs
details of the worktree including the path to the worktree, the currently
checked out revision and branch, and if the work tree is bare.  There is
also porcelain format option available.

Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoworktree: add details to the worktree struct
Michael Rappazzo [Thu, 8 Oct 2015 17:01:04 +0000 (13:01 -0400)] 
worktree: add details to the worktree struct

In addition to the absolute path in the worktree struct, add the location
of the git dir, the head ref (if not detached), the head revision sha1,
whether or not head is detached, and whether or not the worktree is a
bare repo.

Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoworktree: add a function to get worktree details
Michael Rappazzo [Thu, 8 Oct 2015 17:01:03 +0000 (13:01 -0400)] 
worktree: add a function to get worktree details

The worktree structure provided for an individual worktree includes the
absolute path of the worktree.  The fuction to get the worktree details
is a refactor of the find main/linked symref functions.

Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoworktree: refactor find_linked_symref function
Michael Rappazzo [Thu, 8 Oct 2015 17:01:02 +0000 (13:01 -0400)] 
worktree: refactor find_linked_symref function

Refactoring will help transition this code to provide additional useful
worktree functions.

Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoquote: move comment before sq_quote_buf()
Christian Couder [Wed, 7 Oct 2015 22:05:50 +0000 (00:05 +0200)] 
quote: move comment before sq_quote_buf()

A big comment at the beginning of quote.c is really
related to sq_quote_buf(), so let's move it in front
of this function.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoquote: fix broken sq_quote_buf() related comment
Christian Couder [Wed, 7 Oct 2015 22:05:49 +0000 (00:05 +0200)] 
quote: fix broken sq_quote_buf() related comment

Since 77d604c (Enhanced sq_quote(), 10 Oct 2005), the
comment at the beginning of quote.c is broken.
Let's fix it.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoSecond batch for 2.7
Junio C Hamano [Wed, 7 Oct 2015 20:38:43 +0000 (13:38 -0700)] 
Second batch for 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'ls/p4-path-encoding'
Junio C Hamano [Wed, 7 Oct 2015 20:38:19 +0000 (13:38 -0700)] 
Merge branch 'ls/p4-path-encoding'

"git p4" learned to reencode the pathname it uses to communicate
with the p4 depot with a new option.

* ls/p4-path-encoding:
  git-p4: use replacement character for non UTF-8 characters in paths
  git-p4: improve path encoding verbose output
  git-p4: add config git-p4.pathEncoding

8 years agoMerge branch 'gb/filter-branch-progress'
Junio C Hamano [Wed, 7 Oct 2015 20:38:18 +0000 (13:38 -0700)] 
Merge branch 'gb/filter-branch-progress'

Give progress meter to "git filter-branch".

* gb/filter-branch-progress:
  filter-branch: make report-progress more readable
  filter-branch: add passed/remaining seconds on progress

8 years agoMerge branch 'nd/ignore-then-not-ignore'
Junio C Hamano [Wed, 7 Oct 2015 20:38:17 +0000 (13:38 -0700)] 
Merge branch 'nd/ignore-then-not-ignore'

Allow a later "!/abc/def" to override an earlier "/abc" that
appears in the same .gitignore file to make it easier to express
"everything in /abc directory is ignored, except for ...".

* nd/ignore-then-not-ignore:
  dir.c: don't exclude whole dir prematurely if neg pattern may match
  dir.c: make last_exclude_matching_from_list() run til the end

8 years agoMerge branch 'ti/glibc-stdio-mutex-from-signal-handler'
Junio C Hamano [Wed, 7 Oct 2015 20:38:16 +0000 (13:38 -0700)] 
Merge branch 'ti/glibc-stdio-mutex-from-signal-handler'

Allocation related functions and stdio are unsafe things to call
inside a signal handler, and indeed killing the pager can cause
glibc to deadlock waiting on allocation mutex as our signal handler
tries to free() some data structures in wait_for_pager().  Reduce
these unsafe calls.

* ti/glibc-stdio-mutex-from-signal-handler:
  pager: don't use unsafe functions in signal handlers

8 years agoDocumentation/interpret-trailers: Grammar fix
Tobias Klauser [Wed, 7 Oct 2015 16:46:22 +0000 (18:46 +0200)] 
Documentation/interpret-trailers: Grammar fix

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoclone --dissociate: avoid locking pack files
Johannes Schindelin [Tue, 6 Oct 2015 13:18:47 +0000 (15:18 +0200)] 
clone --dissociate: avoid locking pack files

When `git clone` is asked to dissociate the repository from the
reference repository whose objects were used, it is quite possible that
the pack files need to be repacked. In that case, the pack files need to
be deleted that were originally hard-links to the reference repository's
pack files.

On platforms where a file cannot be deleted if another process still
holds a handle on it, we therefore need to take pains to release all
pack files and indexes before dissociating.

This fixes https://github.com/git-for-windows/git/issues/446

The test case to demonstrate the breakage technically does not need to
be run on Linux or MacOSX. It won't hurt, either, though.

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