git/git.git
4 years agoMerge branch 'ak/t7800-wo-readlink' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:15 +0000 (10:44 -0700)]
Merge branch 'ak/t7800-wo-readlink' into maint

One among four invocations of readlink(1) in our test suite has
been rewritten so that the test can run on systems without the
command (others are in valgrind test framework and t9802).

* ak/t7800-wo-readlink:
  t7800: readlink may not be available

4 years agoMerge branch 'jk/tzoffset-fix' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:14 +0000 (10:44 -0700)]
Merge branch 'jk/tzoffset-fix' into maint

The internal code used to show local timezone offset is not
prepared to handle timestamps beyond year 2100, and gave a
bogus offset value to the caller.  Use a more benign looking
+0000 instead and let "git log" going in such a case, instead
of aborting.

* jk/tzoffset-fix:
  local_tzoffset: detect errors from tm_to_time_t
  t0006: test various date formats
  t0006: rename test-date's "show" to "relative"

4 years agoMerge branch 'js/mingw-parameter-less-c-functions' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:13 +0000 (10:44 -0700)]
Merge branch 'js/mingw-parameter-less-c-functions' into maint

Some platform-specific code had non-ANSI strict declarations of C
functions that do not take any parameters, which has been
corrected.

* js/mingw-parameter-less-c-functions:
  mingw: let the build succeed with DEVELOPER=1

4 years agoMerge branch 'lc/shell-default-value-noexpand' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:13 +0000 (10:44 -0700)]
Merge branch 'lc/shell-default-value-noexpand' into maint

Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}'
to set the default value, without enclosing it in double quotes.

* lc/shell-default-value-noexpand:
  sh-setup: enclose setting of ${VAR=default} in double-quotes

4 years agoMerge branch 'sb/clone-shallow-passthru' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:12 +0000 (10:44 -0700)]
Merge branch 'sb/clone-shallow-passthru' into maint

Fix an unintended regression in v2.9 that breaks "clone --depth"
that recurses down to submodules by forcing the submodules to also
be cloned shallowly, which many server instances that host upstream
of the submodules are not prepared for.

* sb/clone-shallow-passthru:
  clone: do not let --depth imply --shallow-submodules

4 years agoMerge branch 'mg/signature-doc' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:11 +0000 (10:44 -0700)]
Merge branch 'mg/signature-doc' into maint

Formats of the various data (and how to validate them) where we use
GPG signature have been documented.

* mg/signature-doc:
  Documentation/technical: signed merge tag format
  Documentation/technical: signed commit format
  Documentation/technical: signed tag format
  Documentation/technical: describe signature formats

4 years agoMerge branch 'jk/bisect-show-tree' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:11 +0000 (10:44 -0700)]
Merge branch 'jk/bisect-show-tree' into maint

"git bisect" makes an internal call to "git diff-tree" when
bisection finds the culprit, but this call did not initialize the
data structure to pass to the diff-tree API correctly.

* jk/bisect-show-tree:
  bisect: always call setup_revisions after init_revisions

4 years agoMerge branch 'km/fetch-do-not-free-remote-name' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:10 +0000 (10:44 -0700)]
Merge branch 'km/fetch-do-not-free-remote-name' into maint

The ownership rule for the piece of memory that hold references to
be fetched in "git fetch" was screwy, which has been cleaned up.

* km/fetch-do-not-free-remote-name:
  builtin/fetch.c: don't free remote->name after fetch

4 years agoMerge branch 'nd/graph-width-padded' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:09 +0000 (10:44 -0700)]
Merge branch 'nd/graph-width-padded' into maint

"log --graph --format=" learned that "%>|(N)" specifies the width
relative to the terminal's left edge, not relative to the area to
draw text that is to the right of the ancestry-graph section.  It
also now accepts negative N that means the column limit is relative
to the right border.

* nd/graph-width-padded:
  pretty.c: support <direction>|(<negative number>) forms
  pretty: pass graph width to pretty formatting for use in '%>|(N)'

4 years agoMerge branch 'jk/add-i-diff-compact-heuristics' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:09 +0000 (10:44 -0700)]
Merge branch 'jk/add-i-diff-compact-heuristics' into maint

"git add -i/-p" learned to honor diff.compactionHeuristic
experimental knob, so that the user can work on the same hunk split
as "git diff" output.

* jk/add-i-diff-compact-heuristics:
  add--interactive: respect diff.compactionHeuristic

4 years agoMore fixes for 2.9.1
Junio C Hamano [Wed, 6 Jul 2016 20:08:02 +0000 (13:08 -0700)]
More fixes for 2.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'jc/deref-tag' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:46 +0000 (13:06 -0700)]
Merge branch 'jc/deref-tag' into maint

Code clean-up.

* jc/deref-tag:
  blame, line-log: do not loop around deref_tag()

4 years agoMerge branch 'pb/strbuf-read-file-doc' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:45 +0000 (13:06 -0700)]
Merge branch 'pb/strbuf-read-file-doc' into maint

Minor doc update.

* pb/strbuf-read-file-doc:
  strbuf: describe the return value of strbuf_read_file

4 years agoMerge branch 'jk/fetch-prune-doc' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:44 +0000 (13:06 -0700)]
Merge branch 'jk/fetch-prune-doc' into maint

Minor doc update.

* jk/fetch-prune-doc:
  fetch: document that pruning happens before fetching

