git/git.git
5 years agoMerge branch 'dt/name-hash-dir-entry-fix'
Junio C Hamano [Thu, 29 Oct 2015 20:59:19 +0000 (13:59 -0700)]
Merge branch 'dt/name-hash-dir-entry-fix'

The name-hash subsystem that is used to cope with case insensitive
filesystems keeps track of directories and their on-filesystem
cases for all the paths in the index by holding a pointer to a
randomly chosen cache entry that is inside the directory (for its
ce->ce_name component).  This pointer was not updated even when the
cache entry was removed from the index, leading to use after free.
This was fixed by recording the path for each directory instead of
borrowing cache entries and restructuring the API somewhat.

* dt/name-hash-dir-entry-fix:
  name-hash: don't reuse cache_entry in dir_entry

5 years agoMerge branch 'tk/sigchain-unnecessary-post-tempfile'
Junio C Hamano [Thu, 29 Oct 2015 20:59:17 +0000 (13:59 -0700)]
Merge branch 'tk/sigchain-unnecessary-post-tempfile'

Remove no-longer used #include.

* tk/sigchain-unnecessary-post-tempfile:
  shallow: remove unused #include "sigchain.h"
  read-cache: remove unused #include "sigchain.h"
  diff: remove unused #include "sigchain.h"
  credential-cache--daemon: remove unused #include "sigchain.h"

5 years agoMerge branch 'jk/war-on-sprintf'
Junio C Hamano [Thu, 29 Oct 2015 20:59:17 +0000 (13:59 -0700)]
Merge branch 'jk/war-on-sprintf'

* jk/war-on-sprintf:
  compat/mingw.c: remove printf format warning
  read_branches_file: plug a FILE* leak

5 years agoMerge branch 'jc/em-dash-in-doc'
Junio C Hamano [Thu, 29 Oct 2015 20:59:16 +0000 (13:59 -0700)]
Merge branch 'jc/em-dash-in-doc'

AsciiDoc markup fixes.

* jc/em-dash-in-doc:
  Documentation: AsciiDoc spells em-dash as double-dashes, not triple

5 years agoMerge branch 'jc/everyday-markup'
Junio C Hamano [Thu, 29 Oct 2015 20:59:15 +0000 (13:59 -0700)]
Merge branch 'jc/everyday-markup'

AsciiDoc markup fixes.

* jc/everyday-markup:
  Documentation/everyday: match undefline with the text

5 years agoMerge branch 'xf/user-manual-markup'
Junio C Hamano [Thu, 29 Oct 2015 20:59:14 +0000 (13:59 -0700)]
Merge branch 'xf/user-manual-markup'

AsciiDoc markup fixes.

* xf/user-manual-markup:
  Documentation: match undefline with the text in old release notes
  Documentation: match underline with the text
  Documentation: fix header markup

5 years agoSeventh batch for 2.7
Junio C Hamano [Mon, 26 Oct 2015 23:02:08 +0000 (16:02 -0700)]
Seventh batch for 2.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'dk/p4-import-ctypes'
Junio C Hamano [Mon, 26 Oct 2015 22:55:26 +0000 (15:55 -0700)]
Merge branch 'dk/p4-import-ctypes'

"git-p4" tried to use from ctypes module without first importing
it.

* dk/p4-import-ctypes:
  git-p4: import the ctypes module

5 years agoMerge branch 'jk/repository-extension'
Junio C Hamano [Mon, 26 Oct 2015 22:55:24 +0000 (15:55 -0700)]
Merge branch 'jk/repository-extension'

Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
  introduce "preciousObjects" repository extension
  introduce "extensions" form of core.repositoryformatversion

5 years agoMerge branch 'dt/t7063-fix-flaky-test'
Junio C Hamano [Mon, 26 Oct 2015 22:55:23 +0000 (15:55 -0700)]
Merge branch 'dt/t7063-fix-flaky-test'

* dt/t7063-fix-flaky-test:
  t7063: fix flaky untracked-cache test

5 years agoMerge branch 'kn/for-each-tag'
Junio C Hamano [Mon, 26 Oct 2015 22:55:22 +0000 (15:55 -0700)]
Merge branch 'kn/for-each-tag'

Recent update to "git tag --contains" caused a performance
regression.

* kn/for-each-tag:
  tag.c: use the correct algorithm for the '--contains' option

