]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
6 years agoRevert "color: check color.ui in git_default_config()"
Jeff King [Fri, 13 Oct 2017 17:24:31 +0000 (13:24 -0400)] 
Revert "color: check color.ui in git_default_config()"

This reverts commit 136c8c8b8fa39f1315713248473dececf20f8fe7.

That commit was trying to address a bug caused by 4c7f1819b3
(make color.ui default to 'auto', 2013-06-10), in which
plumbing like diff-tree defaulted to "auto" color, but did
not respect a "color.ui" directive to disable it.

But it also meant that we started respecting "color.ui" set
to "always". This was a known problem, but 4c7f1819b3 argued
that nobody ought to be doing that. However, that turned out
to be wrong, and we got a number of bug reports related to
"add -p" regressing in v2.14.2.

Let's revert 136c8c8b8, fixing the regression to "add -p".
This leaves the problem from 4c7f1819b3 unfixed, but:

  1. It's a pretty obscure problem in the first place. I
     only noticed it while working on the color code, and we
     haven't got a single bug report or complaint about it.

  2. We can make a more moderate fix on top by respecting
     "never" but not "always" for plumbing commands. This
     is just the minimal fix to go back to the working state
     we had before v2.14.2.

Note that this isn't a pure revert. We now have a test in
t3701 which shows off the "add -p" regression. This can be
flipped to success.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoRevert "t6006: drop "always" color config tests"
Jeff King [Fri, 13 Oct 2017 17:23:41 +0000 (13:23 -0400)] 
Revert "t6006: drop "always" color config tests"

This reverts commit c5bdfe677cfab5b2e87771c35565d44d3198efda.

That commit was done primarily to prepare for the weakening
of "always" in 6be4595edb (color: make "always" the same as
"auto" in config, 2017-10-03). But since we've now reverted
6be4595edb, there's no need for us to remove "-c
color.ui=always" from the tests. And in fact it's a good
idea to restore these tests, to make sure that "always"
continues to work.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoRevert "color: make "always" the same as "auto" in config"
Jeff King [Fri, 13 Oct 2017 17:23:24 +0000 (13:23 -0400)] 
Revert "color: make "always" the same as "auto" in config"

This reverts commit 6be4595edb8e5b616c6e8b9fbc78b0f831fa2a87.

That commit weakened the "always" setting of color config so
that it acted as "auto". This was meant to solve regressions
in v2.14.2 in which setting "color.ui=always" in the on-disk
config broke scripts like add--interactive, because the
plumbing diff commands began to generate color output.

This was due to 136c8c8b8f (color: check color.ui in
git_default_config(), 2017-07-13), which was in turn trying
to fix issues caused by 4c7f1819b3 (make color.ui default to
'auto', 2013-06-10). But in weakening "always", we created
even more problems, as people expect to be able to use "git
-c color.ui=always" to force color (especially because some
commands don't have their own --color flag). We can fix that
by special-casing the command-line "-c", but now things are
getting pretty confusing.

Instead of piling hacks upon hacks, let's start peeling off
the hacks. The first step is dropping the weakening of
"always", which this revert does.

Note that we could actually revert the whole series merged
in by da15b78e52642bd45fd5513ab0000fdf2e58a6f4. Most of that
series consists of preparations to the tests to handle the
weakening of "-c color.ui=always". But it's worth keeping
for a few reasons:

  - there are some other preparatory cleanups, like
    e433749d86 (test-terminal: set TERM=vt100, 2017-10-03)

  - it adds "--color" options more consistently in
    0c88bf5050 (provide --color option for all ref-filter
    users, 2017-10-03)

  - some of the cases dropping "-c" end up being more robust
    and realistic tests, as in 01c94e9001 (t7508: use
    test_terminal for color output, 2017-10-03)

  - the preferred tool for overriding config is "--color",
    and we should be modeling that consistently

We can individually revert the few commits necessary to
restore some useful tests (which will be done on top of this
patch).

Note that this isn't a pure revert; we'll keep the test
added in t3701, but mark it as failure for now.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'jk/ui-color-always-to-auto-maint' (early part) into jk/ref-filter-color...
Junio C Hamano [Tue, 17 Oct 2017 06:08:31 +0000 (15:08 +0900)] 
Merge branch 'jk/ui-color-always-to-auto-maint' (early part) into jk/ref-filter-colors-fix-maint

* 'jk/ui-color-always-to-auto-maint' (early part):
  color: make "always" the same as "auto" in config
  provide --color option for all ref-filter users
  t3205: use --color instead of color.branch=always
  t3203: drop "always" color test
  t6006: drop "always" color config tests
  t7502: use diff.noprefix for --verbose test
  t7508: use test_terminal for color output
  t3701: use test-terminal to collect color output
  t4015: prefer --color to -c color.diff=always
  test-terminal: set TERM=vt100

6 years agocolor: make "always" the same as "auto" in config
Jeff King [Tue, 3 Oct 2017 13:46:06 +0000 (09:46 -0400)] 
color: make "always" the same as "auto" in config

It can be handy to use `--color=always` (or it's synonym
`--color`) on the command-line to convince a command to
produce color even if it's stdout isn't going to the
terminal or a pager.

What's less clear is whether it makes sense to set config
variables like color.ui to `always`. For a one-shot like:

  git -c color.ui=always ...

it's potentially useful (especially if the command doesn't
directly support the `--color` option). But setting `always`
in your on-disk config is much muddier, as you may be
surprised when piped commands generate colors (and send them
to whatever is consuming the pipe downstream).