4 years agoMerge branch 'pc/occurred' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:43 +0000 (13:06 -0700)]
Merge branch 'pc/occurred' into maint

Typofix.

* pc/occurred:
  config.c: fix misspelt "occurred" in an error message
  refs.h: fix misspelt "occurred" in a comment

4 years agoMerge branch 'mg/cherry-pick-multi-on-unborn' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:42 +0000 (13:06 -0700)]
Merge branch 'mg/cherry-pick-multi-on-unborn' into maint

"git cherry-pick A" worked on an unborn branch, but "git
cherry-pick A..B" didn't.

* mg/cherry-pick-multi-on-unborn:
  cherry-pick: allow to pick to unborn branches

4 years agoMerge branch 'em/newer-freebsd-shells-are-fine-with-returns' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:41 +0000 (13:06 -0700)]
Merge branch 'em/newer-freebsd-shells-are-fine-with-returns' into maint

Comments about misbehaving FreeBSD shells have been clarified with
the version number (9.x and before are broken, newer ones are OK).

* em/newer-freebsd-shells-are-fine-with-returns:
  rebase: update comment about FreeBSD /bin/sh

4 years agoMerge branch 'lv/status-say-working-tree-not-directory' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:40 +0000 (13:06 -0700)]
Merge branch 'lv/status-say-working-tree-not-directory' into maint

"git status" used to say "working directory" when it meant "working
tree".

* lv/status-say-working-tree-not-directory:
  Use "working tree" instead of "working directory" for git status

4 years agoMerge branch 'nb/gnome-keyring-build' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:40 +0000 (13:06 -0700)]
Merge branch 'nb/gnome-keyring-build' into maint

Build improvements for gnome-keyring (in contrib/)

* nb/gnome-keyring-build:
  gnome-keyring: Don't hard-code pkg-config executable

4 years agoMerge branch 'et/add-chmod-x' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:39 +0000 (13:06 -0700)]
Merge branch 'et/add-chmod-x' into maint

"git update-index --add --chmod=+x file" may be usable as an escape
hatch, but not a friendly thing to force for people who do need to
use it regularly.  "git add --chmod=+x file" can be used instead.

* et/add-chmod-x:
  add: add --chmod=+x / --chmod=-x options

4 years agoMerge branch 'jk/avoid-unbounded-alloca' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:39 +0000 (13:06 -0700)]
Merge branch 'jk/avoid-unbounded-alloca' into maint

A codepath that used alloca(3) to place an unbounded amount of data
on the stack has been updated to avoid doing so.

* jk/avoid-unbounded-alloca:
  tree-diff: avoid alloca for large allocations

4 years agoMerge branch 'rj/compat-regex-size-max-fix' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:38 +0000 (13:06 -0700)]
Merge branch 'rj/compat-regex-size-max-fix' into maint

A compilation fix.

* rj/compat-regex-size-max-fix:
  regex: fix a SIZE_MAX macro redefinition warning

4 years agoMerge branch 'vs/prompt-avoid-unset-variable' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:38 +0000 (13:06 -0700)]
Merge branch 'vs/prompt-avoid-unset-variable' into maint

The git-prompt scriptlet (in contrib/) was not friendly with those
who uses "set -u", which has been fixed.

* vs/prompt-avoid-unset-variable:
  git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha

4 years agoMerge branch 'sg/reflog-past-root' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:37 +0000 (13:06 -0700)]
Merge branch 'sg/reflog-past-root' into maint

"git reflog" stopped upon seeing an entry that denotes a branch
creation event (aka "unborn"), which made it appear as if the
reflog was truncated.

* sg/reflog-past-root:
  reflog: continue walking the reflog past root commits

4 years agoMerge branch 'dn/gpg-doc' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:36 +0000 (13:06 -0700)]
Merge branch 'dn/gpg-doc' into maint

The documentation tries to consistently spell "GPG"; when
referring to the specific program name, "gpg" is used.

* dn/gpg-doc:
  Documentation: GPG capitalization

4 years agoMerge branch 'ap/git-svn-propset-doc' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:35 +0000 (13:06 -0700)]
Merge branch 'ap/git-svn-propset-doc' into maint

"git svn propset" subcommand that was added in 2.3 days is
documented now.

* ap/git-svn-propset-doc:
  git-svn: document the 'git svn propset' command

4 years agoMerge branch 'tr/doc-tt' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:34 +0000 (13:06 -0700)]
Merge branch 'tr/doc-tt' into maint

The documentation set has been updated so that literal commands,
configuration variables and environment variables are consistently
typeset in fixed-width font and bold in manpages.

* tr/doc-tt:
  doc: change configuration variables format
  doc: more consistency in environment variables format
  doc: change environment variables format
  doc: clearer rule about formatting literals

4 years agomailmap: use main email address for dturner
David Turner [Mon, 4 Jul 2016 06:05:24 +0000 (02:05 -0400)]
mailmap: use main email address for dturner

Signed-off-by: David Turner <novalis@novalis.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoStart preparing for 2.9.1
Junio C Hamano [Mon, 27 Jun 2016 16:59:51 +0000 (09:59 -0700)]
Start preparing for 2.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'rs/xdiff-hunk-with-func-line' into maint
Junio C Hamano [Mon, 27 Jun 2016 16:56:24 +0000 (09:56 -0700)]
Merge branch 'rs/xdiff-hunk-with-func-line' into maint

