Junio C Hamano [Wed, 6 Dec 2017 17:23:41 +0000 (09:23 -0800)]
Merge branch 'tg/deprecate-stash-save'
Doc update.
* tg/deprecate-stash-save:
doc: prefer 'stash push' over 'stash save'
Junio C Hamano [Wed, 6 Dec 2017 17:23:40 +0000 (09:23 -0800)]
Merge branch 'rd/doc-notes-prune-fix'
Doc update.
* rd/doc-notes-prune-fix:
notes: correct 'git notes prune' options to '[-n] [-v]'
Junio C Hamano [Wed, 6 Dec 2017 17:23:39 +0000 (09:23 -0800)]
Merge branch 'rd/man-reflog-add-n'
Doc update.
* rd/man-reflog-add-n:
doc: add missing "-n" (dry-run) option to reflog man page
Junio C Hamano [Wed, 6 Dec 2017 17:23:39 +0000 (09:23 -0800)]
Merge branch 'rd/man-prune-progress'
Doc update.
* rd/man-prune-progress:
prune: add "--progress" to man page and usage msg
Junio C Hamano [Wed, 6 Dec 2017 17:23:38 +0000 (09:23 -0800)]
Merge branch 'jt/submodule-tests-cleanup'
Further test clean-up.
* jt/submodule-tests-cleanup:
Tests: clean up submodule recursive helpers
Junio C Hamano [Wed, 6 Dec 2017 17:23:37 +0000 (09:23 -0800)]
Merge branch 'jn/reproducible-build'
The build procedure has been taught to avoid some unnecessary
instability in the build products.
* jn/reproducible-build:
generate-cmdlist: avoid non-deterministic output
git-gui: sort entries in optimized tclIndex
Junio C Hamano [Wed, 6 Dec 2017 17:23:37 +0000 (09:23 -0800)]
Merge branch 'cc/git-packet-pm'
Code clean-up.
* cc/git-packet-pm:
Git/Packet.pm: use 'if' instead of 'unless'
Git/Packet: clarify that packet_required_key_val_read allows EOF
Junio C Hamano [Wed, 6 Dec 2017 17:23:37 +0000 (09:23 -0800)]
Merge branch 'ac/complete-pull-autostash'
The shell completion (in contrib/) learned that "git pull" can take
the "--autostash" option.
* ac/complete-pull-autostash:
completion: add --autostash and --no-autostash to pull
Junio C Hamano [Wed, 6 Dec 2017 17:23:37 +0000 (09:23 -0800)]
Merge branch 'hm/config-parse-expiry-date'
"git config --expiry-date gc.reflogexpire" can read "2.weeks" from
the configuration and report it as a timestamp, just like "--int"
would read "1k" and report 1024, to help consumption by scripts.
* hm/config-parse-expiry-date:
config: add --expiry-date
Junio C Hamano [Wed, 6 Dec 2017 17:23:36 +0000 (09:23 -0800)]
Merge branch 'tz/branch-doc-remove-set-upstream'
"git branch --set-upstream" has been deprecated and (sort of)
removed, as "--set-upstream-to" is the preferred one these days.
The documentation still had "--set-upstream" listed on its
synopsys section, which has been corrected.
* tz/branch-doc-remove-set-upstream:
branch doc: remove --set-upstream from synopsis
Junio C Hamano [Wed, 6 Dec 2017 17:23:36 +0000 (09:23 -0800)]
Merge branch 'cc/perf-run-config'
* cc/perf-run-config:
perf: store subsection results in "test-results/$GIT_PERF_SUBSECTION/"
perf/run: show name of rev being built
perf/run: add run_subsection()
perf/run: update get_var_from_env_or_config() for subsections
perf/run: add get_subsections()
perf/run: add calls to get_var_from_env_or_config()
perf/run: add GIT_PERF_DIRS_OR_REVS
perf/run: add get_var_from_env_or_config()
perf/run: add '--config' option to the 'run' script
Junio C Hamano [Wed, 6 Dec 2017 17:23:35 +0000 (09:23 -0800)]
Merge branch 'sb/submodule-recursive-checkout-detach-head'
"git checkout --recursive" may overwrite and rewind the history of
the branch that happens to be checked out in submodule
repositories, which might not be desirable. Detach the HEAD but
still allow the recursive checkout to succeed in such a case.
* sb/submodule-recursive-checkout-detach-head:
Documentation/checkout: clarify submodule HEADs to be detached
recursive submodules: detach HEAD from new state
Junio C Hamano [Tue, 28 Nov 2017 04:43:55 +0000 (13:43 +0900)]
Sync with v2.15.1
Junio C Hamano [Tue, 28 Nov 2017 04:43:32 +0000 (13:43 +0900)]
RelNotes: the seventh batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 28 Nov 2017 04:41:50 +0000 (13:41 +0900)]
Merge branch 'rs/include-comments-before-the-function-header'
"git grep -W", "git diff -W" and their friends learned a heuristic
to extend a pre-context beyond the line that matches the "function
pattern" (aka "diff.*.xfuncname") to include a comment block, if
exists, that immediately precedes it.
* rs/include-comments-before-the-function-header:
grep: show non-empty lines before functions with -W
grep: update boundary variable for pre-context
t7810: improve check of -W with user-defined function lines
xdiff: show non-empty lines before functions with -W
xdiff: factor out is_func_rec()
t4051: add test for comments preceding function lines
Junio C Hamano [Tue, 28 Nov 2017 04:41:49 +0000 (13:41 +0900)]
Merge branch 'ma/branch-list-paginate'
"git branch --list" learned to show its output through the pager by
default when the output is going to a terminal, which is controlled
by the pager.branch configuration variable. This is similar to a
recent change to "git tag --list".
* ma/branch-list-paginate:
branch: change default of `pager.branch` to "on"
branch: respect `pager.branch` in list-mode only
t7006: add tests for how git branch paginates
Junio C Hamano [Tue, 28 Nov 2017 04:41:49 +0000 (13:41 +0900)]
Merge branch 'jc/branch-name-sanity'
"git branch" and "git checkout -b" are now forbidden from creating
a branch whose name is "HEAD".
* jc/branch-name-sanity:
builtin/branch: remove redundant check for HEAD
branch: correctly reject refs/heads/{-dash,HEAD}
branch: split validate_new_branchname() into two
branch: streamline "attr_only" handling in validate_new_branchname()
Junio C Hamano [Tue, 28 Nov 2017 04:39:14 +0000 (13:39 +0900)]
Git 2.15.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 28 Nov 2017 04:38:33 +0000 (13:38 +0900)]
Merge branch 'rs/config-write-section-fix' into maint
There was a recent semantic mismerge in the codepath to write out a
section of a configuration section, which has been corrected.
* rs/config-write-section-fix:
config: flip return value of write_section()
Junio C Hamano [Mon, 27 Nov 2017 02:16:50 +0000 (11:16 +0900)]
RelNotes: the sixth batch for 2.16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Nov 2017 02:15:09 +0000 (11:15 +0900)]
Sync with maint
* maint:
A bit more fixes for 2.15.1
RelNotes: minor typo fixes in 2.15.1 draft
Junio C Hamano [Mon, 27 Nov 2017 02:06:40 +0000 (11:06 +0900)]
Merge branch 'sw/pull-ipv46-passthru'
Contrary to the documentation, "git pull -4/-6 other-args" did not
ask the underlying "git fetch" to go over IPv4/IPv6, which has been
corrected.
* sw/pull-ipv46-passthru:
pull: pass -4/-6 option to 'git fetch'
Junio C Hamano [Mon, 27 Nov 2017 02:06:39 +0000 (11:06 +0900)]
Merge branch 'ks/rebase-no-git-foo'
Mentions of "git-rebase" and "git-am" (dashed form) still remained
in end-user visible strings emitted by the "git rebase" command;
they have been corrected.
* ks/rebase-no-git-foo:
git-rebase: clean up dashed-usages in messages
Junio C Hamano [Mon, 27 Nov 2017 02:06:38 +0000 (11:06 +0900)]
Merge branch 'rs/config-write-section-fix'
There was a recent semantic mismerge in the codepath to write out a
section of a configuration section, which has been corrected.
* rs/config-write-section-fix:
config: flip return value of write_section()
Junio C Hamano [Mon, 27 Nov 2017 02:06:37 +0000 (11:06 +0900)]
Merge branch 'ew/rebase-mboxrd'
When "git rebase" prepared an mailbox of changes and fed it to "git
am" to replay them, it was confused when a stray "From " happened
to be in the log message of one of the replayed changes. This has
been corrected.
* ew/rebase-mboxrd:
rebase: use mboxrd format to avoid split errors
Junio C Hamano [Mon, 27 Nov 2017 02:06:37 +0000 (11:06 +0900)]
Merge branch 'tb/add-renormalize'
"git add --renormalize ." is a new and safer way to record the fact
that you are correcting the end-of-line convention and other
"convert_to_git()" glitches in the in-repository data.
* tb/add-renormalize:
add: introduce "--renormalize"
Junio C Hamano [Mon, 27 Nov 2017 02:06:37 +0000 (11:06 +0900)]
Merge branch 'tz/complete-branch-copy'
Command line completion (in contrib/) has been taught about the
"--copy" option of "git branch".
* tz/complete-branch-copy:
completion: add '--copy' option to 'git branch'
Junio C Hamano [Mon, 27 Nov 2017 02:06:36 +0000 (11:06 +0900)]
Merge branch 'rs/apply-inaccurate-eof-with-incomplete-line'
"git apply --inaccurate-eof" when used with "--ignore-space-change"
triggered an internal sanity check, which has been fixed.
* rs/apply-inaccurate-eof-with-incomplete-line:
apply: update line lengths for --inaccurate-eof
Junio C Hamano [Mon, 27 Nov 2017 02:06:35 +0000 (11:06 +0900)]
Merge branch 'pw/sequencer-recover-from-unlockable-index'
The sequencer machinery (used by "git cherry-pick A..B", and "git
rebase -i", among other things) would have lost a commit if stopped
due to an unlockable index file, which has been fixed.
* pw/sequencer-recover-from-unlockable-index:
sequencer: reschedule pick if index can't be locked
Junio C Hamano [Mon, 27 Nov 2017 02:06:35 +0000 (11:06 +0900)]
Merge branch 'sd/branch-copy'
Code clean-up.
* sd/branch-copy:
config: avoid "write_in_full(fd, buf, len) != len" pattern
Junio C Hamano [Mon, 27 Nov 2017 02:06:34 +0000 (11:06 +0900)]
Merge branch 'sb/test-cherry-pick-submodule-getting-in-a-way'
The three-way merge performed by "git cherry-pick" was confused
when a new submodule was added in the meantime, which has been
fixed (or "papered over").
* sb/test-cherry-pick-submodule-getting-in-a-way:
merge-recursive: handle addition of submodule on our side of history
t/3512: demonstrate unrelated submodule/file conflict as cherry-pick failure
Junio C Hamano [Mon, 27 Nov 2017 02:06:34 +0000 (11:06 +0900)]
Merge branch 'tz/notes-error-to-stderr'
"git notes" sent its error message to its standard output stream,
which was corrected.
* tz/notes-error-to-stderr:
notes: send "Automatic notes merge failed" messages to stderr
Junio C Hamano [Mon, 27 Nov 2017 02:06:33 +0000 (11:06 +0900)]
Merge branch 'tz/redirect-fix'
A few scripts (both in production and tests) incorrectly redirected
their error output. These have been corrected.
* tz/redirect-fix:
rebase: fix stderr redirect in apply_autostash()
t/lib-gpg: fix gpgconf stderr redirect to /dev/null
Junio C Hamano [Mon, 27 Nov 2017 02:06:32 +0000 (11:06 +0900)]
Merge branch 'rv/sendemail-tocmd-in-config-and-completion'
Teach "sendemail.tocmd" to places that know about "sendemail.to",
like documentation and shell completion (in contrib/).
* rv/sendemail-tocmd-in-config-and-completion:
completion: add git config sendemail.tocmd
Documentation/config: add sendemail.tocmd to list preceding "See git-send-email(1)"
Junio C Hamano [Mon, 27 Nov 2017 02:06:32 +0000 (11:06 +0900)]
Merge branch 'jc/merge-base-fork-point-doc'
Clarify and enhance documentation for "merge-base --fork-point", as
it was clear what it computed but not why/what for.
* jc/merge-base-fork-point-doc:
merge-base --fork-point doc: clarify the example and failure modes
Junio C Hamano [Mon, 27 Nov 2017 02:06:31 +0000 (11:06 +0900)]
Merge branch 'jc/ignore-cr-at-eol'
The "diff" family of commands learned to ignore differences in
carriage return at the end of line.
* jc/ignore-cr-at-eol:
diff: --ignore-cr-at-eol
xdiff: reassign xpparm_t.flags bits
Junio C Hamano [Mon, 27 Nov 2017 01:58:31 +0000 (10:58 +0900)]
A bit more fixes for 2.15.1
We've been waiting long enough, a few more would not hurt ;-)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Nov 2017 01:57:02 +0000 (10:57 +0900)]
Merge branch 'ma/reduce-heads-leakfix' into maint
Leak fixes.
* ma/reduce-heads-leakfix:
reduce_heads: fix memory leaks
builtin/merge-base: free commit lists
Junio C Hamano [Mon, 27 Nov 2017 01:57:02 +0000 (10:57 +0900)]
Merge branch 'ma/bisect-leakfix' into maint
Leak fixes.
* ma/bisect-leakfix:
bisect: fix memory leak when returning best element
bisect: fix off-by-one error in `best_bisection_sorted()`
bisect: fix memory leak in `find_bisection()`
bisect: change calling-convention of `find_bisection()`
Junio C Hamano [Mon, 27 Nov 2017 01:57:02 +0000 (10:57 +0900)]
Merge branch 'rs/apply-fuzzy-match-fix' into maint
A fix for an ancient bug in "git apply --ignore-space-change" codepath.
* rs/apply-fuzzy-match-fix:
apply: avoid out-of-bounds access in fuzzy_matchlines()
Junio C Hamano [Mon, 27 Nov 2017 01:57:01 +0000 (10:57 +0900)]
Merge branch 'ad/submitting-patches-title-decoration' into maint
Doc update around use of "format-patch --subject-prefix" etc.
* ad/submitting-patches-title-decoration:
doc/SubmittingPatches: correct subject guidance
Junio C Hamano [Mon, 27 Nov 2017 01:57:00 +0000 (10:57 +0900)]
Merge branch 'rs/imap-send-next-arg-fix' into maint
Error checking in "git imap-send" for empty response has been
improved.
* rs/imap-send-next-arg-fix:
imap-send: handle missing response codes gracefully
imap-send: handle NULL return of next_arg()
Todd Zullinger [Sat, 25 Nov 2017 17:32:40 +0000 (12:32 -0500)]
RelNotes: minor typo fixes in 2.15.1 draft
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Albert Astals Cid [Tue, 21 Nov 2017 14:39:28 +0000 (15:39 +0100)]
completion: add --autostash and --no-autostash to pull
Ideally we should only autocomplete if pull has --rebase since
they only work with it but could not figure out how to do that
and the error message of doing git pull --autostash points out
that you need --rebase so i guess it's good enough
Signed-off-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Tue, 21 Nov 2017 16:09:39 +0000 (17:09 +0100)]
Git/Packet.pm: use 'if' instead of 'unless'
The code is more understandable with 'if' instead of 'unless'.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Tue, 21 Nov 2017 16:09:38 +0000 (17:09 +0100)]
Git/Packet: clarify that packet_required_key_val_read allows EOF
The function calls itself "required", but it does not die when it
sees an unexpected EOF.
Let's rename it to "packet_key_val_read()".
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 22 Nov 2017 05:57:52 +0000 (14:57 +0900)]
Merge branch 'jn/reproducible-build' of ../git-gui into jn/reproducible-build
* 'jn/reproducible-build' of ../git-gui:
git-gui: sort entries in optimized tclIndex
Jonathan Nieder [Sat, 2 Jul 2016 00:32:00 +0000 (17:32 -0700)]
generate-cmdlist: avoid non-deterministic output
Non-determinism makes it harder for build tools to discover when a
target needs to be rebuilt.
generate-cmdlist.sh stores the full path in a comment:
/* Automatically generated by /build/git-agojiD/git-2.15.0/generate-cmdlist.sh */
Use the file name alone instead.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Anders Kaseorg [Wed, 16 Nov 2016 21:37:17 +0000 (16:37 -0500)]
git-gui: sort entries in optimized tclIndex
auto_mkindex expands wildcards in directory order, which depends on
the underlying filesystem. To improve build reproducibility, sort the
list of *.tcl files in the Makefile.
The unoptimized loading case was previously fixed in gitgui-0.21.0~14
(git-gui: sort entries in tclIndex, 2015-01-26).
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Phil Hord [Tue, 21 Nov 2017 23:05:23 +0000 (15:05 -0800)]
doc: prefer 'stash push' over 'stash save'
Although `git stash save` was deprecated recently, some parts of the
documentation still refer to it instead of `push`.
Signed-off-by: Phil Hord <phil.hord@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Tan [Tue, 21 Nov 2017 22:12:56 +0000 (14:12 -0800)]
Tests: clean up submodule recursive helpers
This continues the work in commit
d3b5a49 ("Tests: clean up and document
submodule helpers", 2017-11-08).
Factor out the commonalities from
test_submodule_switch_recursing_with_args() and
test_submodule_forced_switch_recursing_with_args() in
lib-submodule-update.sh, and document their usage. Some tests differ
slightly in their test assertions; I have used the superset of those
assertions in that case.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert P. J. Day [Tue, 21 Nov 2017 19:17:21 +0000 (14:17 -0500)]
notes: correct 'git notes prune' options to '[-n] [-v]'
Currently, 'git notes prune' in man page and usage message
incorrectly lists options as '[-n | -v]', rather than '[-n] [-v]'.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert P. J. Day [Tue, 21 Nov 2017 15:51:52 +0000 (10:51 -0500)]
prune: add "--progress" to man page and usage msg
Add mention of git prune's "--progress" option to the SYNOPSIS and
DESCRIPTION sections of the man page, and to the usage message of "git
prune" itself.
While we're here, move the explanation of "--" toward the end of the
DESCRIPTION section, where it belongs.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert P. J. Day [Tue, 21 Nov 2017 15:39:55 +0000 (10:39 -0500)]
doc: add missing "-n" (dry-run) option to reflog man page
While the "git reflog" man page supports both "--dry-run" and "-n" for
a dry run, the man page mentions only the former, not the latter.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 21 Nov 2017 05:11:40 +0000 (14:11 +0900)]
Sync with maint
* maint:
Almost ready for 2.15.1
Junio C Hamano [Tue, 21 Nov 2017 05:11:06 +0000 (14:11 +0900)]
RelNotes: the fifth batch for 2.16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 21 Nov 2017 05:07:52 +0000 (14:07 +0900)]
Merge branch 'rs/apply-fuzzy-match-fix'
A fix for an ancient bug in "git apply --ignore-space-change" codepath.
* rs/apply-fuzzy-match-fix:
apply: avoid out-of-bounds access in fuzzy_matchlines()
Junio C Hamano [Tue, 21 Nov 2017 05:07:51 +0000 (14:07 +0900)]
Merge branch 'ad/submitting-patches-title-decoration'
Doc update around use of "format-patch --subject-prefix" etc.
* ad/submitting-patches-title-decoration:
doc/SubmittingPatches: correct subject guidance
Junio C Hamano [Tue, 21 Nov 2017 05:07:51 +0000 (14:07 +0900)]
Merge branch 'av/fsmonitor'
Various fixes to bp/fsmonitor topic.
* av/fsmonitor:
fsmonitor: simplify determining the git worktree under Windows
fsmonitor: store fsmonitor bitmap before splitting index
fsmonitor: read from getcwd(), not the PWD environment variable
fsmonitor: delay updating state until after split index is merged
fsmonitor: document GIT_TRACE_FSMONITOR
fsmonitor: don't bother pretty-printing JSON from watchman
fsmonitor: set the PWD to the top of the working tree
Junio C Hamano [Tue, 21 Nov 2017 05:07:50 +0000 (14:07 +0900)]
Merge branch 'bp/fsmonitor'
We learned to talk to watchman to speed up "git status" and other
operations that need to see which paths have been modified.
* bp/fsmonitor:
fsmonitor: preserve utf8 filenames in fsmonitor-watchman log
fsmonitor: read entirety of watchman output
fsmonitor: MINGW support for watchman integration
fsmonitor: add a performance test
fsmonitor: add a sample integration script for Watchman
fsmonitor: add test cases for fsmonitor extension
split-index: disable the fsmonitor extension when running the split index test
fsmonitor: add a test tool to dump the index extension
update-index: add fsmonitor support to update-index
ls-files: Add support in ls-files to display the fsmonitor valid bit
fsmonitor: add documentation for the fsmonitor extension.
fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.
update-index: add a new --force-write-index option
preload-index: add override to enable testing preload-index
bswap: add 64 bit endianness helper get_be64
Junio C Hamano [Tue, 21 Nov 2017 05:07:08 +0000 (14:07 +0900)]
Almost ready for 2.15.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 21 Nov 2017 05:05:33 +0000 (14:05 +0900)]
Merge branch 'rs/sequencer-rewrite-file-cleanup' into maint
Code cleanup.
* rs/sequencer-rewrite-file-cleanup:
sequencer.c: check return value of close() in rewrite_file()
sequencer: use O_TRUNC to truncate files
sequencer: factor out rewrite_file()
Junio C Hamano [Tue, 21 Nov 2017 05:05:33 +0000 (14:05 +0900)]
Merge branch 'cb/t4201-robustify' into maint
A test update.
* cb/t4201-robustify:
t4201: make use of abbreviation in the test more robust
Junio C Hamano [Tue, 21 Nov 2017 05:05:32 +0000 (14:05 +0900)]
Merge branch 'tz/fsf-address-update' into maint
Replace the mailing address of FSF to a URL, as FSF prefers.
* tz/fsf-address-update:
Replace Free Software Foundation address in license notices
Replace Free Software Foundation address in license notices
Junio C Hamano [Tue, 21 Nov 2017 05:05:32 +0000 (14:05 +0900)]
Merge branch 'ad/rebase-i-serie-typofix' into maint
Typofix.
* ad/rebase-i-serie-typofix:
rebase -i: fix comment typo
Junio C Hamano [Tue, 21 Nov 2017 05:05:31 +0000 (14:05 +0900)]
Merge branch 'jk/info-alternates-fix' into maint
We used to add an empty alternate object database to the system
that does not help anything; it has been corrected.
* jk/info-alternates-fix:
link_alt_odb_entries: make empty input a noop
Junio C Hamano [Tue, 21 Nov 2017 05:05:30 +0000 (14:05 +0900)]
Merge branch 'ab/pcre-v2' into maint
Building with NO_LIBPCRE1_JIT did not disable it, which has been fixed.
* ab/pcre-v2:
grep: fix NO_LIBPCRE1_JIT to fully disable JIT
Junio C Hamano [Tue, 21 Nov 2017 05:05:29 +0000 (14:05 +0900)]
Merge branch 'sr/wrapper-quote-filenames' into maint
Some error messages did not quote filenames shown in it, which have
been fixed.
* sr/wrapper-quote-filenames:
wrapper.c: consistently quote filenames in error messages
Junio C Hamano [Tue, 21 Nov 2017 05:05:29 +0000 (14:05 +0900)]
Merge branch 'bw/rebase-i-ignored-submodule-fix' into maint
"git rebase -i" recently started misbehaving when a submodule that
is configured with 'submodule.<name>.ignore' is dirty; this has
been corrected.
* bw/rebase-i-ignored-submodule-fix:
wt-status: actually ignore submodules when requested
Jeff King [Mon, 20 Nov 2017 19:18:46 +0000 (14:18 -0500)]
git-jump: give contact instructions in the README
Let's make it clear how patches should flow into
contrib/git-jump. The normal Git maintainer does not
necessarily care about things in contrib/, and authors of
individual components should be the ones giving the final
review/ack for a patch. Ditto for bug reports, which are
likely to get more attention from the area expert.
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Beat Bolli [Sun, 19 Nov 2017 23:05:36 +0000 (00:05 +0100)]
contrib/git-jump: allow to configure the grep command
Add the configuration option "jump.grepCmd" that allows to configure the
command that is used to search in grep mode. This allows the users of
git-jump to use ag(1) or ack(1) as search engines.
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shuyu Wei [Sun, 19 Nov 2017 11:01:32 +0000 (19:01 +0800)]
pull: pass -4/-6 option to 'git fetch'
The -4/-6 option should be passed through to 'git fetch' to be
consistent with the man page.
Signed-off-by: Wei Shuyu <wsy@dogben.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 18 Nov 2017 18:08:08 +0000 (19:08 +0100)]
grep: show non-empty lines before functions with -W
Non-empty lines before a function definition are most likely comments
for that function and thus relevant. Include them in function context.
Such a non-empty line might also belong to the preceding function if
there is no separating blank line. Stop extending the context upwards
also at the next function line to make sure only one extra function body
is shown at most.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 18 Nov 2017 18:07:13 +0000 (19:07 +0100)]
grep: update boundary variable for pre-context
Function context can be bigger than -A/-B/-C context. To find the
beginning of the combined context we search backwards. Currently we
check at each loop iteration what we're looking for and determine the
effective upper boundary based on that.
Simplify this a bit by setting the variable "from" to the lowest unshown
line number up front if we're looking for a function line and set it
back to the required -B/-C context line number when we find one. This
prepares the ground for the next patch; no functional change intended.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 18 Nov 2017 18:06:16 +0000 (19:06 +0100)]
t7810: improve check of -W with user-defined function lines
The check for function context (-W) together with user-defined function
line patterns reuses hello.c and pretends it's written in a language in
which function lines contain either "printf" or a trailing curly brace.
That's a bit obscure.
Make the test easier to read by adding a small PowerShell script, using
a simple, but meaningful expression, and separating out checks for
different aspects into dedicated tests instead of simply matching the
whole output byte for byte.
Also include a test for showing comments before function lines like git
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 18 Nov 2017 18:05:19 +0000 (19:05 +0100)]
xdiff: show non-empty lines before functions with -W
Non-empty lines before a function definition are most likely comments
for that function and thus relevant. Include them in function context.
Such a non-empty line might also belong to the preceeding function if
there is no separating blank line. Stop extending the context upwards
also at the next function line to make sure only one extra function body
is shown at most.
Original-patch-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 18 Nov 2017 18:04:40 +0000 (19:04 +0100)]
xdiff: factor out is_func_rec()
Add a helper for checking if a given record is a function line. It
frees callers from having to deal with the buffer arguments of
match_func_rec().
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 18 Nov 2017 18:04:00 +0000 (19:04 +0100)]
t4051: add test for comments preceding function lines
When showing function context it would be helpful to show comments
immediately before declarations, as they are most likely relevant.
Add a test for that, but without specifying the choice of lines too
rigidly in the test---we may want to stop before and not include
"/*" in the future, for example.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kaartic Sivaraam [Mon, 20 Nov 2017 15:26:52 +0000 (20:56 +0530)]
git-rebase: clean up dashed-usages in messages
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Ågren [Sun, 19 Nov 2017 15:03:50 +0000 (16:03 +0100)]
branch: change default of `pager.branch` to "on"
This is similar to
ff1e72483 (tag: change default of `pager.tag` to
"on", 2017-08-02) and is safe now that we do not consider `pager.branch`
at all when we are not listing branches. This change will help with
listing many branches, but will not hurt users of `git branch
--edit-description` as it would have before the previous commit.
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Ågren [Sun, 19 Nov 2017 15:03:49 +0000 (16:03 +0100)]
branch: respect `pager.branch` in list-mode only
Similar to
de121ffe5 (tag: respect `pager.tag` in list-mode only,
2017-08-02), use the DELAY_PAGER_CONFIG-mechanism to only respect
`pager.branch` when we are listing branches.
We have two possibilities of generalizing what that earlier commit made
to `git tag`. One is to interpret, e.g., --set-upstream-to as "it does
not use an editor, so we should page". Another, the one taken by this
commit, is to say "it does not list, so let's not page". That is in line
with the approach of the series on `pager.tag` and in particular the
wording in Documentation/git-tag.txt, which this commit reuses for
git-branch.txt.
This fixes the failing test added in the previous commit. Also adapt the
test for whether `git branch --set-upstream-to` respects `pager.branch`.
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Ågren [Sun, 19 Nov 2017 15:03:48 +0000 (16:03 +0100)]
t7006: add tests for how git branch paginates
The next couple of commits will change how `git branch` handles
`pager.branch`, similar to how
de121ffe5 (tag: respect `pager.tag` in
list-mode only, 2017-08-02) and
ff1e72483 (tag: change default of
`pager.tag` to "on", 2017-08-02) changed `git tag`.
Add tests in this area to make sure that we don't regress and so that
the upcoming commits can be made clearer by adapting the tests. Add some
tests for `--list` (implied), one for `--edit-description`, and one for
`--set-upstream-to` as a representative of "something other than the
first two".
In particular, use `test_expect_failure` to document that we currently
respect the pager-configuration with `--edit-description`. The current
behavior is buggy since the pager interferes with the editor and makes
the end result completely broken. See also
b3ee740c8 (t7006: add tests
for how git tag paginates, 2017-08-02).
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 18 Nov 2017 10:20:04 +0000 (11:20 +0100)]
config: flip return value of write_section()
d9bd4cbb9cc (config: flip return value of store_write_*()) made
write_section() follow the convention of write(2) to return -1 on error
and the number of written bytes on success.
3b48045c6c7 (Merge branch
'sd/branch-copy') changed it back to returning 0 on error and 1 on
success, but left its callers still checking for negative values.
Let write_section() follow the convention of write(2) again to meet the
expectations of its callers.
Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Haaris Mehmood [Sat, 18 Nov 2017 02:27:27 +0000 (02:27 +0000)]
config: add --expiry-date
Add --expiry-date as a data-type for config files when
'git config --get' is used. This will return any relative
or fixed dates from config files as timestamps.
This is useful for scripts (e.g. gc.reflogexpire) that work
with timestamps so that '2.weeks' can be converted to a format
acceptable by those scripts/functions.
Following the convention of git_config_pathname(), move
the helper function required for this feature from
builtin/reflog.c to builtin/config.c where other similar
functions exist (e.g. for --bool or --path), and match
the order of parameters with other functions (i.e. output
pointer as first parameter).
Signed-off-by: Haaris Mehmood <hsed@unimetic.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Wong [Sat, 18 Nov 2017 01:01:16 +0000 (01:01 +0000)]
rebase: use mboxrd format to avoid split errors
The mboxrd format allows the use of embedded "From " lines in
commit messages without being misinterpreted by mailsplit
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Thu, 16 Nov 2017 18:50:31 +0000 (19:50 +0100)]
apply: update line lengths for --inaccurate-eof
Some diff implementations don't report missing newlines at the end of
files. Applying such a patch can cause a newline character to be
added inadvertently. The option --inaccurate-eof of git apply can be
used to remove trailing newlines if needed.
apply_one_fragment() cuts it off from the buffers for preimage and
postimage. Before it does, it builds an array with the lengths of each
line for both. Make sure to update the length of the last line in
these line info structures as well to keep them consistent with their
respective buffer.
Without this fix the added test fails; git apply dies and reports:
fatal: BUG: caller miscounted postlen: asked 1, orig = 1, used = 2
That sanity check is only called if whitespace changes are ignored.
Reported-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Todd Zullinger [Thu, 16 Nov 2017 17:09:06 +0000 (12:09 -0500)]
completion: add '--copy' option to 'git branch'
In
52d59cc645 (branch: add a --copy (-c) option to go with --move (-m),
2017-06-18), `git branch` learned a `--copy` option. Include it when
providing command completions.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Torsten Bögershausen [Thu, 16 Nov 2017 16:38:28 +0000 (17:38 +0100)]
add: introduce "--renormalize"
Make it safer to normalize the line endings in a repository.
Files that had been commited with CRLF will be commited with LF.
The old way to normalize a repo was like this:
# Make sure that there are not untracked files
$ echo "* text=auto" >.gitattributes
$ git read-tree --empty
$ git add .
$ git commit -m "Introduce end-of-line normalization"
The user must make sure that there are no untracked files,
otherwise they would have been added and tracked from now on.
The new "add --renormalize" does not add untracked files:
$ echo "* text=auto" >.gitattributes
$ git add --renormalize .
$ git commit -m "Introduce end-of-line normalization"
Note that "git add --renormalize <pathspec>" is the short form for
"git add -u --renormalize <pathspec>".
While at it, document that the same renormalization may be needed,
whenever a clean filter is added or changed.
Helped-By: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Todd Zullinger [Thu, 16 Nov 2017 07:46:43 +0000 (02:46 -0500)]
branch doc: remove --set-upstream from synopsis
Support for the --set-upstream option was removed in
52668846ea
(builtin/branch: stop supporting the "--set-upstream" option,
2017-08-17), after a long deprecation period.
Remove the option from the command synopsis for consistency. Replace
another reference to it in the description of `--delete` with
`--set-upstream-to`.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Phillip Wood [Wed, 15 Nov 2017 10:41:25 +0000 (10:41 +0000)]
sequencer: reschedule pick if index can't be locked
If the index cannot be locked in do_recursive_merge(), issue an
error message and go on to the error recovery codepath, instead of
dying. When the commit cannot be picked, it needs to be rescheduled
when performing an interactive rebase, but just dying there won't
allow that to happen, and when the user runs 'git rebase --continue'
rather than 'git rebase --abort', the commit gets silently dropped.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Phillip Wood [Wed, 15 Nov 2017 12:40:43 +0000 (12:40 +0000)]
config: avoid "write_in_full(fd, buf, len) != len" pattern
As explained in commit
06f46f237 (avoid "write_in_full(fd, buf, len)
!= len" pattern, 2017–09–13) the return value of write_in_full() is
either -1 or the requested number of bytes. As such comparing the
return value to an unsigned value such as strbuf.len will fail to
catch errors. Change the code to use the preferred '< 0' check.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren [Tue, 14 Nov 2017 17:31:24 +0000 (09:31 -0800)]
merge-recursive: handle addition of submodule on our side of history
The code for a newly added path assumed that the path was a normal file,
and thus checked for there being a directory still being in the way of
the file. Note that since unpack_trees() does path-in-the-way checks
already, the only way for there to be a directory in the way at this
point in the code, is if there is some kind of D/F conflict in the merge.
For a submodule addition on HEAD's side of history, the submodule would
have already been present. This means that we do expect there to be a
directory present but should not consider it to be "in the way"; instead,
it's the expected submodule. So, when there's a submodule addition from
HEAD's side, don't bother checking the working copy for a directory in
the way.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 15 Nov 2017 03:17:43 +0000 (12:17 +0900)]
Sync with maint
Junio C Hamano [Wed, 15 Nov 2017 03:17:08 +0000 (12:17 +0900)]
RelNotes: the fourth batch for 2.16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 15 Nov 2017 03:14:37 +0000 (12:14 +0900)]
Merge branch 'bp/read-index-from-skip-verification'
Drop (perhaps overly cautious) sanity check before using the index
read from the filesystem at runtime.
* bp/read-index-from-skip-verification:
read_index_from(): speed index loading by skipping verification of the entry order
Junio C Hamano [Wed, 15 Nov 2017 03:14:36 +0000 (12:14 +0900)]
Merge branch 'bc/submitting-patches-in-asciidoc'
The SubmittingPatches document has been converted to produce an
HTML version via AsciiDoc/Asciidoctor.
* bc/submitting-patches-in-asciidoc:
Documentation: convert SubmittingPatches to AsciiDoc
Documentation: enable compat-mode for Asciidoctor
Junio C Hamano [Wed, 15 Nov 2017 03:14:36 +0000 (12:14 +0900)]
Merge branch 'sb/bisect-run-empty'
"git bisect run" that did not specify any command to run used to go
ahead and treated all commits to be tested as 'good'. This has
been corrected by making the command error out.
* sb/bisect-run-empty:
bisect run: die if no command is given
Junio C Hamano [Wed, 15 Nov 2017 03:14:36 +0000 (12:14 +0900)]
Merge branch 'rd/bisect-view-is-visualize'
Doc and message updates to teach users "bisect view" is a synonym
for "bisect visualize".
* rd/bisect-view-is-visualize:
bisect: mention "view" as an alternative to "visualize"
Junio C Hamano [Wed, 15 Nov 2017 03:14:36 +0000 (12:14 +0900)]
Merge branch 'jk/info-alternates-fix'
We used to add an empty alternate object database to the system
that does not help anything; it has been corrected.
* jk/info-alternates-fix:
link_alt_odb_entries: make empty input a noop
Junio C Hamano [Wed, 15 Nov 2017 03:14:35 +0000 (12:14 +0900)]
Merge branch 'cb/t4201-robustify'
A test update.
* cb/t4201-robustify:
t4201: make use of abbreviation in the test more robust