5 years agoMerge branch 'es/worktree-add'
Junio C Hamano [Mon, 26 Oct 2015 22:55:21 +0000 (15:55 -0700)]
Merge branch 'es/worktree-add'

* es/worktree-add:
  worktree: usage: denote <branch> as optional with 'add'

5 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

5 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

5 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

5 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

5 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

5 years agocompat/mingw.c: remove printf format warning
Johannes Sixt [Fri, 23 Oct 2015 06:02:52 +0000 (08:02 +0200)]
compat/mingw.c: remove printf format warning

5096d490 (convert trivial sprintf / strcpy calls to xsnprintf) converted
two sprintf calls. Now GCC warns that "format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'long unsigned int'".
Instead of changing the format string, use a variable of type unsigned
in place of the typedef-ed type DWORD, which hides that it is actually an
unsigned long.

There is no correctness issue with the old code because unsigned long and
unsigned are always of the same size on Windows, even in 64-bit builds.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoread_branches_file: plug a FILE* leak
Johannes Sixt [Fri, 23 Oct 2015 06:02:51 +0000 (08:02 +0200)]
read_branches_file: plug a FILE* leak

The earlier rewrite f28e3ab2 (read_branches_file: simplify string handling)
of read_branches_file() lost an fclose() call. Put it back.

As on Windows files that are open cannot be removed, the leak manifests in
a failure of 'git remote rename origin origin' when the remote's URL is
specified in .git/branches/origin, because by the time that the command
attempts to remove this file, it is still open.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoDocumentation: AsciiDoc spells em-dash as double-dashes, not triple
Junio C Hamano [Thu, 22 Oct 2015 20:02:33 +0000 (13:02 -0700)]
Documentation: AsciiDoc spells em-dash as double-dashes, not triple

Again, we do not usually process release notes with AsciiDoc, but it
is better to be consistent.

This incidentally reveals breakages left by an ancient 5e00439f
(Documentation: build html for all files in technical and howto,
2012-10-23).  The index-format documentation was originally written
to be read as straight text without formatting and when the commit
forced everything in Documentation/ to go through AsciiDoc, it did
not do any adjustment--hence the double-dashes will be seen in the
resulting text that is rendered as preformatted fixed-width without
converted into em-dashes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoshallow: remove unused #include "sigchain.h"
Tobias Klauser [Thu, 22 Oct 2015 12:43:30 +0000 (14:43 +0200)]
shallow: remove unused #include "sigchain.h"

After switching to use the tempfile module in commit 6e122b44
(setup_temporary_shallow(): use tempfile module), no declarations from
sigchain.h are used in read-cache.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoread-cache: remove unused #include "sigchain.h"
Tobias Klauser [Thu, 22 Oct 2015 12:43:29 +0000 (14:43 +0200)]
read-cache: remove unused #include "sigchain.h"

After switching to use the tempfile module in commit f6ecc62d
(write_shared_index(): use tempfile module), no declarations from
sigchain.h are used in read-cache.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff: remove unused #include "sigchain.h"
Tobias Klauser [Thu, 22 Oct 2015 12:43:28 +0000 (14:43 +0200)]
diff: remove unused #include "sigchain.h"

After switching to use the tempfile module in commit 284098f1
(diff: use tempfile module), no declarations from sigchain.h are used in
diff.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocredential-cache--daemon: remove unused #include "sigchain.h"
Tobias Klauser [Thu, 22 Oct 2015 12:43:27 +0000 (14:43 +0200)]
credential-cache--daemon: remove unused #include "sigchain.h"

After switching to use the tempfile module in commit 9e903316
(credential-cache--daemon: use tempfile module), no declarations from
sigchain.h are used in credential-cache--daemon.c anymore. Thus, remove
the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoDocumentation: match undefline with the text in old release notes
Junio C Hamano [Thu, 22 Oct 2015 17:11:41 +0000 (10:11 -0700)]
Documentation: match undefline with the text in old release notes

These are not processed with AsciiDoc, but it is better to be
consistent.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoDocumentation: match underline with the text
Junio C Hamano [Thu, 22 Oct 2015 17:09:07 +0000 (10:09 -0700)]
Documentation: match underline with the text

Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoDocumentation/everyday: match undefline with the text
Junio C Hamano [Thu, 22 Oct 2015 17:14:44 +0000 (10:14 -0700)]
Documentation/everyday: match undefline with the text

Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoDocumentation: fix header markup
Xue Fuqiao [Thu, 22 Oct 2015 12:59:00 +0000 (20:59 +0800)]
Documentation: fix header markup