"git show -W" (extend hunks to cover the entire function, delimited
by lines that match the "funcname" pattern) used to show the entire
file when a change added an entire function at the end of the file,
which has been fixed.

* rs/xdiff-hunk-with-func-line:
  xdiff: fix merging of appended hunk with -W
  grep: -W: don't extend context to trailing empty lines
  t7810: add test for grep -W and trailing empty context lines
  xdiff: don't trim common tail with -W
  xdiff: -W: don't include common trailing empty lines in context
  xdiff: ignore empty lines before added functions with -W
  xdiff: handle appended chunks better with -W
  xdiff: factor out match_func_rec()
  t4051: rewrite, add more tests

4 years agoMerge branch 'jk/rev-list-count-with-bitmap' into maint
Junio C Hamano [Mon, 27 Jun 2016 16:56:24 +0000 (09:56 -0700)]
Merge branch 'jk/rev-list-count-with-bitmap' into maint

"git rev-list --count" whose walk-length is limited with "-n"
option did not work well with the counting optimized to look at the
bitmap index.

* jk/rev-list-count-with-bitmap:
  rev-list: disable bitmaps when "-n" is used with listing objects
  rev-list: "adjust" results of "--count --use-bitmap-index -n"

4 years agoMerge branch 'et/pretty-format-c-auto' into maint
Junio C Hamano [Mon, 27 Jun 2016 16:56:23 +0000 (09:56 -0700)]
Merge branch 'et/pretty-format-c-auto' into maint

The commands in `git log` family take %C(auto) in a custom format
string.  This unconditionally turned the color on, ignoring
--no-color or with --color=auto when the output is not connected to
a tty; this was corrected to make the format truly behave as
"auto".

* et/pretty-format-c-auto:
  format_commit_message: honor `color=auto` for `%C(auto)`

4 years agoMerge branch 'ew/daemon-socket-keepalive' into maint
Junio C Hamano [Mon, 27 Jun 2016 16:56:22 +0000 (09:56 -0700)]
Merge branch 'ew/daemon-socket-keepalive' into maint

When "git daemon" is run without --[init-]timeout specified, a
connection from a client that silently goes offline can hang around
for a long time, wasting resources.  The socket-level KEEPALIVE has
been enabled to allow the OS to notice such failed connections.

* ew/daemon-socket-keepalive:
  daemon: enable SO_KEEPALIVE for all sockets

4 years agot7800: readlink may not be available
Armin Kunaschik [Tue, 31 May 2016 00:26:12 +0000 (02:26 +0200)]
t7800: readlink may not be available

The readlink(1) command is not available on all platforms (notably
not on AIX and HP-UX) and can be replaced in this test with the
"workaround"

ls -ld <name> | sed -e 's/.* -> //'

This is no universal readlink replacement but works in the
controlled test environment well enough.

Signed-off-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agolocal_tzoffset: detect errors from tm_to_time_t
Jeff King [Mon, 20 Jun 2016 21:14:14 +0000 (17:14 -0400)]
local_tzoffset: detect errors from tm_to_time_t

When we want to know the local timezone offset at a given
timestamp, we compute it by asking for localtime() at the
given time, and comparing the offset to GMT at that time.
However, there's some juggling between time_t and "struct
tm" which happens, which involves calling our own
tm_to_time_t().

If that function returns an error (e.g., because it only
handles dates up to the year 2099), it returns "-1", which
we treat as a time_t, and is clearly bogus, leading to
bizarre timestamps (that seem to always adjust the time back
to (time_t)(uint32_t)-1, in the year 2106).

It's not a good idea for local_tzoffset() to simply die
here; it would make it hard to run "git log" on a repository
with funny timestamps. Instead, let's just treat such cases
as "zero offset".

Reported-by: Norbert Kiesel <nkiesel@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot0006: test various date formats
Jeff King [Mon, 20 Jun 2016 21:11:59 +0000 (17:11 -0400)]
t0006: test various date formats

We ended up testing some of these date formats throughout
the rest of the suite (e.g., via for-each-ref's
"$(authordate:...)" format), but we never did so
systematically. t0006 is the right place for unit-testing of
our date-handling code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot0006: rename test-date's "show" to "relative"
Jeff King [Mon, 20 Jun 2016 21:10:29 +0000 (17:10 -0400)]
t0006: rename test-date's "show" to "relative"

The "show" tests are really only checking relative formats;
we should make that more clear.

This also frees up the "show" name to later check other
formats. We could later fold "relative" into a more generic
"show" command, but it's not worth it.  Relative times are a
special case already because we have to munge the concept of
"now" in our tests.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agomingw: let the build succeed with DEVELOPER=1
Johannes Schindelin [Sat, 18 Jun 2016 12:38:36 +0000 (14:38 +0200)]
mingw: let the build succeed with DEVELOPER=1

The recently introduced developer flags identified a couple of
old-style function declarations in the Windows-specific code where
the parameter list was left empty instead of specifying "void"
explicitly. Let's just fix them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoclone: do not let --depth imply --shallow-submodules
Junio C Hamano [Sun, 19 Jun 2016 20:51:56 +0000 (13:51 -0700)]
clone: do not let --depth imply --shallow-submodules

In v2.9.0, we prematurely flipped the default to force cloning
submodules shallowly, when the superproject is getting cloned
shallowly.  This is likely to fail when the upstream repositories
submodules are cloned from a repository that is not prepared to
serve histories that ends at a commit that is not at the tip of a
branch, and we know the world is not yet ready.