Some people have done this anyway, because:

  1. The documentation for color.ui makes it sound like
     using `always` is a good idea, when you almost
     certainly want `auto`.

  2. Traditionally not every command (and especially not
     plumbing) respected color.ui in the first place. So
     the confusion came up less frequently than it might
     have.

The situation changed in 136c8c8b8f (color: check color.ui
in git_default_config(), 2017-07-13), which negated point
(2): now scripts using only plumbing commands (like
add-interactive) are broken by this setting.

That commit was fixing real issues (e.g., by making
`color.ui=never` work, since `auto` is the default), so we
don't want to just revert it.  We could turn `always` into a
noop in plumbing commands, but that creates a hard-to-explain
inconsistency between the plumbing and other commands.

Instead, let's just turn `always` into `auto` for all config.
This does break the "one-shot" config shown above, but again,
we're probably better to have simple and consistent rules than
to try to special-case command-line config.

There is one place where `always` should retain its meaning:
on the command line, `--color=always` should continue to be
the same as `--color`, overriding any isatty checks. Since the
command-line parser also depends on git_config_colorbool(), we
can use the existence of the "var" string to deterine whether
we are serving the command-line or the config.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoprovide --color option for all ref-filter users
Jeff King [Tue, 3 Oct 2017 13:45:47 +0000 (09:45 -0400)] 
provide --color option for all ref-filter users

When ref-filter learned about want_color() in 11b087adfd
(ref-filter: consult want_color() before emitting colors,
2017-07-13), it became useful to be able to turn colors off
and on for specific commands. For git-branch, you can do so
with --color/--no-color.

But for git-for-each-ref and git-tag, the other users of
ref-filter, you have no option except to tweak the
"color.ui" config setting. Let's give both of these commands
the usual color command-line options.

This is a bit more obvious as a method for overriding the
config. And it also prepares us for the behavior of "always"
changing (so that we are still left with a way of forcing
color when our output goes to a non-terminal).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot3205: use --color instead of color.branch=always
Jeff King [Tue, 3 Oct 2017 13:45:18 +0000 (09:45 -0400)] 
t3205: use --color instead of color.branch=always

To test the color output, we must convince "git branch" to
write colors to a non-terminal. We do that now by setting
the color config to "always".  In preparation for the
behavior of "always" changing, let's switch to using the
"--color" command-line option, which is more direct.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot3203: drop "always" color test
Jeff King [Tue, 3 Oct 2017 13:44:39 +0000 (09:44 -0400)] 
t3203: drop "always" color test

In preparation for the behavior of "always" changing to
match "auto", we can simply drop this test. We already check
other forms (like "--color") independently.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot6006: drop "always" color config tests
Jeff King [Tue, 3 Oct 2017 13:44:27 +0000 (09:44 -0400)] 
t6006: drop "always" color config tests

We test the %C() format placeholders with a variety of
color-inducing options, including "--color" and
"-c color.ui=always". In preparation for the behavior of
"always" changing, we need to do something with those
"always" tests.

We can drop ones that expect "always" to turn on color even
to a file, as that will become a synonym for "auto", which
is already tested.

For the "--no-color" test, we need to make sure that color
would otherwise be shown. To do this, we can use
test_terminal, which enables colors in the default setup.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot7502: use diff.noprefix for --verbose test
Jeff King [Tue, 3 Oct 2017 13:43:47 +0000 (09:43 -0400)] 
t7502: use diff.noprefix for --verbose test

To check that "status -v" respects diff config, we set
"color.diff" and look at the output of "status". We could
equally well use any diff config. Since color output depends
on a lot of other factors (like whether stdout is a tty, and
how we interpret "always"), let's use a more mundane option.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot7508: use test_terminal for color output
Jeff King [Tue, 3 Oct 2017 13:43:29 +0000 (09:43 -0400)] 
t7508: use test_terminal for color output

This script tests the output of status with various formats
when color is enabled. It uses the "always" setting so that
the output is valid even though we capture it in a file.
Using test_terminal gives us a more realistic environment,
and prepares us for the behavior of "always" changing.

Arguably we are testing less than before, since "auto" is
already the default, and we can no longer tell if the config
is actually doing anything.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot3701: use test-terminal to collect color output
Jeff King [Tue, 3 Oct 2017 13:42:15 +0000 (09:42 -0400)] 
t3701: use test-terminal to collect color output

When testing whether "add -p" can generate colors, we set
color.ui to "always". This isn't a very good test, as in the
real-world a user typically has "auto" coupled with stdout
going to a terminal (and it's plausible that this could mask
a real bug in add--interactive if we depend on plumbing's
isatty check).

Let's switch to test_terminal, which gives us a more
realistic environment. This also prepare us for future
changes to the "always" color option.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot4015: prefer --color to -c color.diff=always
Jeff King [Tue, 3 Oct 2017 13:40:19 +0000 (09:40 -0400)] 
t4015: prefer --color to -c color.diff=always

t4015 contains many color-related tests which need to
override the "is stdout a tty" check. They do so by setting
the color.diff config, but we can accomplish the same with
the --color option. Besides being shorter to type, switching
will prepare us for upcoming changes to "always" when see it
in config.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agotest-terminal: set TERM=vt100
Jeff King [Tue, 3 Oct 2017 13:39:34 +0000 (09:39 -0400)] 
test-terminal: set TERM=vt100

The point of the test-terminal script is to simulate in the
test scripts an environment where output is going to a real
terminal.

But since test-lib.sh also sets TERM=dumb, the simulation
isn't very realistic. The color code will skip auto-coloring
for TERM=dumb, leading to us liberally sprinkling

  test_terminal env TERM=vt100 git ...

