Jiang Xin [Mon, 8 Jan 2018 01:17:24 +0000 (09:17 +0800)]
Merge branch 'fr_2.16-rc1' of git://github.com/jnavila/git
* 'fr_2.16-rc1' of git://github.com/jnavila/git:
l10n: fr.po 2.16 round 2
Jean-Noel Avila [Sun, 7 Jan 2018 17:57:48 +0000 (18:57 +0100)]
l10n: fr.po 2.16 round 2
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Christopher Díaz Riveros [Sun, 7 Jan 2018 17:15:35 +0000 (12:15 -0500)]
l10n: es.po: Spanish translation 2.16.0 round 2
Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
Tran Ngoc Quan [Sun, 7 Jan 2018 01:20:27 +0000 (08:20 +0700)]
l10n: vi.po(3288t): Updated Vietnamese translation for v2.16.0 round 2
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Jiang Xin [Sat, 6 Jan 2018 23:50:31 +0000 (07:50 +0800)]
l10n: git.pot: v2.16.0 round 2 (8 new, 4 removed)
Generate po/git.pot from v2.16.0-rc1 for git v2.16.0 l10n round 2.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Sat, 6 Jan 2018 23:49:43 +0000 (07:49 +0800)]
Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
l10n: es.po: Update Spanish Translation v2.16.0
l10n: fr.po v2.16.0 round 1
l10n: bg.po: Updated Bulgarian translation (3284t)
l10n: sv.po: Update Swedish translation (3284t0f0u)
l10n: fr.po: "worktree list" mistranslated as prune
l10n: git.pot: v2.16.0 round 1 (64 new, 25 removed)
l10n: fixes to German translation
l10n: Update Spanish translation
l10n: zh_CN translate parameter name
l10n: zh_CN Fix typo
l10n: Fixes to Catalan translation
Jiang Xin [Sat, 6 Jan 2018 02:26:30 +0000 (10:26 +0800)]
Merge branch '2.16' of https://github.com/ChrisADR/git-po
* '2.16' of https://github.com/ChrisADR/git-po:
l10n: es.po: Update Spanish Translation v2.16.0
Jiang Xin [Sat, 6 Jan 2018 02:24:52 +0000 (10:24 +0800)]
Merge branch 'fr_2.16' of git://github.com/jnavila/git
* 'fr_2.16' of git://github.com/jnavila/git:
l10n: fr.po v2.16.0 round 1
l10n: fr.po: "worktree list" mistranslated as prune
Junio C Hamano [Fri, 5 Jan 2018 21:45:17 +0000 (13:45 -0800)]
Git 2.16-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 5 Jan 2018 21:28:11 +0000 (13:28 -0800)]
Merge branch 'js/sequencer-cleanups'
Code cleanup.
* js/sequencer-cleanups:
sequencer: do not invent whitespace when transforming OIDs
sequencer: report when noop has an argument
sequencer: remove superfluous conditional
sequencer: strip bogus LF at end of error messages
rebase: do not continue when the todo list generation failed
Junio C Hamano [Fri, 5 Jan 2018 21:28:11 +0000 (13:28 -0800)]
Merge branch 'jh/memihash-opt'
Squelch compiler warning.
* jh/memihash-opt:
t/helper/test-lazy-name-hash: fix compilation
Junio C Hamano [Fri, 5 Jan 2018 21:28:11 +0000 (13:28 -0800)]
Merge branch 'tb/test-lint-wc-l'
Test update.
* tb/test-lint-wc-l:
check-non-portable-shell.pl: `wc -l` may have leading WS
Junio C Hamano [Fri, 5 Jan 2018 21:28:10 +0000 (13:28 -0800)]
Merge branch 'rs/use-argv-array-in-child-process'
Code cleanup.
* rs/use-argv-array-in-child-process:
send-pack: use internal argv_array of struct child_process
http: use internal argv_array of struct child_process
Junio C Hamano [Fri, 5 Jan 2018 21:28:10 +0000 (13:28 -0800)]
Merge branch 'ld/p4-multiple-shelves'
"git p4" update.
* ld/p4-multiple-shelves:
git-p4: update multiple shelved change lists
Junio C Hamano [Fri, 5 Jan 2018 21:28:10 +0000 (13:28 -0800)]
Merge branch 'jd/fix-strbuf-add-urlencode-bytes'
Bytes with high-bit set were encoded incorrectly and made
credential helper fail.
* jd/fix-strbuf-add-urlencode-bytes:
strbuf: fix urlencode format string on signed char
Junio C Hamano [Fri, 5 Jan 2018 21:28:09 +0000 (13:28 -0800)]
Merge branch 'ew/empty-merge-with-dirty-index'
"git merge -s recursive" did not correctly abort when the index is
dirty, if the merged tree happened to be the same as the current
HEAD, which has been fixed.
* ew/empty-merge-with-dirty-index:
merge-recursive: avoid incorporating uncommitted changes in a merge
move index_has_changes() from builtin/am.c to merge.c for reuse
t6044: recursive can silently incorporate dirty changes in a merge
Junio C Hamano [Fri, 5 Jan 2018 21:28:09 +0000 (13:28 -0800)]
Merge branch 'db/doc-config-section-names-with-bs'
Doc update.
* db/doc-config-section-names-with-bs:
config.txt: document behavior of backslashes in subsections
Junio C Hamano [Fri, 5 Jan 2018 21:28:09 +0000 (13:28 -0800)]
Merge branch 'jk/test-suite-tracing'
Assorted fixes around running tests with "-x" tracing option.
* jk/test-suite-tracing:
t/Makefile: introduce TEST_SHELL_PATH
test-lib: make "-x" work with "--verbose-log"
t5615: avoid re-using descriptor 4
test-lib: silence "-x" cleanup under bash
Stefan Beller [Fri, 5 Jan 2018 20:03:04 +0000 (12:03 -0800)]
submodule: submodule_move_head omits old argument in forced case
When using hard reset or forced checkout with the option to recurse into
submodules, the submodules need to be reset, too.
It turns out that we need to omit the duplicate old argument to read-tree
in all forced cases to omit the 2 way merge and use the more assertive
behavior of reading the specific new tree into the index and updating
the working tree.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Fri, 5 Jan 2018 20:03:03 +0000 (12:03 -0800)]
unpack-trees: oneway_merge to update submodules
When there is a one way merge, each submodule needs to be one way merged
as well, if we're asked to recurse into submodules.
In case of a submodule, check if it is up-to-date, otherwise set the
flag CE_UPDATE, which will trigger an update of it in the phase updating
the tree later.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Fri, 5 Jan 2018 20:03:02 +0000 (12:03 -0800)]
t/lib-submodule-update.sh: fix test ignoring ignored files in submodules
It turns out that the test replacing a submodule with a file with
the submodule containing an ignored file is incorrectly titled,
because the test put the file in place, but never ignored that file.
When having an untracked file Instead of an ignored file in the
submodule, git should refuse to remove the submodule, but that is
a bug in the implementation of recursing into submodules, such that
the test just passed, removing the untracked file.
Fix the test first; in a later patch we'll fix gits behavior,
that will make sure untracked files are not deleted.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Fri, 5 Jan 2018 20:03:01 +0000 (12:03 -0800)]
t/lib-submodule-update.sh: clarify test
Keep the local branch name as the upstream branch name to avoid confusion.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Fri, 5 Jan 2018 09:12:26 +0000 (10:12 +0100)]
perf/run: read GIT_PERF_REPO_NAME from perf.repoName
The GIT_PERF_REPO_NAME env variable is used in
the `aggregate.perl` script to set the 'environment'
field in the JSON Codespeed output.
Let's make it easy to set this variable by setting it
in a config file.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Fri, 5 Jan 2018 09:12:25 +0000 (10:12 +0100)]
perf/run: learn to send output to codespeed server
Let's make it possible to set in a config file the URL of
a codespeed server. And then let's make the `run` script
send the perf test results to this URL at the end of the
tests.
This should make is possible to easily automate the process
of running perf tests and having their results available in
Codespeed.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Fri, 5 Jan 2018 09:12:24 +0000 (10:12 +0100)]
perf/run: learn about perf.codespeedOutput
Let's make it possible to set in a config file the output
format (regular or codespeed) of the perf tests.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Fri, 5 Jan 2018 09:12:23 +0000 (10:12 +0100)]
perf/run: add conf_opts argument to get_var_from_env_or_config()
Let's make it possible to use `git config` type specifiers like
`--int` or `--bool`, so that config values are converted to the
canonical form and easier to use.
This additional argument is now the fourth argument of
get_var_from_env_or_config() instead of the fifth because we
want the default value argument to be unset if it is not
passed, and this is simpler if it is the last argument.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Fri, 5 Jan 2018 09:12:22 +0000 (10:12 +0100)]
perf/aggregate: implement codespeed JSON output
Codespeed (https://github.com/tobami/codespeed/) is an open source
project that can be used to track how some software performs over
time. It stores performance test results in a database and can show
nice graphs and charts on a web interface.
As it can be interesting to use Codespeed to see how Git performance
evolves over time and releases, let's implement a Codespeed output
in "perf/aggregate.perl".
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Fri, 5 Jan 2018 09:12:21 +0000 (10:12 +0100)]
perf/aggregate: refactor printing results
As we want to implement another kind of output than
the current output for the perf test results, let's
refactor the existing code that outputs the results
in its own print_default_results() function.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Fri, 5 Jan 2018 09:12:20 +0000 (10:12 +0100)]
perf/aggregate: fix checking ENV{GIT_PERF_SUBSECTION}
The way we check ENV{GIT_PERF_SUBSECTION} could trigger
comparison between undef and "" that may be flagged by
use of strict & warnings. Let's fix that.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Thu, 4 Jan 2018 21:31:52 +0000 (22:31 +0100)]
rebase -p: fix quoting when calling `git merge`
It has been reported that strategy arguments are not passed to `git
merge` correctly when rebasing interactively, preserving merges.
The reason is that the strategy arguments are already quoted, and then
quoted again.
This fixes https://github.com/git-for-windows/git/issues/1321
Original-patch-by: Kim Gybels <kgybels@infogroep.be>
Also-reported-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy [Fri, 5 Jan 2018 18:36:51 +0000 (19:36 +0100)]
send-email: add and use a local copy of Mail::Address
We used to have two versions of the email parsing code. Our
parse_mailboxes (in Git.pm), and Mail::Address which we used if
installed. Unfortunately, both versions have different sets of bugs, and
changing the behavior of git depending on whether Mail::Address is
installed was a bad idea.
A first attempt to solve this was
cc90750 (send-email: don't use
Mail::Address, even if available, 2017-08-23), but it turns out our
parse_mailboxes is too buggy for some uses. For example the lack of
nested comments support breaks get_maintainer.pl in the Linux kernel
tree:
https://public-inbox.org/git/
20171116154814.23785-1-alex.bennee@linaro.org/
This patch goes the other way: use Mail::Address anyway, but have a
local copy from CPAN as a fallback, when the system one is not
available.
The duplicated script is small (276 lines of code) and stable in time.
Maintaining the local copy should not be an issue, and will certainly be
less burden than maintaining our own parse_mailboxes.
Another option would be to consider Mail::Address as a hard dependency,
but it's easy enough to save the trouble of extra-dependency to the end
user or packager.
Signed-off-by: Matthieu Moy <git@matthieu-moy.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Thu, 4 Jan 2018 22:50:44 +0000 (14:50 -0800)]
diff: use HAS_MULTI_BITS instead of counting bits manually
This aligns the style to the previous patch.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Thu, 4 Jan 2018 22:50:43 +0000 (14:50 -0800)]
diff: properly error out when combining multiple pickaxe options
In
f506b8e8b5 (git log/diff: add -G<regexp> that greps in the patch text,
2010-08-23) we were hesitant to check if the user requests both -S and
-G at the same time. Now that the pickaxe family also offers --find-object,
which looks slightly more different than the former two, let's add a check
that those are not used at the same time.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Thu, 4 Jan 2018 22:50:42 +0000 (14:50 -0800)]
diffcore: add a pickaxe option to find a specific blob
Sometimes users are given a hash of an object and they want to
identify it further (ex.: Use verify-pack to find the largest blobs,
but what are these? or [1])
One might be tempted to extend git-describe to also work with blobs,
such that `git describe <blob-id>` gives a description as
'<commit-ish>:<path>'. This was implemented at [2]; as seen by the sheer
number of responses (>110), it turns out this is tricky to get right.
The hard part to get right is picking the correct 'commit-ish' as that
could be the commit that (re-)introduced the blob or the blob that
removed the blob; the blob could exist in different branches.
Junio hinted at a different approach of solving this problem, which this
patch implements. Teach the diff machinery another flag for restricting
the information to what is shown. For example:
$ ./git log --oneline --find-object=v2.0.0:Makefile
b2feb64309 Revert the whole "ask curl-config" topic for now
47fbfded53 i18n: only extract comments marked with "TRANSLATORS:"
we observe that the Makefile as shipped with 2.0 was appeared in
v1.9.2-471-g47fbfded53 and in
v2.0.0-rc1-5-gb2feb6430b. The
reason why these commits both occur prior to v2.0.0 are evil
merges that are not found using this new mechanism.
[1] https://stackoverflow.com/questions/223678/which-commit-has-this-blob
[2] https://public-inbox.org/git/
20171028004419.10139-1-sbeller@google.com/
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Thu, 4 Jan 2018 22:50:41 +0000 (14:50 -0800)]
diff: introduce DIFF_PICKAXE_KINDS_MASK
Currently the check whether to perform pickaxing is done via checking
`diffopt->pickaxe`, which contains the command line argument that we
want to pickaxe for. Soon we'll introduce a new type of pickaxing, that
will not store anything in the `.pickaxe` field, so let's migrate the
check to be dependent on pickaxe_opts.
It is not enough to just replace the check for pickaxe by pickaxe_opts,
because flags might be set, but pickaxing was not requested ('-i').
To cope with that, introduce a mask to check only for the bits indicating
the modes of operation.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Thu, 4 Jan 2018 22:50:40 +0000 (14:50 -0800)]
diff: migrate diff_flags.pickaxe_ignore_case to a pickaxe_opts bit
Currently flags for pickaxing are found in different places. Unify the
flags into the `pickaxe_opts` field, which will contain any pickaxe related
flags.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Thu, 4 Jan 2018 22:50:39 +0000 (14:50 -0800)]
diff.h: make pickaxe_opts an unsigned bit field
This variable is used as a bit field[1], and as we are about to add more
fields, indicate its usage as a bit field by making it unsigned.
[1] containing the bits
#define DIFF_PICKAXE_ALL 1
#define DIFF_PICKAXE_REGEX 2
#define DIFF_PICKAXE_KIND_S 4
#define DIFF_PICKAXE_KIND_G 8
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christopher Díaz Riveros [Thu, 4 Jan 2018 21:06:40 +0000 (16:06 -0500)]
l10n: es.po: Update Spanish Translation v2.16.0
Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
Jeff King [Thu, 4 Jan 2018 16:49:42 +0000 (11:49 -0500)]
docs/diff-options: clarify scope of diff-filter types
The same document for "--diff-filter" is included by many
programs in the diff family. Because it mentions all
possible types (added, removed, etc), this may imply to the
reader that all types can be generated by a particular
command. But this isn't necessarily the case; "diff-files"
cannot generally produce an "Added" entry, since the diff is
limited to what is already in the index.
Let's make it clear that the list here is the full one, and
does not imply anything about what a particular invocation
may produce.
Note that conditionally including items (e.g., omitting
"Added" in the git-diff-files manpage) isn't the right
solution here for two reasons:
- The problem isn't diff-files, but doing an index to
working tree diff. "git diff" can do the same diff, but
also has other modes where "Added" does show up.
- The direction of the diff matters. Doing "diff-files -R"
can get you Added entries (but not Deleted ones).
So it's best just to explain that the set of available types
depends on the specific diff invocation.
Reported-by: John Cheng <johnlicheng@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Todd Zullinger [Sun, 31 Dec 2017 02:32:34 +0000 (21:32 -0500)]
http: fix v1 protocol tests with apache httpd < 2.4
The apache config used by tests was updated to use the SetEnvIf
directive to set the Git-Protocol header in
19113a26b6 ("http: tell
server that the client understands v1", 2017-10-16).
Setting the Git-Protocol header is restricted to httpd >= 2.4, but
mod_setenvif and the SetEnvIf directive work with lower versions, at
least as far back as 2.0, according to the httpd documentation:
https://httpd.apache.org/docs/2.0/mod/mod_setenvif.html
Drop the restriction. Tested with httpd 2.2 and 2.4.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Acked-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason [Fri, 29 Dec 2017 22:59:03 +0000 (22:59 +0000)]
perf: amend the grep tests to test grep.threads
Ever since
5b594f457a ("Threaded grep", 2010-01-25) the number of
threads git-grep uses under PTHREADS has been hardcoded to 8, but
there's no performance test to check whether this is an optimal
setting.
Amend the existing tests for the grep engines to support a mode where
this can be tested, e.g.:
GIT_PERF_GREP_THREADS='1 8 16' GIT_PERF_LARGE_REPO=~/g/linux ./run p782*
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Wed, 3 Jan 2018 16:54:54 +0000 (17:54 +0100)]
t0302 & t3900: add forgotten quotes
When cleaning up files in the $HOME directory, it really makes sense to
quote the path, especially in Git's test suite, where the HOME directory
is *guaranteed* to contain spaces in its name.
It would appear that those two tests pass even without cleaning up the
files, but really more by pure chance than by design (the cleanup seems
not actually to be necessary).
However, if anybody would have a left-over `trash/` directory in Git's
`t/` directory, these tests would fail, because they would all of a
sudden try to delete that directory, but without the `-r` (recursive)
flag. That is how this issue was found.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Wed, 3 Jan 2018 16:54:50 +0000 (17:54 +0100)]
Allow the test suite to pass in a directory whose name contains spaces
It is totally legitimate to clone Git's source code anywhere, including
into, say, directories whose name (or the name of its absolute path)
contains spaces.
However, a couple of tests failed to anticipate this, for lack of
quoting (or in one instance, for failure to expect more than one space
in the absolute path of the TEST_DIRECTORY). This can be easily verified
by calling these commands in your current clone:
git clone . with\ spaces
cd with\ spaces
make -j15 test
Let's fix this.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason [Wed, 3 Jan 2018 18:48:52 +0000 (18:48 +0000)]
bisect: fix a regression causing a segfault
In
7c117184d7 ("bisect: fix off-by-one error in
`best_bisection_sorted()`", 2017-11-05) the more careful logic dealing
with freeing p->next in
50e62a8e70 ("rev-list: implement
--bisect-all", 2007-10-22) was removed.
Restore the more careful check to avoid segfaulting. Ideally this
would come with a test case, but we don't have steps to reproduce
this, only a backtrace from gdb pointing to this being the issue.
Reported-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Todd Zullinger [Tue, 2 Jan 2018 15:33:50 +0000 (10:33 -0500)]
doc/SubmittingPatches: improve text formatting
049e64aa50 ("Documentation: convert SubmittingPatches to AsciiDoc",
2017-11-12) changed the `git blame` and `git shortlog` examples given in
the section on sending your patches.
In order to italicize the `$path` argument the commands are enclosed in
plus characters as opposed to backticks. The difference between the
quoting methods is that backtick enclosed text is not subject to further
expansion. This formatting makes reading SubmittingPatches in a git
clone a little more difficult. In addition to the underscores around
`$path` the `--` chars in `git shortlog --no-merges` must be replaced
with `{litdd}`.
Use backticks to quote these commands. The italicized `$path` is lost
from the html version but the commands can be read (and copied) more
easily by users reading the text version. These readers are more likely
to use the commands while submitting patches. Make it easier for them.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Tue, 2 Jan 2018 21:11:39 +0000 (16:11 -0500)]
clone: do not clean up directories we didn't create
Once upon a time, git-clone would refuse to write into a
directory that it did not itself create. The cleanup
routines for a failed clone could therefore just remove the
git and worktree dirs completely.
In
55892d2398 (Allow cloning to an existing empty directory,
2009-01-11), we learned to write into an existing directory.
Which means that doing:
mkdir foo
git clone will-fail foo
ends up deleting foo. This isn't a huge catastrophe, since
by definition foo must be empty. But it's somewhat
confusing; we should leave the filesystem as we found it.
Because we know that the only directory we'll write into is
an empty one, we can handle this case by just passing the
KEEP_TOPLEVEL flag to our recursive delete (if we could
write into populated directories, we'd have to keep track of
what we wrote and what we did not, which would be much
harder).
Note that we need to handle the work-tree and git-dir
separately, though, as only one might exist (and the new
tests in t5600 cover all cases).
Reported-by: Stephan Janssen <sjanssen@you-get.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Tue, 2 Jan 2018 21:10:14 +0000 (16:10 -0500)]
clone: factor out dir_exists() helper
Two parts of git-clone's setup logic check whether a
directory exists, and they both call stat directly with the
same scratch "struct stat" buffer. Let's pull that into a
helper, which has a few advantages:
- it makes the purpose of the stat calls more obvious
- it makes it clear that we don't care about the
information in "buf" remaining valid
- if we later decide to make the check more robust (e.g.,
complaining about non-directories), we can do it in one
place
Note that we could just use file_exists() for this, which
has identical code. But we specifically care about
directories, so this future-proofs us against that function
later getting more picky about seeing actual files.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Tue, 2 Jan 2018 21:09:00 +0000 (16:09 -0500)]
t5600: modernize style
This is an old script which could use some updating before
we add to it:
- use the standard line-breaking:
test_expect_success 'title' '
body
'
- run all code inside test_expect blocks to catch
unexpected failures in setup steps
- use "test_commit -C" instead of manually entering
sub-repo
- use test_when_finished for cleanup steps
- test_path_is_* as appropriate
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Tue, 2 Jan 2018 21:08:33 +0000 (16:08 -0500)]
t5600: fix outdated comment about unborn HEAD
Back when this test was written, git-clone could not handle
a repository without any commits. These days it works fine,
and this comment is out of date.
At first glance it seems like we could just drop this code
entirely now, but it's necessary for the final test, which
was added later. That test corrupts the repository by
temporarily removing its objects, which means we need to
have some objects to move.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor [Sun, 31 Dec 2017 16:02:06 +0000 (17:02 +0100)]
travis-ci: check that all build artifacts are .gitignore-d
Every once in a while our explicit .gitignore files get out of sync
when our build process learns to create new artifacts, like test
helper executables, but the .gitignore files are not updated
accordingly.
Use Travis CI to help catch such issues earlier: check that there are
no untracked files at the end of any build jobs building Git (i.e. the
64 bit Clang and GCC Linux and OSX build jobs, plus the GETTEXT_POISON
and 32 bit Linux build jobs) or its documentation, and fail the build
job if there are any present.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor [Sun, 31 Dec 2017 16:02:05 +0000 (17:02 +0100)]
travis-ci: don't store P4 and Git LFS in the working tree
The Clang and GCC 64 bit Linux build jobs download and store the P4
and Git LFS executables under the current directory, which is the
working tree that we are about to build and test. This means that Git
commands like 'status' or 'ls-files' would list these files as
untracked. The next commit is about to make sure that there are no
untracked files present after the build, and the downloaded
executables in the working tree are interfering with those upcoming
checks.
Therefore, let's download P4 and Git LFS in the home directory,
outside of the working tree.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 26 Sep 2017 02:40:42 +0000 (11:40 +0900)]
merge: teach -Xours/-Xtheirs to symbolic link merge
The -Xours/-Xtheirs merge options were originally defined as a way
to "force" the resolution of 3way textual merge conflicts to take
one side without using your editor, hence did not even trigger in
situations where you would normally not get the <<< === >>> conflict
markers.
This was improved for binary files back in 2012 with
a944af1d
("merge: teach -Xours/-Xtheirs to binary ll-merge driver",
2012-09-08).
Teach a similar trick to the codepath that deals with merging two
conflicting changes to symbolic links.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tested-by: Yaroslav Halchenko <yoh@onerussian.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jean-Noel Avila [Sun, 31 Dec 2017 16:35:53 +0000 (17:35 +0100)]
l10n: fr.po v2.16.0 round 1
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
SZEDER Gábor [Sun, 31 Dec 2017 10:12:05 +0000 (11:12 +0100)]
travis-ci: record and skip successfully built trees
Travis CI dutifully builds and tests each new branch tip, even if its
tree has previously been successfully built and tested. This happens
often enough in contributors' workflows, when a work-in-progress
branch is rebased changing e.g. only commit messages or the order or
number of commits while leaving the resulting code intact, and is then
pushed to a Travis CI-enabled GitHub fork.
This is wasting Travis CI's resources and is sometimes scary-annoying
when the new tip commit with a tree identical to the previous,
successfully tested one is suddenly reported in red, because one of
the OSX build jobs happened to exceed the time limit yet again.
So extend our Travis CI build scripts to skip building commits whose
trees have previously been successfully built and tested. Use the
Travis CI cache feature to keep a record of the object names of trees
that tested successfully, in a plain and simple flat text file, one
line per tree object name. Append the current tree's object name at
the end of every successful build job to this file, along with a bit
of additional info about the build job (commit object name, Travis CI
job number and id). Limit the size of this file to 1000 records, to
prevent it from growing too large for git/git's forever living
integration branches. Check, using a simple grep invocation, in each
build job whether the current commit's tree is already in there, and
skip the build if it is. Include a message in the skipped build job's
trace log, containing the URL to the build job successfully testing
that tree for the first time and instructions on how to force a
re-build. Catch the case when a build job, which successfully built
and tested a particular tree for the first time, is restarted and omit
the URL of the previous build job's trace log, as in this case it's
the same build job and the trace log has just been overwritten.
Note: this won't kick in if two identical trees are on two different
branches, because Travis CI caches are not shared between build jobs
of different branches.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor [Sun, 31 Dec 2017 10:12:04 +0000 (11:12 +0100)]
travis-ci: create the cache directory early in the build process
It seems that Travis CI creates the cache directory for us anyway,
even when a previous cache doesn't exist for the current build job.
Alas, this behavior is not explicitly documented, therefore we don't
rely on it and create the cache directory ourselves in those build
jobs that read/write cached data (currently only the prove state).
In the following commit we'll start to cache additional data in every
build job, and will access the cache much earlier in the build
process.
Therefore move creating the cache directory to 'ci/lib-travisci.sh' to
make sure that it exists at the very beginning of every build job.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor [Sun, 31 Dec 2017 10:12:03 +0000 (11:12 +0100)]
travis-ci: print the "tip of branch is exactly at tag" message in color
To make this info message stand out from the regular build job trace
output.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Tue, 2 Jan 2018 14:45:47 +0000 (22:45 +0800)]
Merge branch 'master' of git://github.com/alshopov/git-po
* 'master' of git://github.com/alshopov/git-po:
l10n: bg.po: Updated Bulgarian translation (3284t)
Alexander Shopov [Mon, 1 Jan 2018 20:41:26 +0000 (21:41 +0100)]
l10n: bg.po: Updated Bulgarian translation (3284t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Peter Krefting [Mon, 1 Jan 2018 08:38:15 +0000 (09:38 +0100)]
l10n: sv.po: Update Swedish translation (3284t0f0u)
Also corrected spelling.
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Louis Bettens [Wed, 22 Nov 2017 17:24:40 +0000 (18:24 +0100)]
l10n: fr.po: "worktree list" mistranslated as prune
Signed-off-by: Louis Bettens <louis@bettens.info>
Jiang Xin [Sun, 31 Dec 2017 02:48:20 +0000 (10:48 +0800)]
Merge branch 'maint' of git://github.com/git-l10n/git-po
* 'maint' of git://github.com/git-l10n/git-po:
l10n: fixes to German translation
l10n: Update Spanish translation
l10n: zh_CN translate parameter name
l10n: zh_CN Fix typo
l10n: Fixes to Catalan translation
Jiang Xin [Sun, 31 Dec 2017 02:46:19 +0000 (10:46 +0800)]
l10n: git.pot: v2.16.0 round 1 (64 new, 25 removed)
Generate po/git.pot from v2.16.0-rc0 for git v2.16.0 l10n round 1.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Junio C Hamano [Thu, 28 Dec 2017 22:12:06 +0000 (14:12 -0800)]
Git 2.16-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 28 Dec 2017 22:08:50 +0000 (14:08 -0800)]
Merge branch 'sb/describe-blob'
"git describe" was taught to dig trees deeper to find a
<commit-ish>:<path> that refers to a given blob object.
* sb/describe-blob:
builtin/describe.c: describe a blob
builtin/describe.c: factor out describe_commit
builtin/describe.c: print debug statements earlier
builtin/describe.c: rename `oid` to avoid variable shadowing
revision.h: introduce blob/tree walking in order of the commits
list-objects.c: factor out traverse_trees_and_blobs
t6120: fix typo in test name
Junio C Hamano [Thu, 28 Dec 2017 22:08:50 +0000 (14:08 -0800)]
Merge branch 'hi/merge-verify-sig-config'
"git merge" learned to pay attention to merge.verifySignatures
configuration variable and pretend as if '--verify-signatures'
option was given from the command line.
* hi/merge-verify-sig-config:
t5573, t7612: clean up after unexpected success of 'pull' and 'merge'
t: add tests for pull --verify-signatures
merge: add config option for verifySignatures
Junio C Hamano [Thu, 28 Dec 2017 22:08:50 +0000 (14:08 -0800)]
Merge branch 'ws/curl-http-proxy-over-https'
Git has been taught to support an https:// URL used for http.proxy
when using recent versions of libcurl.
* ws/curl-http-proxy-over-https:
http: support CURLPROXY_HTTPS
Junio C Hamano [Thu, 28 Dec 2017 22:08:49 +0000 (14:08 -0800)]
Merge branch 'ks/doc-previous-checkout'
Doc update.
* ks/doc-previous-checkout:
Doc/check-ref-format: clarify information about @{-N} syntax
Junio C Hamano [Thu, 28 Dec 2017 22:08:49 +0000 (14:08 -0800)]
Merge branch 'ks/rebase-error-messages'
Error messages from "git rebase" have been somewhat cleaned up.
* ks/rebase-error-messages:
rebase: rebasing can also be done when HEAD is detached
rebase: distinguish user input by quoting it
rebase: consistently use branch_name variable
Junio C Hamano [Thu, 28 Dec 2017 22:08:49 +0000 (14:08 -0800)]
Merge branch 'sr/http-sslverify-config-doc'
Docfix.
* sr/http-sslverify-config-doc:
config: document default value of http.sslVerify
Junio C Hamano [Thu, 28 Dec 2017 22:08:48 +0000 (14:08 -0800)]
Merge branch 'nm/imap-send-quote-server-folder-name'
"git imap-send" did not correctly quote the folder name when
making a request to the server, which has been corrected.
* nm/imap-send-quote-server-folder-name:
imap-send: URI encode server folder
Junio C Hamano [Thu, 28 Dec 2017 22:08:48 +0000 (14:08 -0800)]
Merge branch 'bp/fsmonitor'
Test fix.
* bp/fsmonitor:
p7519: improve check for prerequisite WATCHMAN
Junio C Hamano [Thu, 28 Dec 2017 22:08:47 +0000 (14:08 -0800)]
Merge branch 'jh/partial-clone-doc'
* jh/partial-clone-doc:
partial-clone: design doc
Junio C Hamano [Thu, 28 Dec 2017 22:08:47 +0000 (14:08 -0800)]
Merge branch 'jt/transport-hide-vtable'
Code clean-up.
* jt/transport-hide-vtable:
transport: make transport vtable more private
clone, fetch: remove redundant transport check
Junio C Hamano [Thu, 28 Dec 2017 22:08:47 +0000 (14:08 -0800)]
Merge branch 'js/enhanced-version-info'
"git version --build-options" learned to report the host CPU and
the exact commit object name the binary was built from.
* js/enhanced-version-info:
version --build-options: report commit, too, if possible
version --build-options: also report host CPU
Junio C Hamano [Thu, 28 Dec 2017 22:08:46 +0000 (14:08 -0800)]
Merge branch 'tz/lib-git-svn-svnserve-tests'
* tz/lib-git-svn-svnserve-tests:
t/lib-git-svn.sh: improve svnserve tests with parallel make test
t/lib-git-svn: cleanup inconsistent tab/space usage
Junio C Hamano [Thu, 28 Dec 2017 22:08:46 +0000 (14:08 -0800)]
Merge branch 'ew/svn-crlf'
"git svn" has been updated to strip CRs in the commit messages, as
recent versions of Subversion rejects them.
* ew/svn-crlf:
git-svn: convert CRLF to LF in commit message to SVN
Junio C Hamano [Thu, 28 Dec 2017 22:08:46 +0000 (14:08 -0800)]
Merge branch 'cc/skip-to-optional-val'
Introduce a helper to simplify code to parse a common pattern that
expects either "--key" or "--key=<something>".
* cc/skip-to-optional-val:
t4045: reindent to make helpers readable
diff: add tests for --relative without optional prefix value
diff: use skip_to_optional_arg_default() in parsing --relative
diff: use skip_to_optional_arg_default()
diff: use skip_to_optional_arg()
index-pack: use skip_to_optional_arg()
git-compat-util: introduce skip_to_optional_arg()
Junio C Hamano [Thu, 28 Dec 2017 22:08:45 +0000 (14:08 -0800)]
Merge branch 'ra/prompt-eread-fix'
Update the shell prompt script (in contrib/) to strip trailing CR
from strings read from various "state" files.
* ra/prompt-eread-fix:
git-prompt: fix reading files with windows line endings
git-prompt: make __git_eread intended use explicit
Junio C Hamano [Thu, 28 Dec 2017 22:08:45 +0000 (14:08 -0800)]
Merge branch 'bw/path-doc'
Doc updates.
* bw/path-doc:
path: document path functions
René Scharfe [Mon, 25 Dec 2017 17:48:34 +0000 (18:48 +0100)]
commit: remove unused function clear_commit_marks_for_object_array()
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Mon, 25 Dec 2017 17:47:51 +0000 (18:47 +0100)]
revision: remove the unused flag leak_pending
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Mon, 25 Dec 2017 17:47:04 +0000 (18:47 +0100)]
checkout: avoid using the rev_info flag leak_pending
The leak_pending flag is so awkward to use that multiple comments had to
be added around each occurrence. We only use it for remembering the
commits whose marks we have to clear after checking if the old HEAD is
detached. This is easy, though: We need to do that for the old commit,
the new one -- and for all refs.
Don't bother tracking exactly which commits need their flags cleared,
just nuke all we have in-core. This change is safe because refs can
point at anything, so other program parts can't depend on any kept flags
anyway. And since all refs are loaded we have to basically deal with
all commits anyway, so performance should not be negatively impacted.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Mon, 25 Dec 2017 17:46:14 +0000 (18:46 +0100)]
bundle: avoid using the rev_info flag leak_pending
The leak_pending flag is so awkward to use that multiple comments had to
be added around each occurrence. We use it for remembering the
prerequisites for the bundle. That is easy, though: We have the
ref_list named "prerequisites" in the header for just that purpose.
Use this original list of prerequisites to check if all of them are
present and to clear their commit marks afterward. The two new loops
are intentionally kept similar to the first one in the function.
Calling parse_object() a second time is expected be quick and successful
in each case -- any errors should have been handled in the first round.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Mon, 25 Dec 2017 17:45:36 +0000 (18:45 +0100)]
bisect: avoid using the rev_info flag leak_pending
The leak_pending flag is so awkward to use that multiple comments had to
be added around each occurrence. We only use it for remembering the
commits whose marks we have to clear after checking if all of the good
ones are ancestors of the bad one. This is easy, though: We need to do
that for the bad and good commits, of course.
Let check_good_are_ancestors_of_bad() create and own the array of bad
and good commits, and use it to clear the commit marks as well.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Mon, 25 Dec 2017 17:44:58 +0000 (18:44 +0100)]
object: add clear_commit_marks_all()
Add a function for clearing the commit marks of all in-core commit
objects. It's similar to clear_object_flags(), but more precise, since
it leaves the other object types alone. It still has to iterate through
them, though.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Mon, 25 Dec 2017 17:44:12 +0000 (18:44 +0100)]
ref-filter: use clear_commit_marks_many() in do_merge_filter()
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Mon, 25 Dec 2017 17:44:03 +0000 (18:44 +0100)]
commit: use clear_commit_marks_many() in remove_redundant()
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Mon, 25 Dec 2017 17:43:37 +0000 (18:43 +0100)]
commit: avoid allocation in clear_commit_marks_many()
Pass the entries of the commit array directly to clear_commit_marks_1()
instead of adding them to a commit_list first. The function clears the
commit and any first parent without allocation; only higher numbered
parents are added to a list for later treatment. This change extends
that optimization to clear_commit_marks_many().
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason [Thu, 28 Dec 2017 14:07:41 +0000 (14:07 +0000)]
Makefile: NO_OPENSSL=1 should no longer imply BLK_SHA1=1
Use the collision detecting SHA-1 implementation by default even when
NO_OPENSSL is set.
Setting NO_OPENSSL=UnfortunatelyYes has implied BLK_SHA1=1 ever since
the former was introduced in
dd53c7ab29 (Support for NO_OPENSSL,
2005-07-29). That implication should have been removed when the
default SHA-1 implementation changed from OpenSSL to DC_SHA1 in
e6b07da278 (Makefile: make DC_SHA1 the default, 2017-03-17). Finish
what that commit started by removing the BLK_SHA1 fallback setting so
the default DC_SHA1 implementation will be used.
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Wed, 27 Dec 2017 10:18:39 +0000 (17:18 +0700)]
wt-status.c: handle worktree renames
Before
425a28e0a4 (diff-lib: allow ita entries treated as "not yet exist
in index" - 2016-10-24) there are never "new files" in the index, which
essentially disables rename detection because we only detect renames
when a new file appears in a diff pair.
After that commit, an i-t-a entry can appear as a new file in "git
diff-files". But the diff callback function in wt-status.c does not
handle this case and produces incorrect status output.
PS. The reader may notice that this patch adds a new xstrdup() but not
a free(). Yes we leak memory (the same for head_path). But wt_status
so far has been short lived, this leak should not matter in
practice.
Noticed-by: Alex Vandiver <alexmv@dropbox.com>
Helped-by: Igor Djordjevic <igor.d.djordjevic@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Wed, 27 Dec 2017 10:18:38 +0000 (17:18 +0700)]
wt-status.c: rename rename-related fields in wt_status_change_data
These field "head_path" is used for rename display only. In the next
patch we introduce another rename pair where the rename source is no
longer HEAD. Rename it to something more generic.
While at there, rename "score" as well and store the rename diff code
in a separate field instead of hardcoding key[0] (i.e. diff-index) in
porcelain v2 code.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Wed, 27 Dec 2017 10:18:37 +0000 (17:18 +0700)]
wt-status.c: catch unhandled diff status codes
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Wed, 27 Dec 2017 10:18:36 +0000 (17:18 +0700)]
wt-status.c: coding style fix
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Wed, 27 Dec 2017 10:18:35 +0000 (17:18 +0700)]
Use DIFF_DETECT_RENAME for detect_rename assignments
This field can have two values (2 for copy). Use this name instead for
clarity. Many places have already used this constant.
Note, the detect_rename assignments in merge-recursive.c remain
unchanged because it's actually a boolean there.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Wed, 27 Dec 2017 10:18:34 +0000 (17:18 +0700)]
t2203: test status output with porcelain v2 format
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Fri, 22 Dec 2017 23:56:00 +0000 (00:56 +0100)]
sequencer: do not invent whitespace when transforming OIDs
For commands that do not have an argument, there is no need to append a
trailing space at the end of the line.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Fri, 22 Dec 2017 23:55:57 +0000 (00:55 +0100)]
sequencer: report when noop has an argument
The noop command cannot accept any argument, but we never told the user
about any bogus argument. Fix that.
while at it, mention clearly when an argument is required but missing
(for commands *other* than noop).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Fri, 22 Dec 2017 23:55:53 +0000 (00:55 +0100)]
sequencer: remove superfluous conditional
In a conditional block that is only reached when handling a TODO_REWORD
(as seen even from a 3-line context), there is absolutely no need to
nest another block under the identical condition.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Fri, 22 Dec 2017 23:55:43 +0000 (00:55 +0100)]
sequencer: strip bogus LF at end of error messages
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Fri, 22 Dec 2017 23:55:38 +0000 (00:55 +0100)]
rebase: do not continue when the todo list generation failed
This is a *really* long-standing bug. As a matter of fact, this bug has
been with us from the very beginning of `rebase -i`:
1b1dce4bae7 (Teach
rebase an interactive mode, 2007-06-25), where the output of `rev-list`
was piped to `sed` (and any failure of the `rev-list` process would go
completely undetected).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>