Use a safer default to clone the submodules fully, unless the user
tells us that she knows that the upstream repository of the
submodules are willing to cooperate with "--shallow-submodules"
option.

Noticed-by: Vadim Eisenberg <VADIME@il.ibm.com>
Helped-by: Jeff King <peff@peff.net>
Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agosh-setup: enclose setting of ${VAR=default} in double-quotes
LE Manh Cuong [Sat, 18 Jun 2016 20:26:03 +0000 (03:26 +0700)]
sh-setup: enclose setting of ${VAR=default} in double-quotes

We often make sure an environment variable is set to
something, either set by the user (in which case we do not
molest it) or set it to our default value (otherwise), with

: ${VAR=default value}

i.e. running the no-op command ":" with ${VAR} as its
parameters (or the default value we supply), relying on that
":" is a no-op.

This pattern, even though it is no-op from correctness point
of view, still can be expensive if the existing value in VAR
has shell glob (because they will be expanded against
filesystem entities) and IFS whitespaces (because the value
need to be split into multiple parameters).  Our invocation
of ":" command does not care if the parameter given to it is
after the value in VAR goes through these processing.

Enclosing the whole thing in double-quote, i.e.

: "${VAR=default value}"

avoids paying the unnecessary cost, so let's do so.

Signed-off-by: LE Manh Cuong <cuong.manhle.vn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoDocumentation/technical: signed merge tag format
Michael J Gruber [Fri, 17 Jun 2016 07:46:11 +0000 (09:46 +0200)]
Documentation/technical: signed merge tag format

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoDocumentation/technical: signed commit format
Michael J Gruber [Fri, 17 Jun 2016 07:46:10 +0000 (09:46 +0200)]
Documentation/technical: signed commit format

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoDocumentation/technical: signed tag format
Michael J Gruber [Fri, 17 Jun 2016 07:46:09 +0000 (09:46 +0200)]
Documentation/technical: signed tag format

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoDocumentation/technical: describe signature formats
Michael J Gruber [Fri, 17 Jun 2016 07:46:08 +0000 (09:46 +0200)]
Documentation/technical: describe signature formats

We use different types of signature formats in different places.
Set up the infrastructure and overview to describe them systematically
in our technical documentation.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agorebase: update comment about FreeBSD /bin/sh
Ed Maste [Fri, 17 Jun 2016 15:33:29 +0000 (11:33 -0400)]
rebase: update comment about FreeBSD /bin/sh

Commit 9f50d32 introduced a fix for FreeBSD /bin/sh misbehaviour
when dot-sourcing a file containing "return" statements outside of
any function, from a function in another shell script. That issue
affects FreeBSD 9.x, and is not present in the /bin/sh in FreeBSD
10.3 and later. Update the comment to clarify this.

The example from 9f50d32's commit message produces the expected output
on FreeBSD 10.3 and -CURRENT (the upcoming 11.0):

% sh script1.sh
only this line should show
%

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoDocumentation: GPG capitalization
Dave Nicolson [Thu, 16 Jun 2016 22:15:44 +0000 (22:15 +0000)]
Documentation: GPG capitalization

When "GPG" is used in a sentence it is now consistently capitalized.
When referring to the binary it is left as "gpg".

Signed-off-by: David Nicolson <david.nicolson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agobisect: always call setup_revisions after init_revisions
Jeff King [Thu, 16 Jun 2016 23:37:20 +0000 (19:37 -0400)]
bisect: always call setup_revisions after init_revisions

init_revisions() initializes the rev_info struct to default
values, and setup_revisions() parses any command-line
arguments and finalizes the struct.

In e22278c (bisect: display first bad commit without forking
a new process, 2009-05-28), a show_diff_tree() was added
that calls the former but not the latter. It doesn't have
any arguments to parse, but it still should do the
finalizing step.

This may have caused other minor bugs over the years, but it
became much more prominent after fe37a9c (pretty: allow
tweaking tabwidth in --expand-tabs, 2016-03-29). That leaves
the expected tab width as "-1", rather than the true default
of "8". When we see a commit with tabs to be expanded, we
end up trying to add (size_t)-1 spaces to a strbuf, which
complains about the integer overflow.

The fix is easy: just call setup_revisions() with no
arguments.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agopretty.c: support <direction>|(<negative number>) forms
Nguyễn Thái Ngọc Duy [Thu, 16 Jun 2016 13:18:38 +0000 (20:18 +0700)]
pretty.c: support <direction>|(<negative number>) forms

%>|(num), %><|(num) and %<|(num), where num is a positive number, sets a
fixed column from the screen's left border. There is no way for us to
specifiy a column relative to the right border, which is useful when you
want to make use of all terminal space (on big screens). Use negative
num for that. Inspired by Go's array syntax (*).

(*) I know Python has this first (or before Go, at least) but the idea
didn't occur to me until I learned Go.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agopretty: pass graph width to pretty formatting for use in '%>|(N)'
Josef Kufner [Thu, 16 Jun 2016 13:18:37 +0000 (20:18 +0700)]
pretty: pass graph width to pretty formatting for use in '%>|(N)'

Pass graph width to pretty formatting, to make N in '%>|(N)'
include columns consumed by graph rendered when --graph option
is in use.

For example, in the output of

  git log --all --graph --pretty='format: [%>|(20)%h] %ar%d'

this change will make all commit hashes align at 20th column from
the edge of the terminal, not from the edge of the graph.