through the test suite to convince the tests to actually
generate colors. Let's set TERM for programs run under
test_terminal, which is one less thing for test-writers to
remember.

In most cases the callers can be simplified, but note there
is one interesting case in t4202. It uses test_terminal to
check the auto-enabling of --decorate, but the expected
output _doesn't_ contain colors (because TERM=dumb
suppresses them). Using TERM=vt100 is closer to what the
real world looks like; adjust the expected output to match.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoGit 2.14.2 v2.14.2
Junio C Hamano [Fri, 22 Sep 2017 05:51:37 +0000 (14:51 +0900)] 
Git 2.14.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoSync with 2.13.6
Junio C Hamano [Fri, 22 Sep 2017 05:50:02 +0000 (14:50 +0900)] 
Sync with 2.13.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoGit 2.13.6 v2.13.6
Junio C Hamano [Fri, 22 Sep 2017 05:49:24 +0000 (14:49 +0900)] 
Git 2.13.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoSync with 2.12.5
Junio C Hamano [Fri, 22 Sep 2017 05:48:08 +0000 (14:48 +0900)] 
Sync with 2.12.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoGit 2.12.5 v2.12.5
Junio C Hamano [Fri, 22 Sep 2017 05:47:41 +0000 (14:47 +0900)] 
Git 2.12.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoSync with 2.11.4
Junio C Hamano [Fri, 22 Sep 2017 05:45:30 +0000 (14:45 +0900)] 
Sync with 2.11.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoGit 2.11.4 v2.11.4
Junio C Hamano [Fri, 22 Sep 2017 05:44:45 +0000 (14:44 +0900)] 
Git 2.11.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoSync with 2.10.5
Junio C Hamano [Fri, 22 Sep 2017 05:43:13 +0000 (14:43 +0900)] 
Sync with 2.10.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoGit 2.10.5 v2.10.5
Junio C Hamano [Fri, 22 Sep 2017 05:42:22 +0000 (14:42 +0900)] 
Git 2.10.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'jk/safe-pipe-capture' into maint-2.10
Junio C Hamano [Fri, 22 Sep 2017 05:34:34 +0000 (14:34 +0900)] 
Merge branch 'jk/safe-pipe-capture' into maint-2.10

6 years agoMerge branch 'jk/cvsimport-quoting' into maint-2.10
Junio C Hamano [Fri, 22 Sep 2017 05:34:34 +0000 (14:34 +0900)] 
Merge branch 'jk/cvsimport-quoting' into maint-2.10

6 years agoMerge branch 'jc/cvsserver' into maint-2.10
Junio C Hamano [Fri, 22 Sep 2017 05:34:34 +0000 (14:34 +0900)] 
Merge branch 'jc/cvsserver' into maint-2.10

6 years agoMerge branch 'jk/git-shell-drop-cvsserver' into maint-2.10
Junio C Hamano [Fri, 22 Sep 2017 05:34:34 +0000 (14:34 +0900)] 
Merge branch 'jk/git-shell-drop-cvsserver' into maint-2.10

6 years agocvsimport: shell-quote variable used in backticks
Jeff King [Mon, 11 Sep 2017 14:24:26 +0000 (10:24 -0400)] 
cvsimport: shell-quote variable used in backticks

We run `git rev-parse` though the shell, and quote its
argument only with single-quotes. This prevents most
metacharacters from being a problem, but misses the obvious
case when $name itself has single-quotes in it. We can fix
this by applying the usual shell-quoting formula.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoarchimport: use safe_pipe_capture for user input
Jeff King [Mon, 11 Sep 2017 14:24:11 +0000 (10:24 -0400)] 
archimport: use safe_pipe_capture for user input

Refnames can contain shell metacharacters which need to be
passed verbatim to sub-processes. Using safe_pipe_capture
skips the shell entirely.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoshell: drop git-cvsserver support by default
Jeff King [Mon, 11 Sep 2017 15:27:51 +0000 (11:27 -0400)] 
shell: drop git-cvsserver support by default

The git-cvsserver script is old and largely unmaintained
these days. But git-shell allows untrusted users to run it
out of the box, significantly increasing its attack surface.

Let's drop it from git-shell's list of internal handlers so
that it cannot be run by default.  This is not backwards
compatible. But given the age and development activity on
CVS-related parts of Git, this is likely to impact very few
users, while helping many more (i.e., anybody who runs
git-shell and had no intention of supporting CVS).

There's no configuration mechanism in git-shell for us to
add a boolean and flip it to "off". But there is a mechanism
for adding custom commands, and adding CVS support here is
fairly trivial. Let's document it to give guidance to
anybody who really is still running cvsserver.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocvsserver: use safe_pipe_capture for `constant commands` as well
Junio C Hamano [Mon, 11 Sep 2017 05:45:54 +0000 (14:45 +0900)] 
cvsserver: use safe_pipe_capture for `constant commands` as well

This is not strictly necessary, but it is a good code hygiene.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocvsserver: use safe_pipe_capture instead of backticks
joernchen [Mon, 11 Sep 2017 05:45:09 +0000 (14:45 +0900)] 
cvsserver: use safe_pipe_capture instead of backticks

This makes the script pass arguments that are derived from end-user
input in safer way when invoking subcommands.

Reported-by: joernchen <joernchen@phenoelit.de>
Signed-off-by: joernchen <joernchen@phenoelit.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocvsserver: move safe_pipe_capture() to the main package
Junio C Hamano [Mon, 11 Sep 2017 05:44:24 +0000 (14:44 +0900)] 
cvsserver: move safe_pipe_capture() to the main package

