Junio C Hamano [Thu, 5 Dec 2019 20:52:49 +0000 (12:52 -0800)]
Merge branch 'js/pkt-line-h-typofix'
Typofix.
* js/pkt-line-h-typofix:
pkt-line: fix a typo
Junio C Hamano [Thu, 5 Dec 2019 20:52:48 +0000 (12:52 -0800)]
Merge branch 'us/unpack-trees-fsmonitor'
Users of oneway_merge() (like "reset --hard") learned to take
advantage of fsmonitor to avoid unnecessary lstat(2) calls.
* us/unpack-trees-fsmonitor:
unpack-trees: skip stat on fsmonitor-valid files
Junio C Hamano [Thu, 5 Dec 2019 20:52:48 +0000 (12:52 -0800)]
Merge branch 'sg/test-bool-env'
Recently we have declared that GIT_TEST_* variables take the
usual boolean values (it used to be that some used "non-empty
means true" and taking GIT_TEST_VAR=YesPlease as true); make
sure we notice and fail when non-bool strings are given to
these variables.
* sg/test-bool-env:
t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool
tests: add 'test_bool_env' to catch non-bool GIT_TEST_* values
Junio C Hamano [Thu, 5 Dec 2019 20:52:48 +0000 (12:52 -0800)]
Merge branch 'mh/clear-topo-walk-upon-reset'
The revision walking machinery uses resources like per-object flag
bits that need to be reset before a new iteration of walking
begins, but the resources related to topological walk were not
cleared correctly, which has been corrected.
* mh/clear-topo-walk-upon-reset:
revision: free topo_walk_info before creating a new one in init_topo_walk
revision: clear the topo-walk flags in reset_revision_walk
Junio C Hamano [Thu, 5 Dec 2019 20:52:47 +0000 (12:52 -0800)]
Merge branch 'hv/assume-priumax-is-available-anywhere'
We have had compatibility fallback macro definitions for "PRIuMAX",
"PRIu32", etc. but did not for "PRIdMAX", while the code used the
last one apparently without any hiccup reported recently. The
fallback macro definitions for these <inttypes.h> macros that must
appear in C99 systems have been removed.
* hv/assume-priumax-is-available-anywhere:
git-compat-util.h: drop the `PRIuMAX` and other fallback definitions
Junio C Hamano [Thu, 5 Dec 2019 20:52:47 +0000 (12:52 -0800)]
Merge branch 'mg/submodule-status-from-a-subdirectory'
"git submodule status" that is run from a subdirectory of the
superproject did not work well, which has been corrected.
* mg/submodule-status-from-a-subdirectory:
submodule: fix 'submodule status' when called from a subdirectory
Junio C Hamano [Thu, 5 Dec 2019 20:52:47 +0000 (12:52 -0800)]
Merge branch 'dl/t5520-cleanup'
Test cleanup.
* dl/t5520-cleanup:
t5520: replace `! git` with `test_must_fail git`
t5520: remove redundant lines in test cases
t5520: replace $(cat ...) comparison with test_cmp
t5520: don't put git in upstream of pipe
t5520: test single-line files by git with test_cmp
t5520: use test_cmp_rev where possible
t5520: replace test -{n,z} with test-lib functions
t5520: use test_line_count where possible
t5520: remove spaces after redirect operator
t5520: replace test -f with test-lib functions
t5520: let sed open its own input
t5520: use sq for test case names
t5520: improve test style
t: teach test_cmp_rev to accept ! for not-equals
t0000: test multiple local assignment
Junio C Hamano [Thu, 5 Dec 2019 20:52:47 +0000 (12:52 -0800)]
Merge branch 'nl/reset-patch-takes-a-tree'
"git reset --patch $object" without any pathspec should allow a
tree object to be given, but incorrectly required a committish,
which has been corrected.
* nl/reset-patch-takes-a-tree:
reset: parse rev as tree-ish in patch mode
Junio C Hamano [Thu, 5 Dec 2019 20:52:47 +0000 (12:52 -0800)]
Merge branch 'mg/doc-submodule-status-cached'
"git submodule status" and "git submodule status --cached" show
different things, but the documentation did not cover them
correctly, which has been corrected.
* mg/doc-submodule-status-cached:
doc: document 'git submodule status --cached'
Junio C Hamano [Thu, 5 Dec 2019 20:52:46 +0000 (12:52 -0800)]
Merge branch 'js/git-svn-use-rebase-merges'
Prepare further for "rebase --preserve-merges" deprecation.
* js/git-svn-use-rebase-merges:
git svn: stop using `rebase --preserve-merges`
Junio C Hamano [Thu, 5 Dec 2019 20:52:46 +0000 (12:52 -0800)]
Merge branch 'hi/gpg-optional-pkfp-fix'
The code to parse GPG output used to assume incorrectly that the
finterprint for the primary key would always be present for a valid
signature, which has been corrected.
* hi/gpg-optional-pkfp-fix:
gpg-interface: limit search for primary key fingerprint
gpg-interface: refactor the free-and-xmemdupz pattern
Junio C Hamano [Thu, 5 Dec 2019 20:52:46 +0000 (12:52 -0800)]
Merge branch 'pw/sequencer-compare-with-right-parent-to-check-empty-commits'
The sequencer machinery compared the HEAD and the state it is
attempting to commit to decide if the result would be a no-op
commit, even when amending a commit, which was incorrect, and
has been corrected.
* pw/sequencer-compare-with-right-parent-to-check-empty-commits:
sequencer: fix empty commit check when amending
Junio C Hamano [Thu, 5 Dec 2019 20:52:45 +0000 (12:52 -0800)]
Merge branch 'jk/fail-show-toplevel-outside-working-tree'
"git rev-parse --show-toplevel" run outside of any working tree did
not error out, which has been corrected.
* jk/fail-show-toplevel-outside-working-tree:
rev-parse: make --show-toplevel without a worktree an error
Junio C Hamano [Thu, 5 Dec 2019 20:52:45 +0000 (12:52 -0800)]
Merge branch 'sg/unpack-progress-throughput'
"git unpack-objects" used to show progress based only on the number
of received and unpacked objects, which stalled when it has to
handle an unusually large object. It now shows the throughput as
well.
* sg/unpack-progress-throughput:
builtin/unpack-objects.c: show throughput progress
Junio C Hamano [Thu, 5 Dec 2019 20:52:45 +0000 (12:52 -0800)]
Merge branch 'pb/submodule-update-fetches'
Doc update.
* pb/submodule-update-fetches:
doc: mention that 'git submodule update' fetches missing commits
Junio C Hamano [Thu, 5 Dec 2019 20:52:44 +0000 (12:52 -0800)]
Merge branch 'jc/azure-ci-osx-fix-fix'
CI jobs for macOS has been made less chatty when updating perforce
package used during testing.
* jc/azure-ci-osx-fix-fix:
ci(osx): update homebrew-cask repository with less noise
Junio C Hamano [Thu, 5 Dec 2019 20:52:44 +0000 (12:52 -0800)]
Merge branch 'dl/range-diff-with-notes'
"git range-diff" learned to take the "--notes=<ref>" and the
"--no-notes" options to control the commit notes included in the
log message that gets compared.
* dl/range-diff-with-notes:
format-patch: pass notes configuration to range-diff
range-diff: pass through --notes to `git log`
range-diff: output `## Notes ##` header
t3206: range-diff compares logs with commit notes
t3206: s/expected/expect/
t3206: disable parameter substitution in heredoc
t3206: remove spaces after redirect operators
pretty-options.txt: --notes accepts a ref instead of treeish
rev-list-options.txt: remove reference to --show-notes
argv-array: add space after `while`
Junio C Hamano [Thu, 5 Dec 2019 20:52:44 +0000 (12:52 -0800)]
Merge branch 'jh/userdiff-python-async'
The userdiff machinery has been taught that "async def" is another
way to begin a "function" in Python.
* jh/userdiff-python-async:
userdiff: support Python async functions
Junio C Hamano [Thu, 5 Dec 2019 20:52:43 +0000 (12:52 -0800)]
Merge branch 'ec/fetch-mark-common-refs-trace2'
Trace2 annotation.
* ec/fetch-mark-common-refs-trace2:
fetch: add trace2 instrumentation
Junio C Hamano [Thu, 5 Dec 2019 20:52:43 +0000 (12:52 -0800)]
Merge branch 'dd/rebase-merge-reserves-onto-label'
The logic to avoid duplicate label names generated by "git rebase
--rebase-merges" forgot that the machinery itself uses "onto" as a
label name, which must be avoided by auto-generated labels, which
has been corrected.
* dd/rebase-merge-reserves-onto-label:
sequencer: handle rebase-merges for "onto" message
Junio C Hamano [Thu, 5 Dec 2019 20:52:43 +0000 (12:52 -0800)]
Merge branch 'js/builtin-add-i'
The beginning of rewriting "git add -i" in C.
* js/builtin-add-i:
built-in add -i: implement the `help` command
built-in add -i: use color in the main loop
built-in add -i: support `?` (prompt help)
built-in add -i: show unique prefixes of the commands
built-in add -i: implement the main loop
built-in add -i: color the header in the `status` command
built-in add -i: implement the `status` command
diff: export diffstat interface
Start to implement a built-in version of `git add --interactive`
Junio C Hamano [Thu, 5 Dec 2019 20:52:43 +0000 (12:52 -0800)]
Merge branch 'js/rebase-r-safer-label'
A label used in the todo list that are generated by "git rebase
--rebase-merges" is used as a part of a refname; the logic to come
up with the label has been tightened to avoid names that cannot be
used as such.
* js/rebase-r-safer-label:
rebase -r: let `label` generate safer labels
rebase-merges: move labels' whitespace mangling into `label_oid()`
Junio C Hamano [Thu, 5 Dec 2019 20:52:43 +0000 (12:52 -0800)]
Merge branch 'ep/guard-kset-tar-headers'
Code clean-up.
* ep/guard-kset-tar-headers:
kset.h, tar.h: add missing header guard to prevent multiple inclusion
Johannes Schindelin [Mon, 2 Dec 2019 08:43:11 +0000 (08:43 +0000)]
pkt-line: fix a typo
This typo was introduced in
2153d478b74 (pkt-line: introduce
packet_read_with_status, 2018-03-14).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 1 Dec 2019 17:04:07 +0000 (09:04 -0800)]
The second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 1 Dec 2019 17:04:41 +0000 (09:04 -0800)]
Merge branch 'jk/gitweb-anti-xss'
Some codepaths in "gitweb" that forgot to escape URLs generated
based on end-user input have been corrected.
* jk/gitweb-anti-xss:
gitweb: escape URLs generated by href()
t/gitweb-lib.sh: set $REQUEST_URI
t/gitweb-lib.sh: drop confusing quotes
t9502: pass along all arguments in xss helper
Junio C Hamano [Sun, 1 Dec 2019 17:04:41 +0000 (09:04 -0800)]
Merge branch 'ar/install-doc-update-cmds-needing-the-shell'
Doc update.
* ar/install-doc-update-cmds-needing-the-shell:
INSTALL: use existing shell scripts as example
Junio C Hamano [Sun, 1 Dec 2019 17:04:41 +0000 (09:04 -0800)]
Merge branch 'ma/t7004'
Test fix.
* ma/t7004:
t7004: check existence of correct tag
Junio C Hamano [Sun, 1 Dec 2019 17:04:40 +0000 (09:04 -0800)]
Merge branch 'js/complete-svn-recursive'
The completion script (in contrib/) has been taught that "git svn"
supports the "--recursive" option.
* js/complete-svn-recursive:
completion: tab-complete "git svn --recursive"
Junio C Hamano [Sun, 1 Dec 2019 17:04:40 +0000 (09:04 -0800)]
Merge branch 'jk/send-pack-remote-failure'
Error handling after "git push" finishes sending the packdata and
waits for the response to the remote side has been improved.
* jk/send-pack-remote-failure:
send-pack: check remote ref status on pack-objects failure
Junio C Hamano [Sun, 1 Dec 2019 17:04:39 +0000 (09:04 -0800)]
Merge branch 'jc/fsmonitor-sanity-fix'
Remove an incorrect BUG() that should not trigger.
* jc/fsmonitor-sanity-fix:
fsmonitor: do not compare bitmap size with size of split index
Junio C Hamano [Sun, 1 Dec 2019 17:04:39 +0000 (09:04 -0800)]
Merge branch 'sg/skip-skipped-prereq'
Test update to avoid wasted cycles.
* sg/skip-skipped-prereq:
test-lib: don't check prereqs of test cases that won't be run anyway
Junio C Hamano [Sun, 1 Dec 2019 17:04:39 +0000 (09:04 -0800)]
Merge branch 'ds/test-read-graph'
Dev support for commit-graph feature.
* ds/test-read-graph:
test-tool: use 'read-graph' helper
Junio C Hamano [Sun, 1 Dec 2019 17:04:39 +0000 (09:04 -0800)]
Merge branch 'rs/use-copy-array-in-mingw-shell-command-preparation'
Code cleanup.
* rs/use-copy-array-in-mingw-shell-command-preparation:
mingw: use COPY_ARRAY for copying array
Junio C Hamano [Sun, 1 Dec 2019 17:04:38 +0000 (09:04 -0800)]
Merge branch 'rs/parse-options-dup-null-fix'
Code cleanup.
* rs/parse-options-dup-null-fix:
parse-options: avoid arithmetic on pointer that's potentially NULL
Junio C Hamano [Sun, 1 Dec 2019 17:04:38 +0000 (09:04 -0800)]
Merge branch 'jt/fetch-remove-lazy-fetch-plugging'
"git fetch" codepath had a big "do not lazily fetch missing objects
when I ask if something exists" switch. This has been corrected by
marking the "does this thing exist?" calls with "if not please do not
lazily fetch it" flag.
* jt/fetch-remove-lazy-fetch-plugging:
promisor-remote: remove fetch_if_missing=0
clone: remove fetch_if_missing=0
fetch: remove fetch_if_missing=0
Junio C Hamano [Sun, 1 Dec 2019 17:04:38 +0000 (09:04 -0800)]
Merge branch 'jk/optim-in-pack-idx-conversion'
Code clean-up.
* jk/optim-in-pack-idx-conversion:
pack-objects: avoid pointless oe_map_new_pack() calls
Junio C Hamano [Sun, 1 Dec 2019 17:04:37 +0000 (09:04 -0800)]
Merge branch 'dl/complete-rebase-onto'
The completion script (in contrib/) learned that the "--onto"
option of "git rebase" can take its argument as the value of the
option.
* dl/complete-rebase-onto:
completion: learn to complete `git rebase --onto=`
Junio C Hamano [Sun, 1 Dec 2019 17:04:37 +0000 (09:04 -0800)]
Merge branch 'tg/stash-refresh-index'
Recent update to "git stash pop" made the command empty the index
when run with the "--quiet" option, which has been corrected.
* tg/stash-refresh-index:
stash: make sure we have a valid index before writing it
Junio C Hamano [Sun, 1 Dec 2019 17:04:36 +0000 (09:04 -0800)]
Merge branch 'nn/doc-rebase-merges'
Doc update.
* nn/doc-rebase-merges:
doc: improve readability of --rebase-merges in git-rebase
Junio C Hamano [Sun, 1 Dec 2019 17:04:36 +0000 (09:04 -0800)]
Merge branch 'dd/sequencer-utf8'
Handling of commit objects that use non UTF-8 encoding during
"rebase -i" has been improved.
* dd/sequencer-utf8:
sequencer: reencode commit message for am/rebase --show-current-patch
sequencer: reencode old merge-commit message
sequencer: reencode squashing commit's message
sequencer: reencode revert/cherry-pick's todo list
sequencer: reencode to utf-8 before arrange rebase's todo list
t3900: demonstrate git-rebase problem with multi encoding
configure.ac: define ICONV_OMITS_BOM if necessary
t0028: eliminate non-standard usage of printf
Junio C Hamano [Sun, 1 Dec 2019 17:04:36 +0000 (09:04 -0800)]
Merge branch 'jk/remove-sha1-to-hex'
Code clean-up.
* jk/remove-sha1-to-hex:
hex: drop sha1_to_hex()
hex: drop sha1_to_hex_r()
Junio C Hamano [Sun, 1 Dec 2019 17:04:36 +0000 (09:04 -0800)]
Merge branch 'dj/typofix-merge-strat'
Typofix.
* dj/typofix-merge-strat:
merge-strategies: fix typo "reflected to" to "reflected in"
Junio C Hamano [Sun, 1 Dec 2019 17:04:36 +0000 (09:04 -0800)]
Merge branch 'rj/bundle-ui-updates'
"git bundle" has been taught to use the parse options API. "git
bundle verify" learned "--quiet" and "git bundle create" learned
options to control the progress output.
* rj/bundle-ui-updates:
bundle-verify: add --quiet
bundle-create: progress output control
bundle: framework for options before bundle file
Junio C Hamano [Sun, 1 Dec 2019 17:04:36 +0000 (09:04 -0800)]
Merge branch 'rs/skip-iprefix'
Code simplification.
* rs/skip-iprefix:
convert: use skip_iprefix() in validate_encoding()
utf8: use skip_iprefix() in same_utf_encoding()
Junio C Hamano [Sun, 1 Dec 2019 17:04:35 +0000 (09:04 -0800)]
Merge branch 'ln/userdiff-elixir'
The patterns to detect function boundary for Elixir language has
been added.
* ln/userdiff-elixir:
userdiff: add Elixir to supported userdiff languages
Junio C Hamano [Sun, 1 Dec 2019 17:04:35 +0000 (09:04 -0800)]
Merge branch 'py/shortlog-list-options-for-log'
Documentation pages for "git shortlog" now lists commit limiting
options explicitly.
* py/shortlog-list-options-for-log:
git-shortlog.txt: include commit limiting options
Junio C Hamano [Sun, 1 Dec 2019 17:04:35 +0000 (09:04 -0800)]
Merge branch 'en/doc-typofix'
Docfix.
* en/doc-typofix:
Fix spelling errors in no-longer-updated-from-upstream modules
multimail: fix a few simple spelling errors
sha1dc: fix trivial comment spelling error
Fix spelling errors in test commands
Fix spelling errors in messages shown to users
Fix spelling errors in names of tests
Fix spelling errors in comments of testcases
Fix spelling errors in code comments
Fix spelling errors in documentation outside of Documentation/
Documentation: fix a bunch of typos, both old and new
Junio C Hamano [Sun, 1 Dec 2019 17:04:34 +0000 (09:04 -0800)]
Merge branch 'ns/test-desc-typofix'
Typofix.
* ns/test-desc-typofix:
t: fix typo in test descriptions
Junio C Hamano [Sun, 1 Dec 2019 17:04:34 +0000 (09:04 -0800)]
Merge branch 'en/t6024-style'
Test updates.
* en/t6024-style:
t6024: modernize style
Junio C Hamano [Sun, 1 Dec 2019 17:04:34 +0000 (09:04 -0800)]
Merge branch 'en/misc-doc-fixes'
Misc doc fixes.
* en/misc-doc-fixes:
name-hash.c: remove duplicate word in comment
hashmap: fix documentation misuses of -> versus .
git-filter-branch.txt: correct argument name typo
Junio C Hamano [Sun, 1 Dec 2019 17:04:33 +0000 (09:04 -0800)]
Merge branch 'js/fetch-multi-lockfix'
Fetching from multiple remotes into the same repository in parallel
had a bad interaction with the recent change to (optionally) update
the commit-graph after a fetch job finishes, as these parallel
fetches compete with each other. Which has been corrected.
* js/fetch-multi-lockfix:
fetch: avoid locking issues between fetch.jobs/fetch.writeCommitGraph
fetch: add the command-line option `--write-commit-graph`
Junio C Hamano [Sun, 1 Dec 2019 17:04:33 +0000 (09:04 -0800)]
Merge branch 'rs/trace2-dots'
Code cleanup.
* rs/trace2-dots:
trace2: add dots directly to strbuf in perf_fmt_prepare()
Junio C Hamano [Sun, 1 Dec 2019 17:04:33 +0000 (09:04 -0800)]
Merge branch 'kw/fsmonitor-watchman-fix'
The watchman integration for fsmonitor was racy, which has been
corrected to be more conservative.
* kw/fsmonitor-watchman-fix:
fsmonitor: fix watchman integration
Junio C Hamano [Sun, 1 Dec 2019 17:04:33 +0000 (09:04 -0800)]
Merge branch 'cb/curl-use-xmalloc'
HTTP transport had possible allocator/deallocator mismatch, which
has been corrected.
* cb/curl-use-xmalloc:
remote-curl: unbreak http.extraHeader with custom allocators
Junio C Hamano [Sun, 1 Dec 2019 17:04:32 +0000 (09:04 -0800)]
Merge branch 'rt/fetch-message-fix'
A small message update.
* rt/fetch-message-fix:
fetch.c: fix typo in a warning message
Junio C Hamano [Sun, 1 Dec 2019 17:04:32 +0000 (09:04 -0800)]
Merge branch 'es/myfirstcontrib-updates'
Doc updates.
* es/myfirstcontrib-updates:
myfirstcontrib: hint to find gitgitgadget allower
myfirstcontrib: add dependency installation step
myfirstcontrib: add 'psuh' to command-list.txt
Junio C Hamano [Sun, 1 Dec 2019 17:04:32 +0000 (09:04 -0800)]
Merge branch 'hw/config-doc-in-header'
Follow recent push to move API docs from Documentation/ to header
files and update config.h
* hw/config-doc-in-header:
config: move documentation to config.h
Junio C Hamano [Sun, 1 Dec 2019 17:04:31 +0000 (09:04 -0800)]
Merge branch 'dl/doc-diff-no-index-implies-exit-code'
Doc update.
* dl/doc-diff-no-index-implies-exit-code:
git-diff.txt: document return code of `--no-index`
Junio C Hamano [Sun, 1 Dec 2019 17:04:31 +0000 (09:04 -0800)]
Merge branch 'js/vreportf-wo-buffering'
Messages from die() etc. can be mixed up from multiple processes
without even line buffering on Windows, which has been worked
around.
* js/vreportf-wo-buffering:
vreportf(): avoid relying on stdio buffering
Junio C Hamano [Sun, 1 Dec 2019 17:04:31 +0000 (09:04 -0800)]
Merge branch 'pb/no-recursive-reset-hard-in-worktree-add'
"git worktree add" internally calls "reset --hard" that should not
descend into submodules, even when submodule.recurse configuration
is set, but it was affected. This has been corrected.
* pb/no-recursive-reset-hard-in-worktree-add:
worktree: teach "add" to ignore submodule.recurse config
Junio C Hamano [Sun, 1 Dec 2019 17:04:30 +0000 (09:04 -0800)]
Merge branch 'pb/help-list-gitsubmodules-among-guides'
Help update.
* pb/help-list-gitsubmodules-among-guides:
help: add gitsubmodules to the list of guides
Junio C Hamano [Sun, 1 Dec 2019 17:04:30 +0000 (09:04 -0800)]
Merge branch 'sg/blame-indent-heuristics-is-now-the-default'
Message update.
* sg/blame-indent-heuristics-is-now-the-default:
builtin/blame.c: remove '--indent-heuristic' from usage string
Junio C Hamano [Sun, 1 Dec 2019 17:04:29 +0000 (09:04 -0800)]
Merge branch 'mr/clone-dir-exists-to-path-exists'
Code cleanup.
* mr/clone-dir-exists-to-path-exists:
clone: rename static function `dir_exists()`.
Junio C Hamano [Sun, 1 Dec 2019 17:04:29 +0000 (09:04 -0800)]
Merge branch 'ma/bisect-doc-sample-update'
"git merge --no-commit" needs "--no-ff" if you do not want to move
HEAD, which has been corrected in the manual page for "git bisect".
* ma/bisect-doc-sample-update:
Documentation/git-bisect.txt: add --no-ff to merge command
Junio C Hamano [Sun, 1 Dec 2019 17:04:29 +0000 (09:04 -0800)]
Merge branch 'js/git-path-head-dot-lock-fix'
"git rev-parse --git-path HEAD.lock" did not give the right path
when run in a secondary worktree.
* js/git-path-head-dot-lock-fix:
git_path(): handle `.lock` files correctly
t1400: wrap setup code in test case
Junio C Hamano [Sun, 1 Dec 2019 17:04:28 +0000 (09:04 -0800)]
Merge branch 'jc/log-graph-simplify'
The implementation of "git log --graph" got refactored and then its
output got simplified.
* jc/log-graph-simplify:
t4215: use helper function to check output
graph: fix coloring of octopus dashes
graph: flatten edges that fuse with their right neighbor
graph: smooth appearance of collapsing edges on commit lines
graph: rename `new_mapping` to `old_mapping`
graph: commit and post-merge lines for left-skewed merges
graph: tidy up display of left-skewed merges
graph: example of graph output that can be simplified
graph: extract logic for moving to GRAPH_PRE_COMMIT state
graph: remove `mapping_idx` and `graph_update_width()`
graph: reduce duplication in `graph_insert_into_new_columns()`
graph: reuse `find_new_column_by_commit()`
graph: handle line padding in `graph_next_line()`
graph: automatically track display width of graph lines
Junio C Hamano [Sun, 1 Dec 2019 17:04:28 +0000 (09:04 -0800)]
Merge branch 'jk/cleanup-object-parsing-and-fsck'
Crufty code and logic accumulated over time around the object
parsing and low-level object access used in "git fsck" have been
cleaned up.
* jk/cleanup-object-parsing-and-fsck: (23 commits)
fsck: accept an oid instead of a "struct tree" for fsck_tree()
fsck: accept an oid instead of a "struct commit" for fsck_commit()
fsck: accept an oid instead of a "struct tag" for fsck_tag()
fsck: rename vague "oid" local variables
fsck: don't require an object struct in verify_headers()
fsck: don't require an object struct for fsck_ident()
fsck: drop blob struct from fsck_finish()
fsck: accept an oid instead of a "struct blob" for fsck_blob()
fsck: don't require an object struct for report()
fsck: only require an oid for skiplist functions
fsck: only provide oid/type in fsck_error callback
fsck: don't require object structs for display functions
fsck: use oids rather than objects for object_name API
fsck_describe_object(): build on our get_object_name() primitive
fsck: unify object-name code
fsck: require an actual buffer for non-blobs
fsck: stop checking tag->tagged
fsck: stop checking commit->parent counts
fsck: stop checking commit->tree value
commit, tag: don't set parsed bit for parse failures
...
Manish Goregaokar [Mon, 25 Nov 2019 04:15:44 +0000 (04:15 +0000)]
submodule: fix 'submodule status' when called from a subdirectory
When calling `git submodule status` while in a subdirectory, we are
incorrectly not detecting modified submodules and
thus reporting that all of the submodules are unchanged.
This is because the submodule helper is calling `diff-index` with the
submodule path assuming the path is relative to the current prefix
directory, however the submodule path used is actually relative to the root.
Always pass NULL as the `prefix` when running diff-files on the
submodule, to make sure the submodule's path is interpreted as relative
to the superproject's repository root.
Signed-off-by: Manish Goregaokar <manishsmail@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike Hommey [Fri, 22 Nov 2019 08:37:04 +0000 (17:37 +0900)]
revision: free topo_walk_info before creating a new one in init_topo_walk
init_topo_walk doesn't reuse an existing topo_walk_info, and currently
leaks the one that might exist on the current rev_info if it was already
used for a topo walk beforehand.
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike Hommey [Fri, 22 Nov 2019 08:37:03 +0000 (17:37 +0900)]
revision: clear the topo-walk flags in reset_revision_walk
Not doing so can lead to wrong topo-walks when using the revision walk API
consecutively.
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Hariom Verma [Sun, 24 Nov 2019 13:09:23 +0000 (13:09 +0000)]
git-compat-util.h: drop the `PRIuMAX` and other fallback definitions
Git's code base already seems to be using `PRIdMAX` without any such
fallback definition for quite a while (
75459410edd (json_writer: new
routines to create JSON data, 2018-07-13), to be precise, and the
first Git version to include that commit was v2.19.0). Having a
fallback definition only for `PRIuMAX` is a bit inconsistent.
We do sometimes get portability reports more than a year after the
problem was introduced. This one should be fairly safe. PRIuMAX is
in C99 (for that matter, SCNuMAX, PRIu32 and others also are), and
we've been picking up other C99-isms without complaint.
The PRIuMAX fallback definition was originally added in
3efb1f343a
(Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c.,
2007-02-20). But it was replacing a construct that was introduced in
an even earlier commit,
579d1fbfaf (Add NO_C99_FORMAT to support
older compilers., 2006-07-30), which talks about gcc 2.95.
That's pretty ancient at this point.
Signed-off-by: Hariom Verma <hariom18599@gmail.com>
Helped-by: Jeff King <peff@peff.net>
[jc: tweaked both message and code, taking what peff wrote]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nika Layzell [Sun, 24 Nov 2019 20:25:49 +0000 (20:25 +0000)]
reset: parse rev as tree-ish in patch mode
Since
2f328c3d ("reset $sha1 $pathspec: require $sha1 only to be
treeish", 2013-01-14), we allowed "git reset $object -- $path" to reset
individual paths that match the pathspec to take the blob from a tree
object, not necessarily a commit, while the form to reset the tip of the
current branch to some other commit still must be given a commit.
Like resetting with paths, "git reset --patch" does not update HEAD, and
need not require a commit. The path-filtered form, "git reset --patch
$object -- $pathspec", has accepted a tree-ish since
2f328c3d.
"git reset --patch" is documented as accepting a <tree-ish> since
bf44142f ("reset: update documentation to require only tree-ish with
paths", 2013-01-16). Documentation changes are not required.
Loosen the restriction that requires a commit for the unfiltered "git
reset --patch $object".
Signed-off-by: Nika Layzell <nika@thelayzells.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Philippe Blain [Sun, 24 Nov 2019 02:01:35 +0000 (21:01 -0500)]
doc: mention that 'git submodule update' fetches missing commits
'git submodule update' will fetch new commits from the submodule remote
if the SHA-1 recorded in the superproject is not found. This was not
mentioned in the documentation.
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Manish Goregaokar [Sat, 23 Nov 2019 05:54:28 +0000 (05:54 +0000)]
doc: document 'git submodule status --cached'
'git submodule status --cached' reports the SHAs recorded in the
index of the superproject, instead of the SHAs that are checked out
in the submodule.
Signed-off-by: Manish Goregaokar <manishsmail@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor [Fri, 22 Nov 2019 13:14:37 +0000 (14:14 +0100)]
t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool
The GIT_TEST_CLONE_2GB environment variable is only ever checked with
'test -z' in 't5608-clone-2gb.sh', so any non-empty value is
interpreted as "yes, run these expensive tests", even
'GIT_TEST_CLONE_2GB=NoThanks'.
Similar GIT_TEST_* environment variables have already been turned into
bools in
3b072c577b (tests: replace test_tristate with "git
env--helper", 2019-06-21), so let's turn GIT_TEST_CLONE_2GB into a
bool as well, to follow suit.
Our CI builds set GIT_TEST_CLONE_2GB=YesPlease, so adjust them
accordingly, thus removing the last 'YesPlease' from our CI scripts.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor [Fri, 22 Nov 2019 13:14:36 +0000 (14:14 +0100)]
tests: add 'test_bool_env' to catch non-bool GIT_TEST_* values
Since
3b072c577b (tests: replace test_tristate with "git env--helper",
2019-06-21) we get the normalized bool values of various GIT_TEST_*
environment variables via 'git env--helper'. Now, while the 'git
env--helper' command itself does catch invalid values in the
environment variable or in the given --default and exits with error
(exit code 128 or 129, respectively), it's invoked in conditions like
'if ! git env--helper ...', which means that all invalid bool values
are interpreted the same as the ordinary 'false' (exit code 1). This
has led to inadvertently skipped httpd tests in our CI builds for a
couple of weeks, see
3960290675 (ci: restore running httpd tests,
2019-09-06).
Let's be more careful about what the test suite accepts as bool values
in GIT_TEST_* environment variables, and error out loud and clear on
invalid values instead of simply skipping tests. Add the
'test_bool_env' helper function to encapsulate the invocation of 'git
env--helper' and the verification of its exit code, and replace all
invocations of that command in our test framework and test suite with
a call to this new helper (except in 't0017-env-helper.sh', of
course).
$ GIT_TEST_GIT_DAEMON=YesPlease ./t5570-git-daemon.sh
fatal: bad numeric config value 'YesPlease' for 'GIT_TEST_GIT_DAEMON': invalid unit
error: test_bool_env requires bool values both for $GIT_TEST_GIT_DAEMON and for the default fallback
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Phillip Wood [Fri, 22 Nov 2019 19:43:03 +0000 (19:43 +0000)]
sequencer: fix empty commit check when amending
This fixes a regression introduced in
356ee4659b ("sequencer: try to
commit without forking 'git commit'", 2017-11-24). When amending a
commit try_to_commit() was using the wrong parent when checking if the
commit would be empty. When amending we need to check against HEAD^ not
HEAD.
t3403 may not seem like the natural home for the new tests but a further
patch series will improve the advice printed by `git commit`. That
series will mutate these tests to check that the advice includes
suggesting `rebase --skip` to skip the fixup that would empty the
commit.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Fri, 22 Nov 2019 22:59:29 +0000 (22:59 +0000)]
git svn: stop using `rebase --preserve-merges`
We deprecated `--preserve-merges` in favor of `--rebase-merges`; Let's
reflect that in `git svn`.
Note: Even when the user asks for `--preserve-merges`, we now silently
pass `--rebase-merges` to `git rebase` instead. Technically, this is a
change of behavior. But practically, `git svn` only ever asks for a
non-interactive rebase, and `--preserve-merges` and `--rebase-merges`
are on par with regard to that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Hans Jerry Illikainen [Fri, 22 Nov 2019 20:23:12 +0000 (20:23 +0000)]
gpg-interface: limit search for primary key fingerprint
The VALIDSIG status line from GnuPG with --status-fd is documented to
have 9 required and 1 optional fields [1]. The final, and optional,
field is used to specify the fingerprint of the primary key that made
the signature in case it was made by a subkey. However, this field is
only available for OpenPGP signatures; not for CMS/X.509.
If the VALIDSIG status line does not have the optional 10th field, the
current code will continue reading onto the next status line. And this
is the case for non-OpenPGP signatures [1].
The consequence is that a subsequent status line may be considered as
the "primary key" for signatures that does not have an actual primary
key.
Limit the search of these 9 or 10 fields to the single line to avoid
this problem. If the 10th field is missing, report that there is no
primary key fingerprint.
[Reference]
[1] GnuPG Details, General status codes
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS;h=
6ce340e8c04794add995e84308bb3091450bd28f;hb=HEAD#l483
The documentation says:
VALIDSIG <args>
The args are:
- <fingerprint_in_hex>
- <sig_creation_date>
- <sig-timestamp>
- <expire-timestamp>
- <sig-version>
- <reserved>
- <pubkey-algo>
- <hash-algo>
- <sig-class>
- [ <primary-key-fpr> ]
This status indicates that the signature is cryptographically
valid. [...] PRIMARY-KEY-FPR is the fingerprint of the primary key
or identical to the first argument.
The primary-key-fpr parameter is used for OpenPGP and not available
for CMS signatures. [...]
Signed-off-by: Hans Jerry Illikainen <hji@dyntopia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Hans Jerry Illikainen [Thu, 21 Nov 2019 23:43:35 +0000 (23:43 +0000)]
gpg-interface: refactor the free-and-xmemdupz pattern
Introduce a static replace_cstring() function to simplify repeated
pattern of free-and-xmemdupz() for GPG status line parsing.
This also helps us avoid potential memleaks if parsing of new status
lines are introduced in the future.
Signed-off-by: Hans Jerry Illikainen <hji@dyntopia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Utsav Shah [Wed, 20 Nov 2019 08:32:17 +0000 (08:32 +0000)]
unpack-trees: skip stat on fsmonitor-valid files
The index might be aware that a file hasn't modified via fsmonitor, but
unpack-trees did not pay attention to it and checked via ie_match_stat
which can be inefficient on certain filesystems. This significantly slows
down commands that run oneway_merge, like checkout and reset --hard.
This patch makes oneway_merge check whether a file is considered
unchanged through fsmonitor and skips ie_match_stat on it. unpack-trees
also now correctly copies over fsmonitor validity state from the source
index. Finally, for correctness, we force a refresh of fsmonitor state in
tweak_fsmonitor.
After this change, commands like stash (that use reset --hard
internally) go from 8s or more to ~2s on a 250k file repository on a
mac.
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Kevin Willford <Kevin.Willford@microsoft.com>
Signed-off-by: Utsav Shah <utsav@dropbox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:08:16 +0000 (15:08 -0800)]
t5520: replace `! git` with `test_must_fail git`
Currently, if a git command fails in an unexpected way, such as a
segfault, it will be masked and ignored. Replace the ! with
test_must_fail so that only expected failures pass.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:08:14 +0000 (15:08 -0800)]
t5520: remove redundant lines in test cases
In the previous patches, the mechanical application of changes left some
duplicate statements in the test case which were not strictly incorrect
but were redundant and possibly misleading. Remove these duplicate
statements so that it is clear that the intent behind the tests are that
the content of the file stays the same throughout the whole test case.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:08:12 +0000 (15:08 -0800)]
t5520: replace $(cat ...) comparison with test_cmp
We currently have many instances of `test <line> = $(cat <file>)` and
`test $(cat <file>) = <line>`. In the case where this fails, it will be
difficult for a developer to debug since the output will be masked.
Replace these instances with invocations of test_cmp().
This change was done with the following GNU sed expressions:
s/\(\s*\)test \([^=]*\)= "$(cat \([^)]*\))"/\1echo \2>expect \&\&\n\1test_cmp expect \3/
s/\(\s*\)test "$(cat \([^)]*\))" = \([^&]*\)\( &&\)\?$/\1echo \3 >expect \&\&\n\1test_cmp expect \2\4/
A future patch will clean up situations where we have multiple duplicate
statements within a test case. This is done to keep this patch purely
mechanical.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:08:10 +0000 (15:08 -0800)]
t5520: don't put git in upstream of pipe
Before, if the invocation of git failed, it would be masked by the pipe
since only the return code of the last element of a pipe is used.
Rewrite the test to put the git command on its own line so its return
code is not masked.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:08:07 +0000 (15:08 -0800)]
t5520: test single-line files by git with test_cmp
In case an invocation of a git command fails within the command
substitution, the failure will be masked. Replace the command
substitution with a file-redirection and a call to test_cmp.
This change was done with the following GNU sed expressions:
s/\(\s*\)test \([^ ]*\) = "$(\(git [^)]*\))"/\1echo \2 >expect \&\&\n\1\3 >actual \&\&\n\1test_cmp expect actual/
s/\(\s*\)test "$(\(git [^)]*\))" = \([^ ]*\)/\1echo \3 >expect \&\&\n\1\2 >actual \&\&\n\1test_cmp expect actual/
A future patch will clean up situations where we have multiple duplicate
statements within a test case. This is done to keep this patch purely
mechanical.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:08:05 +0000 (15:08 -0800)]
t5520: use test_cmp_rev where possible
In case an invocation of `git rev-list` fails within the command
substitution, the failure will be masked. Remove the command
substitution and use test_cmp_rev() so that failures can be discovered.
This change was done with the following sed expressions:
s/test "$(git rev-parse.* \([^)]*\))" = "$(git rev-parse \([^)]*\))"/test_cmp_rev \1 \2/
s/test \([^ ]*\) = "$(git rev-parse.* \([^)]*\))"/test_cmp_rev \1 \2/
s/test "$(git rev-parse.* \([^)]*\))" != "$(git rev-parse.* \([^)]*\))"/test_cmp_rev ! \1 \2/
s/test \([^ ]*\) != "$(git rev-parse.* \([^)]*\))"/test_cmp_rev ! \1 \2/
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:08:02 +0000 (15:08 -0800)]
t5520: replace test -{n,z} with test-lib functions
When wrapping a git command in a command substitution within another
command, we throw away the git command's exit code. In case the git
command fails, we would like to know about it rather than the failure
being silent. Extract git commands so that their exit codes are not
lost.
Instead of using `test -n` or `test -z`, replace them respectively with
invocations of test_file_not_empty() and test_must_be_empty() so that we
get better debugging information in the case of a failure.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:08:00 +0000 (15:08 -0800)]
t5520: use test_line_count where possible
Instead of rolling our own functionality to test the number of lines a
command outputs, use test_line_count() which provides better debugging
information in the case of a failure.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:07:58 +0000 (15:07 -0800)]
t5520: remove spaces after redirect operator
The style for tests in Git is to have the redirect operator attached to
the filename with no spaces. Fix test cases where this is not the case.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:07:55 +0000 (15:07 -0800)]
t5520: replace test -f with test-lib functions
Although `test -f` has the same functionality as test_path_is_file(), in
the case where test_path_is_file() fails, we get much better debugging
information.
Replace `test -f` with test_path_is_file() so that future developers
will have a better experience debugging these test cases.
Also, in the case of `! test -f`, not only should that path not be a
file, it shouldn't exist at all so replace it with
test_path_is_missing().
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:07:52 +0000 (15:07 -0800)]
t5520: let sed open its own input
We were using a redirection operator to feed input into sed. However,
since sed is capable of opening its own files, make sed open its own
files instead of redirecting input into it.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:07:50 +0000 (15:07 -0800)]
t5520: use sq for test case names
The usual convention is for test case names to be written between
single-quotes. Change all double-quoted test case names to single-quotes
except for two test case names that use variables within.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:07:48 +0000 (15:07 -0800)]
t5520: improve test style
Improve the test style by removing leading and trailing empty lines
within test cases. Also, reformat multi-line subshells to conform to the
existing style.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Tue, 12 Nov 2019 23:07:45 +0000 (15:07 -0800)]
t: teach test_cmp_rev to accept ! for not-equals
In the case where we are using test_cmp_rev() to report not-equals, we
write `! test_cmp_rev`. However, since test_cmp_rev() contains
r1=$(git rev-parse --verify "$1") &&
r2=$(git rev-parse --verify "$2") &&
`! test_cmp_rev` will succeed if any of the rev-parses fail. This
behavior is not desired. We want the rev-parses to _always_ be
successful.
Rewrite test_cmp_rev() to optionally accept "!" as the first argument to
do a not-equals comparison. Rewrite `! test_cmp_rev` to `test_cmp_rev !`
in all tests to take advantage of this new functionality.
Also, rewrite the rev-parse logic to end with a `|| return 1` instead of
&&-chaining into the rev-comparison logic. This makes it obvious to
future readers that we explicitly intend on returning early if either of
the rev-parses fail.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Thu, 14 Nov 2019 00:52:15 +0000 (16:52 -0800)]
t0000: test multiple local assignment
According to POSIX enhancement request '
0000767: Add built-in
"local"'[1],
dash only allows one variable in a local definition; it permits
assignment though it doesn't document that clearly.
however, this isn't true since t0000 still passes with this patch
applied on dash 0.5.10.2. Needless to say, since `local` isn't POSIX
standardized, it is not exactly clear what `local` entails on different
versions of different shells.
We currently already have many instances of multiple local assignments
in our codebase. Ensure that this is actually supported by explicitly
testing that it is sane.
[1]: http://austingroupbugs.net/bug_view_page.php?bug_id=767
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Wed, 20 Nov 2019 21:18:47 +0000 (13:18 -0800)]
format-patch: pass notes configuration to range-diff
Since format-patch accepts `--[no-]notes`, one would expect the
range-diff generated to also respect the setting. Unfortunately, the
range-diff we currently generate only uses the default option (which
always outputs default notes, even when notes are not being used
elsewhere).
Pass the notes configuration to range-diff so that it can honor it.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Wed, 20 Nov 2019 21:18:45 +0000 (13:18 -0800)]
range-diff: pass through --notes to `git log`
When a commit being range-diff'd has a note attached to it, the note
will be compared as well. However, if a user has multiple notes refs or
if they want to suppress notes from being printed, there is currently no
way to do this.
Pass through `--[no-]notes[=<ref>]` to the `git log` call so that this
option is customizable.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu [Wed, 20 Nov 2019 21:18:43 +0000 (13:18 -0800)]
range-diff: output `## Notes ##` header
When notes were included in the output of range-diff, they were just
mashed together with the rest of the commit message. As a result, users
wouldn't be able to clearly distinguish where the commit message ended
and where the notes started.
Output a `## Notes ##` header when notes are detected so that notes can
be compared more clearly.
Note that we handle case of `Notes (<ref>): -> ## Notes (<ref>) ##` with
this code as well. We can't test this in this patch, however, since
there is currently no way to pass along different notes refs to `git
log`. This will be fixed in a future patch.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>