Signed-off-by: Josef Kufner <josef@kufner.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoadd--interactive: respect diff.compactionHeuristic
Jeff King [Thu, 16 Jun 2016 12:27:29 +0000 (08:27 -0400)]
add--interactive: respect diff.compactionHeuristic

We use plumbing to generate the diff, so it doesn't
automatically pick up UI config like compactionHeuristic.
Let's forward it on, since interactive adding is porcelain.

Note that we only need to handle the "true" case. There's no
point in passing --no-compaction-heuristic when the variable
is false, since nothing else could have turned it on.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agogit-svn: document the 'git svn propset' command
Alfred Perlstein [Wed, 15 Jun 2016 05:19:50 +0000 (22:19 -0700)]
git-svn: document the 'git svn propset' command

Add example usage to the git-svn documentation.

Reported-by: Joseph Pecoraro <pecoraro@apple.com>
Signed-off-by: Alfred Perlstein <alfred@freebsd.org>
Reviewed-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoblame, line-log: do not loop around deref_tag()
Junio C Hamano [Tue, 14 Jun 2016 20:38:14 +0000 (13:38 -0700)]
blame, line-log: do not loop around deref_tag()

These callers appear to expect that deref_tag() is to peel one layer
of a tag, but the function does not work that way; it has its own
loop to unwrap tags until an object that is not a tag appears.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agognome-keyring: Don't hard-code pkg-config executable
Heiko Becker [Tue, 14 Jun 2016 11:27:05 +0000 (13:27 +0200)]
gnome-keyring: Don't hard-code pkg-config executable

Helpful if your pkg-config executable has a prefix based on the
architecture, for example.

Signed-off-by: Heiko Becker <heirecka@exherbo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agobuiltin/fetch.c: don't free remote->name after fetch
Keith McGuigan [Tue, 14 Jun 2016 18:28:56 +0000 (14:28 -0400)]
builtin/fetch.c: don't free remote->name after fetch