As a preparation for replacing `command` with a call to this
function from outside GITCVS::updater package, move it to the main
package.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoRelNotes: further fixes for 2.14.2 from the master front
Junio C Hamano [Sun, 10 Sep 2017 08:06:09 +0000 (17:06 +0900)] 
RelNotes: further fixes for 2.14.2 from the master front

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'jt/doc-pack-objects-fix' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:10 +0000 (17:03 +0900)] 
Merge branch 'jt/doc-pack-objects-fix' into maint

Doc updates.

* jt/doc-pack-objects-fix:
  Doc: clarify that pack-objects makes packs, plural

6 years agoMerge branch 'jn/vcs-svn-cleanup' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:09 +0000 (17:03 +0900)] 
Merge branch 'jn/vcs-svn-cleanup' into maint

Code clean-up.

* jn/vcs-svn-cleanup:
  vcs-svn: move remaining repo_tree functions to fast_export.h
  vcs-svn: remove repo_delete wrapper function
  vcs-svn: remove custom mode constants
  vcs-svn: remove more unused prototypes and declarations

6 years agoMerge branch 'bc/vcs-svn-cleanup' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:08 +0000 (17:03 +0900)] 
Merge branch 'bc/vcs-svn-cleanup' into maint

Code clean-up.

* bc/vcs-svn-cleanup:
  vcs-svn: rename repo functions to "svn_repo"
  vcs-svn: remove unused prototypes

6 years agoMerge branch 'jk/doc-the-this' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:07 +0000 (17:03 +0900)] 
Merge branch 'jk/doc-the-this' into maint

Doc clean-up.

* jk/doc-the-this:
  doc: fix typo in sendemail.identity

6 years agoMerge branch 'rs/commit-h-single-parent-cleanup' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:07 +0000 (17:03 +0900)] 
Merge branch 'rs/commit-h-single-parent-cleanup' into maint

Code clean-up.

* rs/commit-h-single-parent-cleanup:
  commit: remove unused inline function single_parent()

6 years agoMerge branch 'mg/format-ref-doc-fix' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:06 +0000 (17:03 +0900)] 
Merge branch 'mg/format-ref-doc-fix' into maint

Doc fix.

* mg/format-ref-doc-fix:
  Documentation/git-for-each-ref: clarify peeling of tags for --format
  Documentation: use proper wording for ref format strings

6 years agoMerge branch 'sb/submodule-parallel-update' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:06 +0000 (17:03 +0900)] 
Merge branch 'sb/submodule-parallel-update' into maint

Code clean-up.

* sb/submodule-parallel-update:
  submodule.sh: remove unused variable

6 years agoMerge branch 'hv/t5526-andand-chain-fix' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:05 +0000 (17:03 +0900)] 
Merge branch 'hv/t5526-andand-chain-fix' into maint

Test fix.

* hv/t5526-andand-chain-fix:
  t5526: fix some broken && chains

6 years agoMerge branch 'sb/sha1-file-cleanup' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:04 +0000 (17:03 +0900)] 
Merge branch 'sb/sha1-file-cleanup' into maint

Code clean-up.

* sb/sha1-file-cleanup:
  sha1_file: make read_info_alternates static

6 years agoMerge branch 'rs/t1002-do-not-use-sum' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:04 +0000 (17:03 +0900)] 
Merge branch 'rs/t1002-do-not-use-sum' into maint

Test simplification.

* rs/t1002-do-not-use-sum:
  t1002: stop using sum(1)

6 years agoMerge branch 'ah/doc-empty-string-is-false' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:03 +0000 (17:03 +0900)] 
Merge branch 'ah/doc-empty-string-is-false' into maint

Doc update.

* ah/doc-empty-string-is-false:
  doc: clarify "config --bool" behaviour with empty string

6 years agoMerge branch 'rs/merge-microcleanup' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:02 +0000 (17:03 +0900)] 
Merge branch 'rs/merge-microcleanup' into maint

Code clean-up.

* rs/merge-microcleanup:
  merge: use skip_prefix()

6 years agoMerge branch 'rs/find-pack-entry-bisection' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:02 +0000 (17:03 +0900)] 
Merge branch 'rs/find-pack-entry-bisection' into maint

Code clean-up.

* rs/find-pack-entry-bisection:
  sha1_file: avoid comparison if no packed hash matches the first byte

6 years agoMerge branch 'rs/apply-lose-prefix-length' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:01 +0000 (17:03 +0900)] 
Merge branch 'rs/apply-lose-prefix-length' into maint

Code clean-up.

* rs/apply-lose-prefix-length:
  apply: remove prefix_length member from apply_state

6 years agoMerge branch 'rj/add-chmod-error-message' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:03:00 +0000 (17:03 +0900)] 
Merge branch 'rj/add-chmod-error-message' into maint

Message fix.

* rj/add-chmod-error-message:
  builtin/add: add detail to a 'cannot chmod' error message

6 years agoMerge branch 'jk/hashcmp-memcmp' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:59 +0000 (17:02 +0900)] 
Merge branch 'jk/hashcmp-memcmp' into maint

Code clean-up.

* jk/hashcmp-memcmp:
  hashcmp: use memcmp instead of open-coded loop

6 years agoMerge branch 'rs/t3700-clean-leftover' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:58 +0000 (17:02 +0900)] 
Merge branch 'rs/t3700-clean-leftover' into maint

A test fix.

* rs/t3700-clean-leftover:
  t3700: fix broken test under !POSIXPERM