Asciidoctor is stricter than AsciiDoc when deciding if underlining
is a section title or the start of preformatted text.  Make the
length of the underlining match the text to ensure that it renders
correctly in all implementations.

Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoname-hash: don't reuse cache_entry in dir_entry
David Turner [Wed, 21 Oct 2015 17:54:11 +0000 (13:54 -0400)]
name-hash: don't reuse cache_entry in dir_entry

Stop reusing cache_entry in dir_entry; doing so causes a
use-after-free bug.

During merges, we free entries that we no longer need in the
destination index.  But those entries might have also been stored in
the dir_entry cache, and when a later call to add_to_index found them,
they would be used after being freed.

To prevent this, change dir_entry to store a copy of the name instead
of a pointer to a cache_entry.  This entails some refactoring of code
that expects the cache_entry.

Keith McGuigan <kmcguigan@twitter.com> diagnosed this bug and wrote
the initial patch, but this version does not use any of Keith's code.

Helped-by: Keith McGuigan <kmcguigan@twitter.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with maint
Junio C Hamano [Tue, 20 Oct 2015 22:29:57 +0000 (15:29 -0700)]
Sync with maint

* maint:

5 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>
5 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

5 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

5 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
  ...

5 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

5 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

5 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>

5 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

5 years agogit-p4: import the ctypes module
Dennis Kaarsemaker [Tue, 20 Oct 2015 19:31:46 +0000 (21:31 +0200)]
git-p4: import the ctypes module

The ctypes module is used on windows to calculate free disk space,
so it must be imported.  We won't need it on other platforms, but
the module is available in Python 2.5 and newer, so importing it
unconditionally is harmless.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot7063: fix flaky untracked-cache test
David Turner [Mon, 19 Oct 2015 19:48:15 +0000 (15:48 -0400)]
t7063: fix flaky untracked-cache test

Dirty the test worktree's root directory, as the test expects.

When testing the untracked-cache, we previously assumed that checking
out master would be sufficient to mark the mtime of the worktree's
root directory as racily-dirty.  But sometimes, the checkout would
happen at 12345.999 seconds and the status at 12346.001 seconds,
meaning that the worktree's root directory would not be racily-dirty.
And since it was not truly dirty, occasionally the test would fail.
By making the root truly dirty, the test will always succeed.

Tested by running a few hundred times.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 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

5 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

5 years agoworktree: usage: denote <branch> as optional with 'add'
Sidhant Sharma [Mon, 19 Oct 2015 04:44:53 +0000 (10:14 +0530)]
worktree: usage: denote <branch> as optional with 'add'

Although 1eb07d8 (worktree: add: auto-vivify new branch when
<branch> is omitted, 2015-07-06) updated the documentation when
<branch> became optional, it neglected to update the in-code
usage message. Fix this oversight.

Reported-by: ch3cooli@gmail.com
Signed-off-by: Sidhant Sharma <tigerkid001@gmail.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotag.c: use the correct algorithm for the '--contains' option
Karthik Nayak [Sun, 18 Oct 2015 10:25:04 +0000 (15:55 +0530)]
tag.c: use the correct algorithm for the '--contains' option

In b7cc53e9 (tag.c: use 'ref-filter' APIs, 2015-09-11) we port tag.c
to use the ref-filter APIs for filtering and printing refs.  In
ref-filter we have two implementations for filtering refs when the
'--contains' option is used.

Although they do the same thing, one is optimized for filtering
branches and the other for tags (borrowed from branch.c and tag.c
respectively) and the 'filter->with_commit_tag_algo' bit decides
which algorithm must be used.  We should unify these.

When we ported tag.c to use ref-filter APIs we missed out on setting
the 'filter->with_commit_tag_algo' bit.  As reported by Jerry
Snitselaar, this causes "git tag --contains" to work way slower than
expected, fix this by setting 'filter->with_commit_tag_algo' in
tag.c before calling 'filter_refs()'.

Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Tested-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 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>
5 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

5 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>
5 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>

5 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()

5 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

5 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

5 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>
5 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

5 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

5 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

5 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()

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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'

5 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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

5 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

5 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`

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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()

5 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>