Make fetch's string_list of remote names own all of its string items
(strdup'ing when necessary) so that it can deallocate them safely
when clearing.

Signed-off-by: Keith McGuigan <kmcguigan@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agostrbuf: describe the return value of strbuf_read_file
Pranit Bauva [Tue, 14 Jun 2016 06:14:11 +0000 (11:44 +0530)]
strbuf: describe the return value of strbuf_read_file

Mentored-by: Lars Schneider <larsxschneider@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agofetch: document that pruning happens before fetching
Jeff King [Mon, 13 Jun 2016 23:58:51 +0000 (19:58 -0400)]
fetch: document that pruning happens before fetching

This was changed in 10a6cc8 (fetch --prune: Run prune before
fetching, 2014-01-02), but it seems that nobody in that
discussion realized we were advertising the "after"
explicitly.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoGit 2.9 158/head v2.9.0
Junio C Hamano [Mon, 13 Jun 2016 17:42:13 +0000 (10:42 -0700)]
Git 2.9

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge tag 'l10n-2.9.0-rc0' of git://github.com/git-l10n/git-po
Junio C Hamano [Mon, 13 Jun 2016 01:00:57 +0000 (18:00 -0700)]
Merge tag 'l10n-2.9.0-rc0' of git://github.com/git-l10n/git-po

l10n-2.9.0-rc0

* tag 'l10n-2.9.0-rc0' of git://github.com/git-l10n/git-po:
  l10n: ko.po: Update Korean translation
  l10n: ru.po: update Russian translation
  l10n: de.po: translate 104 new messages
  l10n: zh_CN: review for git v2.9.0 l10n round 1
  l10n: zh_CN: for git v2.9.0 l10n round 1
  l10n: pt_PT: update Portuguese translation
  l10n: pt_PT: update according to git-gui glossary
  l10n: pt_PT: merge git.pot file
  l10n: Updated Bulgarian translation of git (2597t,0f,0u)
  l10n: sv.po: Update Swedish translation (2597t0f0u)
  l10n: fr.po v2.9.0rnd1
  l10n: Updated Vietnamese translation (2597t)
  l10n: git.pot: v2.9.0 round 1 (104 new, 37 removed)
  l10n: fr.po Fixed grammar mistake

4 years agol10n: ko.po: Update Korean translation
Changwoo Ryu [Sat, 11 Jun 2016 16:25:58 +0000 (01:25 +0900)]
l10n: ko.po: Update Korean translation

4 years agoMerge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru
Jiang Xin [Sat, 11 Jun 2016 12:21:52 +0000 (20:21 +0800)]
Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru

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

4 years agol10n: ru.po: update Russian translation
Dimitriy Ryazantcev [Sat, 11 Jun 2016 09:53:43 +0000 (12:53 +0300)]
l10n: ru.po: update Russian translation

Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
4 years agoHopefully the final last-minute update before 2.9 final
Junio C Hamano [Fri, 10 Jun 2016 22:30:19 +0000 (15:30 -0700)]
Hopefully the final last-minute update before 2.9 final

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'jk/diff-compact-heuristic'
Junio C Hamano [Fri, 10 Jun 2016 22:26:06 +0000 (15:26 -0700)]
Merge branch 'jk/diff-compact-heuristic'

It turns out that the earlier effort to update the heuristics may
want to use a bit more time to mature.  Turn it off by default.

* jk/diff-compact-heuristic:
  diff: disable compaction heuristic for now

4 years agoMerge branch 'jk/shell-portability'
Junio C Hamano [Fri, 10 Jun 2016 22:26:04 +0000 (15:26 -0700)]
Merge branch 'jk/shell-portability'

test fixes.

* jk/shell-portability:
  t5500 & t7403: lose bash-ism "local"
  test-lib: add in-shell "env" replacement

4 years agoMerge branch 'jc/t2300-setup'
Junio C Hamano [Fri, 10 Jun 2016 22:26:04 +0000 (15:26 -0700)]
Merge branch 'jc/t2300-setup'

A test fix.

* jc/t2300-setup:
  t2300: run git-sh-setup in an environment that better mimics the real life

4 years agoconfig.c: fix misspelt "occurred" in an error message
Peter Colberg [Fri, 10 Jun 2016 19:05:26 +0000 (15:05 -0400)]
config.c: fix misspelt "occurred" in an error message

Signed-off-by: Peter Colberg <peter@colberg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agorefs.h: fix misspelt "occurred" in a comment
Peter Colberg [Fri, 10 Jun 2016 19:05:26 +0000 (15:05 -0400)]
refs.h: fix misspelt "occurred" in a comment

Signed-off-by: Peter Colberg <peter@colberg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodiff: disable compaction heuristic for now
Junio C Hamano [Fri, 10 Jun 2016 17:58:55 +0000 (10:58 -0700)]
diff: disable compaction heuristic for now

http://lkml.kernel.org/g/20160610075043.GA13411@sigill.intra.peff.net
reports that a change to add a new "function" with common ending
with the existing one at the end of the file is shown like this:

    def foo
      do_foo_stuff()

   +  common_ending()
   +end
   +
   +def bar
   +  do_bar_stuff()
   +
      common_ending()
    end

when the new heuristic is in use.  In reality, the change is to add
the blank line before "def bar" and everything below, which is what
the code without the new heuristic shows.

Disable the heuristics by default, and resurrect the documentation
for the option and the configuration variables, while clearly
marking the feature as still experimental.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: de.po: translate 104 new messages
Ralf Thielow [Fri, 10 Jun 2016 16:00:46 +0000 (18:00 +0200)]
l10n: de.po: translate 104 new messages

Translate 104 new messages came from git.pot update in f517e50
(l10n: git.pot: v2.9.0 round 1 (104 new, 37 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
4 years agoxdiff: fix merging of appended hunk with -W
René Scharfe [Thu, 9 Jun 2016 21:54:48 +0000 (23:54 +0200)]
xdiff: fix merging of appended hunk with -W

When -W is given we search the lines between the end of the current
context and the next change for a function line.  If there is none then
we merge those two hunks as they must be part of the same function.

If the next change is an appended chunk we abort the search early in
get_func_line(), however, because its line number is out of range.  Fix
that by searching from the end of the pre-image in that case instead.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoUse "working tree" instead of "working directory" for git status
Lars Vogel [Thu, 9 Jun 2016 18:19:30 +0000 (20:19 +0200)]
Use "working tree" instead of "working directory" for git status

Working directory can be easily confused with the current directory.
In one of my patches I already updated the usage of working directory
with working tree for the man page but I noticed that git status also
uses this incorrect term.

Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: zh_CN: review for git v2.9.0 l10n round 1
Ray Chen [Sun, 5 Jun 2016 16:06:17 +0000 (00:06 +0800)]
l10n: zh_CN: review for git v2.9.0 l10n round 1

Signed-off-by: Ray Chen <oldsharp@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
4 years agodoc: change configuration variables format
Tom Russello [Wed, 8 Jun 2016 17:23:16 +0000 (19:23 +0200)]
doc: change configuration variables format

This change configuration variables that where in italic style
to monospace font according to the guideline. It was obtained with

grep '[[:alpha:]]*\.[[:alpha:]]*::$' config.txt | \
sed -e 's/::$//' -e 's/\./\\\\./' | \
xargs -iP perl -pi -e "s/\'P\'/\`P\`/g" ./*.txt

Signed-off-by: Tom Russello <tom.russello@grenoble-inp.org>
Signed-off-by: Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org>
Signed-off-by: Samuel Groot <samuel.groot@grenoble-inp.org>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodoc: more consistency in environment variables format
Tom Russello [Tue, 7 Jun 2016 22:35:07 +0000 (00:35 +0200)]
doc: more consistency in environment variables format

Wrap with backticks (monospaced font) unwrapped or single-quotes wrapped
(italic type) environment variables which are followed by the word
"environment". It was obtained with:

perl -pi -e "s/\'?(\\\$?[0-9A-Z\_]+)\'?(?= environment ?)/\`\1\`/g" *.txt

One of the main purposes is to stick to the CodingGuidelines as possible so
that people writting new documentation by mimicking the existing are more likely
to have it right (even if they didn't read the CodingGuidelines).

Signed-off-by: Tom Russello <tom.russello@grenoble-inp.org>
Signed-off-by: Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org>
Signed-off-by: Samuel Groot <samuel.groot@grenoble-inp.org>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodoc: change environment variables format
Tom Russello [Tue, 7 Jun 2016 22:35:06 +0000 (00:35 +0200)]
doc: change environment variables format

This change GIT_* variables that where in italic style to monospaced font
according to the guideline. It was obtained with

perl -pi -e "s/\'(GIT_.*?)\'/\`\1\`/g" *.txt

One of the main purposes is to stick to the CodingGuidelines as possible so
that people writting new documentation by mimicking the existing are more likely
to have it right (even if they didn't read the CodingGuidelines).

Signed-off-by: Tom Russello <tom.russello@grenoble-inp.org>
Signed-off-by: Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org>
Signed-off-by: Samuel Groot <samuel.groot@grenoble-inp.org>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodoc: clearer rule about formatting literals
Tom Russello [Tue, 7 Jun 2016 22:35:05 +0000 (00:35 +0200)]
doc: clearer rule about formatting literals

Make the guideline text that we want for our documentation clearer.

Signed-off-by: Tom Russello <tom.russello@grenoble-inp.org>
Signed-off-by: Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org>
Signed-off-by: Samuel Groot <samuel.groot@grenoble-inp.org>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotree-diff: avoid alloca for large allocations
Jeff King [Tue, 7 Jun 2016 22:53:00 +0000 (18:53 -0400)]
tree-diff: avoid alloca for large allocations

Commit 72441af (tree-diff: rework diff_tree() to generate
diffs for multiparent cases as well, 2014-04-07) introduced
the use of alloca so that the common cases of commits with 1
or 2 parents would not be adversely affected by going
through the multi-parent code.

However, our xalloca is not ideal when the number of parents
grows very large:

  1. If the requested size is too large for our stack,
     alloca() has no way to tell us, and we simply segfault
     while trying to access the memory.

  2. It does not use our usual memory_limit_check() logic.

I measured, and alloca is indeed buying us a very small
speedup over xmalloc()/free(). So we'd want to keep
something like it.

This patch simply puts a conditional in place at each
callsite: we use alloca for common known-small numbers of
parents, and otherwise use the heap. We are technically
still vulnerable to (1), but no more so than if we simply
put a few dozen bytes on the stack, which we must do all the
time anyway. And likewise, we technically miss a memory
limit check if it is tiny, but such a limit is pointless.

An alternative to this would be implement something like:

  struct tree *tp, tp_fallback[2];
  if (nparent <= ARRAY_SIZE(tp_fallback))
          tp = tp_fallback;
  else
  ALLOC_ARRAY(tp, nparent);
  ...
  if (tp != tp_fallback)
  free(tp);

That would let us drop our xalloca() portability code
entirely. But in my measurements, this seemed to perform
slightly worse than the xalloca solution.

Note in the example above, and in the patch below, I've used
ALLOC_ARRAY() to replace the manual xmalloc(nr * sizeof(*x)).
Besides being shorter, this has the bonus that one cannot
accidentally overflow a size_t during that computation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoadd: add --chmod=+x / --chmod=-x options
Edward Thomson [Tue, 31 May 2016 22:08:18 +0000 (17:08 -0500)]
add: add --chmod=+x / --chmod=-x options

The executable bit will not be detected (and therefore will not be
set) for paths in a repository with `core.filemode` set to false,
though the users may still wish to add files as executable for
compatibility with other users who _do_ have `core.filemode`
functionality.  For example, Windows users adding shell scripts may
wish to add them as executable for compatibility with users on
non-Windows.

Although this can be done with a plumbing command
(`git update-index --add --chmod=+x foo`), teaching the `git-add`
command allows users to set a file executable with a command that
they're already familiar with.

Signed-off-by: Edward Thomson <ethomson@edwardthomson.com>
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoregex: fix a SIZE_MAX macro redefinition warning
Ramsay Jones [Tue, 7 Jun 2016 00:35:33 +0000 (01:35 +0100)]
regex: fix a SIZE_MAX macro redefinition warning

Since commit 56a1a3ab ("Silence GCC's \"cast of pointer to integer of a
different size\" warning", 26-10-2015), sparse has been issuing a macro
redefinition warning for the SIZE_MAX macro. However, gcc did not issue
any such warning.

After commit 56a1a3ab, in terms of the order of #includes and #defines,
the code looked something like:

  $ cat -n junk.c
       1 #include <stddef.h>
       2
       3 #define SIZE_MAX ((size_t) -1)
       4
       5 #include <stdint.h>
       6
       7 int main(int argc, char *argv[])
       8 {
       9 return 0;
      10 }
  $
  $ gcc junk.c
  $

However, if you compile that file with -Wsystem-headers, then it will
also issue a warning. Having set -Wsystem-headers in CFLAGS, using the
config.mak file, then (on cygwin):

  $ make compat/regex/regex.o
      CC compat/regex/regex.o
  In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.3/include/stdint.h:9:0,
                   from compat/regex/regcomp.c:21,
                   from compat/regex/regex.c:77:
  /usr/include/stdint.h:362:0: warning: "SIZE_MAX" redefined
   #define SIZE_MAX (__SIZE_MAX__)
   ^
  In file included from compat/regex/regex.c:69:0:
  compat/regex/regex_internal.h:108:0: note: this is the location of the previous definition
   # define SIZE_MAX ((size_t) -1)
   ^
  $

The compilation of the compat/regex code is somewhat unusual in that the
regex.c file directly #includes the other c files (regcomp.c, regexec.c
and regex_internal.c). Commit 56a1a3ab added an #include of <stdint.h>
to the regcomp.c file, which results in the redefinition, since this is
included after the regex_internal.h header. This header file contains a
'fallback' definition for SIZE_MAX, in order to support systems which do
not have the <stdint.h> header (the HAVE_STDINT_H macro is not defined).

In order to suppress the warning, we move the #include of <stdint.h>
from regcomp.c to the start of the compilation unit, close to the top
of regex.c, prior to the #include of the regex_internal.h header.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoreflog: continue walking the reflog past root commits
SZEDER Gábor [Fri, 3 Jun 2016 20:42:35 +0000 (22:42 +0200)]
reflog: continue walking the reflog past root commits

If a repository contains more than one root commit, then its HEAD
reflog may contain multiple "creation events", i.e. entries whose
"from" value is the null sha1.  Listing such a reflog currently stops
prematurely at the first such entry, even when the reflog still
contains older entries.  This can scare users into thinking that their
reflog got truncated after 'git checkout --orphan'.

Continue walking the reflog past such creation events based on the
preceeding reflog entry's "new" value.

The test 'symbolic-ref writes reflog entry' in t1401-symbolic-ref
implicitly relies on the current behavior of the reflog walker to stop
at a root commit and thus to list only the reflog entries that are
relevant for that test.  Adjust the test to explicitly specify the
number of relevant reflog entries to be listed.

Reported-by: Patrik Gustafsson <pvn@textalk.se>
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoGit 2.9-rc2 v2.9.0-rc2
Junio C Hamano [Mon, 6 Jun 2016 21:19:45 +0000 (14:19 -0700)]
Git 2.9-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoSync with 2.8.4
Junio C Hamano [Mon, 6 Jun 2016 21:30:49 +0000 (14:30 -0700)]
Sync with 2.8.4

* maint:
  Git 2.8.4

4 years agoGit 2.8.4 v2.8.4
Junio C Hamano [Mon, 6 Jun 2016 21:29:32 +0000 (14:29 -0700)]
Git 2.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'kb/msys2-tty' into maint
Junio C Hamano [Mon, 6 Jun 2016 21:27:38 +0000 (14:27 -0700)]
Merge branch 'kb/msys2-tty' into maint

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*)

4 years agoMerge branch 'da/difftool' into maint
Junio C Hamano [Mon, 6 Jun 2016 21:27:37 +0000 (14:27 -0700)]
Merge branch 'da/difftool' into maint

"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

4 years agoMerge branch 'tb/core-eol-fix' into maint
Junio C Hamano [Mon, 6 Jun 2016 21:27:36 +0000 (14:27 -0700)]
Merge branch 'tb/core-eol-fix' into maint

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

4 years agoMerge branch 'ar/diff-args-osx-precompose' into maint
Junio C Hamano [Mon, 6 Jun 2016 21:27:35 +0000 (14:27 -0700)]
Merge branch 'ar/diff-args-osx-precompose' into maint

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

4 years agoMerge branch 'sb/submodule-helper-relative-path'
Junio C Hamano [Mon, 6 Jun 2016 21:18:55 +0000 (14:18 -0700)]
Merge branch 'sb/submodule-helper-relative-path'

A bash-ism "local" has been removed from "git submodule" scripted
Porcelain.

* sb/submodule-helper-relative-path:
  submodule: remove bashism from shell script

4 years agoMerge branch 'sb/submodule-helper-list-signal-unmatch-via-exit-status'
Junio C Hamano [Mon, 6 Jun 2016 21:18:55 +0000 (14:18 -0700)]
Merge branch 'sb/submodule-helper-list-signal-unmatch-via-exit-status'

The way how "submodule--helper list" signals unmatch error to its
callers has been updated.

* sb/submodule-helper-list-signal-unmatch-via-exit-status:
  submodule--helper: offer a consistent API

4 years agogit-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
Ville Skyttä [Mon, 6 Jun 2016 16:29:33 +0000 (19:29 +0300)]
git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha

When the shell is in "nounset" or "set -u" mode, referencing unset or
null variables results in an error. Protect $ZSH_VERSION and
$BASH_VERSION against that, and initialize $short_sha before use.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocherry-pick: allow to pick to unborn branches
Michael J Gruber [Mon, 6 Jun 2016 13:23:54 +0000 (15:23 +0200)]
cherry-pick: allow to pick to unborn branches

cherry-pick allows to pick single commits to an empty HEAD, but not
multiple commits.

Allow the multiple commit case, too.

Reported-by: Fabrizio Cucci <fabrizio.cucci@gmail.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: zh_CN: for git v2.9.0 l10n round 1
Jiang Xin [Sun, 29 May 2016 12:40:35 +0000 (20:40 +0800)]
l10n: zh_CN: for git v2.9.0 l10n round 1

Update 104 new translations (2596t1f0u) for git v2.9.0-rc0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
4 years agoAlmost ready for 2.9-rc2
Junio C Hamano [Fri, 3 Jun 2016 21:38:35 +0000 (14:38 -0700)]
Almost ready for 2.9-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'rs/apply-name-terminate'
Junio C Hamano [Fri, 3 Jun 2016 21:38:04 +0000 (14:38 -0700)]
Merge branch 'rs/apply-name-terminate'

Code clean-up.

* rs/apply-name-terminate:
  apply: remove unused parameters from name_terminate()

4 years agoMerge branch 'rs/patch-id-use-skip-prefix'
Junio C Hamano [Fri, 3 Jun 2016 21:38:03 +0000 (14:38 -0700)]
Merge branch 'rs/patch-id-use-skip-prefix'

Code clean-up.

* rs/patch-id-use-skip-prefix:
  patch-id: use starts_with() and skip_prefix()

4 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

4 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

4 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

4 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

4 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