6 years agoMerge branch 'jc/perl-git-comment-typofix' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:57 +0000 (17:02 +0900)] 
Merge branch 'jc/perl-git-comment-typofix' into maint

A comment fix.

* jc/perl-git-comment-typofix:
  perl/Git.pm: typofix in a comment

6 years agoMerge branch 'mf/no-dashed-subcommands' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:56 +0000 (17:02 +0900)] 
Merge branch 'mf/no-dashed-subcommands' into maint

Code clean-up.

* mf/no-dashed-subcommands:
  scripts: use "git foo" not "git-foo"

6 years agoMerge branch 'ab/ref-filter-no-contains' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:56 +0000 (17:02 +0900)] 
Merge branch 'ab/ref-filter-no-contains' into maint

A test fix.

* ab/ref-filter-no-contains:
  tests: don't give unportable ">" to "test" built-in, use -gt

6 years agoMerge branch 'rs/archive-excluded-directory' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:55 +0000 (17:02 +0900)] 
Merge branch 'rs/archive-excluded-directory' into maint

"git archive" did not work well with pathspecs and the
export-ignore attribute.

We may want to resurrect the "we don't archive an empty directory"
bonus patch, but I do not mind merging the above early to 'next'
and leave it as a separate follow-up enhancement.
cf. <20170820090629.tumvqwzkromcykjf@sigill.intra.peff.net>

* rs/archive-excluded-directory:
  archive: don't queue excluded directories
  archive: factor out helper functions for handling attributes
  t5001: add tests for export-ignore attributes and exclude pathspecs

6 years agoMerge branch 'mg/killed-merge' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:55 +0000 (17:02 +0900)] 
Merge branch 'mg/killed-merge' into maint

Killing "git merge --edit" before the editor returns control left
the repository in a state with MERGE_MSG but without MERGE_HEAD,
which incorrectly tells the subsequent "git commit" that there was
a squash merge in progress.  This has been fixed.

* mg/killed-merge:
  merge: save merge state earlier
  merge: split write_merge_state in two
  merge: clarify call chain
  Documentation/git-merge: explain --continue

6 years agoMerge branch 'tb/apply-with-crlf' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:55 +0000 (17:02 +0900)] 
Merge branch 'tb/apply-with-crlf' into maint

"git apply" that is used as a better "patch -p1" failed to apply a
taken from a file with CRLF line endings to a file with CRLF line
endings.  The root cause was because it misused convert_to_git()
that tried to do "safe-crlf" processing by looking at the index
entry at the same path, which is a nonsense---in that mode, "apply"
is not working on the data in (or derived from) the index at all.
This has been fixed.

* tb/apply-with-crlf:
  apply: file commited with CRLF should roundtrip diff and apply
  convert: add SAFE_CRLF_KEEP_CRLF

6 years agoMerge branch 'cc/subprocess-handshake-missing-capabilities' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:55 +0000 (17:02 +0900)] 
Merge branch 'cc/subprocess-handshake-missing-capabilities' into maint

When handshake with a subprocess filter notices that the process
asked for an unknown capability, Git did not report what program
the offending subprocess was running.  This has been corrected.

We may want a follow-up fix to tighten the error checking, though.

* cc/subprocess-handshake-missing-capabilities:
  sub-process: print the cmd when a capability is unsupported

6 years agoMerge branch 'as/grep-quiet-no-match-exit-code-fix' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:55 +0000 (17:02 +0900)] 
Merge branch 'as/grep-quiet-no-match-exit-code-fix' into maint

"git grep -L" and "git grep --quiet -L" reported different exit
codes; this has been corrected.

* as/grep-quiet-no-match-exit-code-fix:
  git-grep: correct exit code with --quiet and -L

6 years agoMerge branch 'kd/stash-with-bash-4.4' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:54 +0000 (17:02 +0900)] 
Merge branch 'kd/stash-with-bash-4.4' into maint

bash 4.4 or newer gave a warning on NUL byte in command
substitution done in "git stash"; this has been squelched.

* kd/stash-with-bash-4.4:
  stash: prevent warning about null bytes in input

6 years agoMerge branch 'rs/win32-syslog-leakfix' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:54 +0000 (17:02 +0900)] 
Merge branch 'rs/win32-syslog-leakfix' into maint

Memory leak in an error codepath has been plugged.

* rs/win32-syslog-leakfix:
  win32: plug memory leak on realloc() failure in syslog()

6 years agoMerge branch 'rs/unpack-entry-leakfix' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:53 +0000 (17:02 +0900)] 
Merge branch 'rs/unpack-entry-leakfix' into maint

Memory leak in an error codepath has been plugged.

* rs/unpack-entry-leakfix:
  sha1_file: release delta_stack on error in unpack_entry()

6 years agoMerge branch 'rs/fsck-obj-leakfix' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:52 +0000 (17:02 +0900)] 
Merge branch 'rs/fsck-obj-leakfix' into maint

Memory leak in an error codepath has been plugged.

* rs/fsck-obj-leakfix:
  fsck: free buffers on error in fsck_obj()

6 years agoMerge branch 'ur/svn-local-zone' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:52 +0000 (17:02 +0900)] 
Merge branch 'ur/svn-local-zone' into maint

"git svn" used with "--localtime" option did not compute the tz
offset for the timestamp in question and instead always used the
current time, which has been corrected.

* ur/svn-local-zone:
  git svn fetch: Create correct commit timestamp when using --localtime

6 years agoMerge branch 'pw/am-signoff' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:51 +0000 (17:02 +0900)] 
Merge branch 'pw/am-signoff' into maint

"git am -s" has been taught that some input may end with a trailer
block that is not Signed-off-by: and it should refrain from adding
an extra blank line before adding a new sign-off in such a case.

* pw/am-signoff:
  am: fix signoff when other trailers are present

6 years agoMerge branch 'rs/in-obsd-basename-dirname-take-const' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:51 +0000 (17:02 +0900)] 
Merge branch 'rs/in-obsd-basename-dirname-take-const' into maint

Portability fix.

* rs/in-obsd-basename-dirname-take-const:
  test-path-utils: handle const parameter of basename and dirname

6 years agoMerge branch 'rs/t4062-obsd' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:51 +0000 (17:02 +0900)] 
Merge branch 'rs/t4062-obsd' into maint

Test portability fix.

* rs/t4062-obsd:
  t4062: use less than 256 repetitions in regex

6 years agoMerge branch 'rs/obsd-getcwd-workaround' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:50 +0000 (17:02 +0900)] 
Merge branch 'rs/obsd-getcwd-workaround' into maint

Test portability fix for BSDs.

* rs/obsd-getcwd-workaround:
  t0001: skip test with restrictive permissions if getpwd(3) respects them

6 years agoMerge branch 'bw/clone-recursive-quiet' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:49 +0000 (17:02 +0900)] 
Merge branch 'bw/clone-recursive-quiet' into maint

"git clone --recurse-submodules --quiet" did not pass the quiet
option down to submodules.

* bw/clone-recursive-quiet:
  clone: teach recursive clones to respect -q

6 years agoMerge branch 'pw/sequence-rerere-autoupdate' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:49 +0000 (17:02 +0900)] 
Merge branch 'pw/sequence-rerere-autoupdate' into maint

Commands like "git rebase" accepted the --rerere-autoupdate option
from the command line, but did not always use it.  This has been
fixed.

* pw/sequence-rerere-autoupdate:
  cherry-pick/revert: reject --rerere-autoupdate when continuing
  cherry-pick/revert: remember --rerere-autoupdate
  t3504: use test_commit
  rebase -i: honor --rerere-autoupdate
  rebase: honor --rerere-autoupdate
  am: remember --rerere-autoupdate setting

6 years agoMerge branch 'bw/push-options-recursively-to-submodules' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:49 +0000 (17:02 +0900)] 
Merge branch 'bw/push-options-recursively-to-submodules' into maint

"git push --recurse-submodules $there HEAD:$target" was not
propagated down to the submodules, but now it is.

* bw/push-options-recursively-to-submodules:
  submodule--helper: teach push-check to handle HEAD

6 years agoMerge branch 'ma/pager-per-subcommand-action' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:48 +0000 (17:02 +0900)] 
Merge branch 'ma/pager-per-subcommand-action' into maint

The "tag.pager" configuration variable was useless for those who
actually create tag objects, as it interfered with the use of an
editor.  A new mechanism has been introduced for commands to enable
pager depending on what operation is being carried out to fix this,
and then "git tag -l" is made to run pager by default.

If this works out OK, I think there are low-hanging fruits in
other commands like "git branch" that outputs long list in one mode
while taking input in another.

* ma/pager-per-subcommand-action:
  git.c: ignore pager.* when launching builtin as dashed external
  tag: change default of `pager.tag` to "on"
  tag: respect `pager.tag` in list-mode only
  t7006: add tests for how git tag paginates
  git.c: provide setup_auto_pager()
  git.c: let builtins opt for handling `pager.foo` themselves
  builtin.h: take over documentation from api-builtin.txt

6 years agoMerge branch 'jk/rev-list-empty-input' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:48 +0000 (17:02 +0900)] 
Merge branch 'jk/rev-list-empty-input' into maint

"git log --tag=no-such-tag" showed log starting from HEAD, which
has been fixed---it now shows nothing.

* jk/rev-list-empty-input:
  revision: do not fallback to default when rev_input_given is set
  rev-list: don't show usage when we see empty ref patterns
  revision: add rev_input_given flag
  t6018: flesh out empty input/output rev-list tests

6 years agoMerge branch 'st/lib-gpg-kill-stray-agent' into maint
Junio C Hamano [Sun, 10 Sep 2017 08:02:48 +0000 (17:02 +0900)] 
Merge branch 'st/lib-gpg-kill-stray-agent' into maint

Some versions of GnuPG fails to kill gpg-agent it auto-spawned
and such a left-over agent can interfere with a test.  Work it
around by attempting to kill one before starting a new test.

* st/lib-gpg-kill-stray-agent:
  t: lib-gpg: flush gpg agent on startup

6 years agoPrepare for 2.14.2
Junio C Hamano [Wed, 23 Aug 2017 21:36:03 +0000 (14:36 -0700)] 
Prepare for 2.14.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'jt/t1450-fsck-corrupt-packfile' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)] 
Merge branch 'jt/t1450-fsck-corrupt-packfile' into maint

A test update.

* jt/t1450-fsck-corrupt-packfile:
  tests: ensure fsck fails on corrupt packfiles

6 years agoMerge branch 'jb/t8008-cleanup' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)] 
Merge branch 'jb/t8008-cleanup' into maint

Code clean-up.

* jb/t8008-cleanup:
  t8008: rely on rev-parse'd HEAD instead of sha1 value

6 years agoMerge branch 'jt/subprocess-handshake' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)] 
Merge branch 'jt/subprocess-handshake' into maint

Code cleanup.

* jt/subprocess-handshake:
  sub-process: refactor handshake to common function
  Documentation: migrate sub-process docs to header
  convert: add "status=delayed" to filter process protocol
  convert: refactor capabilities negotiation
  convert: move multiple file filter error handling to separate function
  convert: put the flags field before the flag itself for consistent style
  t0021: write "OUT <size>" only on success
  t0021: make debug log file name configurable
  t0021: keep filter log files on comparison

6 years agoMerge branch 'dc/fmt-merge-msg-microcleanup' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)] 
Merge branch 'dc/fmt-merge-msg-microcleanup' into maint

Code cleanup.

* dc/fmt-merge-msg-microcleanup:
  fmt-merge-msg: fix coding style

6 years agoMerge branch 'ah/doc-wserrorhighlight' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:51 +0000 (14:33 -0700)] 
Merge branch 'ah/doc-wserrorhighlight' into maint

Doc update.

* ah/doc-wserrorhighlight:
  doc: add missing values "none" and "default" for diff.wsErrorHighlight

6 years agoMerge branch 'cc/ref-is-hidden-microcleanup' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:50 +0000 (14:33 -0700)] 
Merge branch 'cc/ref-is-hidden-microcleanup' into maint

Code cleanup.

* cc/ref-is-hidden-microcleanup:
  refs: use skip_prefix() in ref_is_hidden()

6 years agoMerge branch 'js/run-process-parallel-api-fix' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:49 +0000 (14:33 -0700)] 
Merge branch 'js/run-process-parallel-api-fix' into maint

API fix.

* js/run-process-parallel-api-fix:
  run_processes_parallel: change confusing task_cb convention

6 years agoMerge branch 'rs/pack-objects-pbase-cleanup' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:48 +0000 (14:33 -0700)] 
Merge branch 'rs/pack-objects-pbase-cleanup' into maint

Code clean-up.

* rs/pack-objects-pbase-cleanup:
  pack-objects: remove unnecessary NULL check

6 years agoMerge branch 'jt/fsck-code-cleanup' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:48 +0000 (14:33 -0700)] 
Merge branch 'jt/fsck-code-cleanup' into maint

Code clean-up.

* jt/fsck-code-cleanup:
  fsck: cleanup unused variable
  object: remove "used" field from struct object
  fsck: remove redundant parse_tree() invocation

6 years agoMerge branch 'rs/stat-data-unaligned-reads-fix' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:47 +0000 (14:33 -0700)] 
Merge branch 'rs/stat-data-unaligned-reads-fix' into maint

Code clean-up.

* rs/stat-data-unaligned-reads-fix:
  dir: support platforms that require aligned reads

6 years agoMerge branch 'rs/move-array' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:46 +0000 (14:33 -0700)] 
Merge branch 'rs/move-array' into maint

Code clean-up.

* rs/move-array:
  ls-files: don't try to prune an empty index
  apply: use COPY_ARRAY and MOVE_ARRAY in update_image()
  use MOVE_ARRAY
  add MOVE_ARRAY

6 years agoMerge branch 'rs/bswap-ubsan-fix' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:46 +0000 (14:33 -0700)] 
Merge branch 'rs/bswap-ubsan-fix' into maint

Code clean-up.

* rs/bswap-ubsan-fix:
  bswap: convert get_be16, get_be32 and put_be32 to inline functions
  bswap: convert to unsigned before shifting in get_be32

6 years agoMerge branch 'dl/credential-cache-socket-in-xdg-cache' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:45 +0000 (14:33 -0700)] 
Merge branch 'dl/credential-cache-socket-in-xdg-cache' into maint

A recently added test for the "credential-cache" helper revealed
that EOF detection done around the time the connection to the cache
daemon is torn down were flaky.  This was fixed by reacting to
ECONNRESET and behaving as if we got an EOF.

* dl/credential-cache-socket-in-xdg-cache:
  credential-cache: interpret an ECONNRESET as an EOF

6 years agoMerge branch 'hb/gitweb-project-list' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:44 +0000 (14:33 -0700)] 
Merge branch 'hb/gitweb-project-list' into maint

When a directory is not readable, "gitweb" fails to build the
project list.  Work this around by skipping such a directory.

It might end up hiding a problem under the rug and a better
solution might be to loudly complain to the administrator pointing
out the problematic directory, but this will at least make it
"work".

* hb/gitweb-project-list:
  gitweb: skip unreadable subdirectories

6 years agoMerge branch 'ks/commit-abort-on-empty-message-fix' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:44 +0000 (14:33 -0700)] 
Merge branch 'ks/commit-abort-on-empty-message-fix' into maint

"git commit" when seeing an totally empty message said "you did not
edit the message", which is clearly wrong.  The message has been
corrected.

* ks/commit-abort-on-empty-message-fix:
  commit: check for empty message before the check for untouched template

6 years agoMerge branch 'jk/reflog-walk' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:43 +0000 (14:33 -0700)] 
Merge branch 'jk/reflog-walk' into maint

Numerous bugs in walking of reflogs via "log -g" and friends have
been fixed.

* jk/reflog-walk:
  reflog-walk: apply --since/--until to reflog dates
  reflog-walk: stop using fake parents
  rev-list: check reflog_info before showing usage
  get_revision_1(): replace do-while with an early return
  log: do not free parents when walking reflog
  log: clarify comment about reflog cycles
  revision: disallow reflog walking with revs->limited
  t1414: document some reflog-walk oddities

6 years agoMerge branch 'jc/http-sslkey-and-ssl-cert-are-paths' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:43 +0000 (14:33 -0700)] 
Merge branch 'jc/http-sslkey-and-ssl-cert-are-paths' into maint

The http.{sslkey,sslCert} configuration variables are to be
interpreted as a pathname that honors "~[username]/" prefix, but
weren't, which has been fixed.

* jc/http-sslkey-and-ssl-cert-are-paths:
  http.c: http.sslcert and http.sslkey are both pathnames

6 years agoMerge branch 'jk/ref-filter-colors' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:42 +0000 (14:33 -0700)] 
Merge branch 'jk/ref-filter-colors' into maint

"%C(color name)" in the pretty print format always produced ANSI
color escape codes, which was an early design mistake.  They now
honor the configuration (e.g. "color.ui = never") and also tty-ness
of the output medium.

* jk/ref-filter-colors:
  ref-filter: consult want_color() before emitting colors
  pretty: respect color settings for %C placeholders
  rev-list: pass diffopt->use_colors through to pretty-print
  for-each-ref: load config earlier
  color: check color.ui in git_default_config()
  ref-filter: pass ref_format struct to atom parsers
  ref-filter: factor out the parsing of sorting atoms
  ref-filter: make parse_ref_filter_atom a private function
  ref-filter: provide a function for parsing sort options
  ref-filter: move need_color_reset_at_eol into ref_format
  ref-filter: abstract ref format into its own struct
  ref-filter: simplify automatic color reset
  t: use test_decode_color rather than literal ANSI codes
  docs/for-each-ref: update pointer to color syntax
  check return value of verify_ref_format()

6 years agoMerge branch 'js/git-gui-msgfmt-on-windows' into maint
Junio C Hamano [Wed, 23 Aug 2017 21:33:42 +0000 (14:33 -0700)] 
Merge branch 'js/git-gui-msgfmt-on-windows' into maint

Because recent Git for Windows do come with a real msgfmt, the
build procedure for git-gui has been updated to use it instead of a
hand-rolled substitute.

* js/git-gui-msgfmt-on-windows:
  git-gui (MinGW): make use of MSys2's msgfmt
  git gui: allow for a long recentrepo list
  git gui: de-dup selected repo from recentrepo history
  git gui: cope with duplicates in _get_recentrepo
  git-gui: remove duplicate entries from .gitconfig's gui.recentrepo

6 years agovcs-svn: move remaining repo_tree functions to fast_export.h
Jonathan Nieder [Wed, 23 Aug 2017 00:04:47 +0000 (17:04 -0700)] 
vcs-svn: move remaining repo_tree functions to fast_export.h

These used to be for manipulating the in-memory repo_tree structure,
but nowadays they are convenience wrappers to handle a few git-vs-svn
mismatches:

 1. Git does not track empty directories but Subversion does.  When
    looking up a path in git that Subversion thinks exists and finding
    nothing, we can safely assume that the path represents a
    directory.  This is needed when a later Subversion revision
    modifies that directory.

 2. Subversion allows deleting a file by copying.  In Git fast-import
    we have to handle that more explicitly as a deletion.

These are details of the tool's interaction with git fast-import.
Move them to fast_export.c, where other such details are handled.

This way the function names do not start with a repo_ prefix that
would clash with the repository object introduced in
v2.14.0-rc0~38^2~16 (repository: introduce the repository object,
2017-06-22) or an svn_ prefix that would clash with libsvn (in case
someone wants to link this code with libsvn some day).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agovcs-svn: remove repo_delete wrapper function
Jonathan Nieder [Wed, 23 Aug 2017 00:02:15 +0000 (17:02 -0700)] 
vcs-svn: remove repo_delete wrapper function

Since v1.7.10-rc0~118^2~4^2~4^2~3 (vcs-svn: pass paths through to
fast-import, 2010-12-13) this is an alias for fast_export_delete.
Remove the unnecessary layer of indirection.

No functional change intended.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agovcs-svn: remove custom mode constants
Jonathan Nieder [Wed, 23 Aug 2017 00:01:34 +0000 (17:01 -0700)] 
vcs-svn: remove custom mode constants

In the rest of Git, these modes are spelled as S_IFDIR,
S_IFREG | 0644, S_IFREG | 0755, and S_IFLNK.  Use the same constants
in svn-fe for simplicity and consistency.

No functional change intended.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agovcs-svn: remove more unused prototypes and declarations
Jonathan Nieder [Wed, 23 Aug 2017 00:00:57 +0000 (17:00 -0700)] 
vcs-svn: remove more unused prototypes and declarations

I forgot to remove these in v1.7.10-rc0~118^2~4^2~5^2~4 (vcs-svn:
eliminate repo_tree structure, 2010-12-10).

This finishes what was started in commit 36f63b50 (vcs-svn: remove
unused prototypes, 2017-08-21).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoDoc: clarify that pack-objects makes packs, plural
Jonathan Tan [Wed, 23 Aug 2017 00:40:10 +0000 (17:40 -0700)] 
Doc: clarify that pack-objects makes packs, plural

The documentation for pack-objects describes that it creates "a packed
archive of objects", which is confusing because it may create multiple
packs if --max-pack-size is set. Update the documentation to clarify
this, and explaining in which cases such a feature would be useful.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agomerge: save merge state earlier
Michael J Gruber [Wed, 23 Aug 2017 12:10:45 +0000 (14:10 +0200)] 
merge: save merge state earlier

If the `git merge` process is killed while waiting for the editor to
finish, the merge state is lost but the prepared merge msg and tree is kept.
So, a subsequent `git commit` creates a squashed merge even when the
user asked for proper merge commit originally.

Demonstrate the problem with a test crafted after the in t7502. The test
requires EXECKEEPSPID (thus does not run under MINGW).

Save the merge state earlier (in the non-squash case) so that it does
not get lost. This makes the test pass.

Reported-by: hIpPy <hippy2981@gmail.com>
Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>