Junio C Hamano [Fri, 23 Feb 2018 21:27:55 +0000 (13:27 -0800)]
Merge branch 'ld/p4-unshelve' into jch
"git p4" learned to "unshelve" shelved commit from P4.
* ld/p4-unshelve:
git-p4: add unshelve command
Junio C Hamano [Fri, 23 Feb 2018 21:27:55 +0000 (13:27 -0800)]
Merge branch 'rs/strbuf-read-file-or-whine' into jch
Code clean-up.
* rs/strbuf-read-file-or-whine:
sequencer: factor out strbuf_read_file_or_whine()
Junio C Hamano [Fri, 23 Feb 2018 21:27:54 +0000 (13:27 -0800)]
Merge branch 'ma/config-page-only-in-list-mode' into jch
In a way similar to how "git tag" learned to honor the pager
setting only in the list mode, "git config" learned to ignore the
pager setting when it is used for setting values (i.e. when the
purpose of the operation is not to "show").
* ma/config-page-only-in-list-mode:
config: change default of `pager.config` to "on"
config: respect `pager.config` in list/get-mode only
t7006: add tests for how git config paginates
Junio C Hamano [Fri, 23 Feb 2018 21:27:53 +0000 (13:27 -0800)]
Merge branch 'ot/ref-filter-cleanup' into jch
* ot/ref-filter-cleanup:
ref-filter: get rid of goto
ref-filter: get rid of duplicate code
Junio C Hamano [Fri, 23 Feb 2018 21:27:53 +0000 (13:27 -0800)]
Merge branch 'jc/allow-ff-merging-kept-tags' into jch
Since Git 1.7.9, "git merge" defaulted to --no-ff (i.e. even when
the side branch being merged is a descendant of the current commit,
create a merge commit instead of fast-forwarding) when merging a
tag object. This was appropriate default for integrators who pull
signed tags from their downstream contributors, but caused an
unnecessary merges when used by downstream contributors who
habitually "catch up" their topic branches with tagged releases
from the upstream. Update "git merge" to default to --no-ff only
when merging a tag object that does *not* sit at its usual place in
refs/tags/ hierarchy, and allow fast-forwarding otherwise, to
mitigate the problem.
* jc/allow-ff-merging-kept-tags:
merge: allow fast-forward when merging a tracked tag
Junio C Hamano [Fri, 23 Feb 2018 21:27:52 +0000 (13:27 -0800)]
Merge branch 'ab/simplify-perl-makefile' into jch
Hotfix for a topic already in 'master'.
* ab/simplify-perl-makefile:
Makefile: generate Git(3pm) as dependency of the 'doc' and 'man' targets
Junio C Hamano [Fri, 23 Feb 2018 21:27:52 +0000 (13:27 -0800)]
Merge branch 'ab/perl-fixes' into jch
Only the first few of a series of several small patches.
* ab/perl-fixes:
perl: move CPAN loader wrappers to another namespace
perl: *.pm files should not have the executable bit
Junio C Hamano [Fri, 23 Feb 2018 21:27:51 +0000 (13:27 -0800)]
Merge branch 'sg/t6300-modernize' into jch
Test update.
* sg/t6300-modernize:
t6300-for-each-ref: fix "more than one quoting style" tests
Junio C Hamano [Fri, 23 Feb 2018 21:27:51 +0000 (13:27 -0800)]
Merge branch 'sb/color-h-cleanup' into jch
Devdoc update.
* sb/color-h-cleanup:
color.h: document and modernize header
Junio C Hamano [Thu, 22 Feb 2018 21:04:47 +0000 (13:04 -0800)]
Merge branch 'ab/fetch-prune' into jch
Clarify how configured fetch refspecs interact with the "--prune"
option of "git fetch", and also add a handy short-hand for getting
rid of stale tags that are locally held.
* ab/fetch-prune:
fetch: make the --prune-tags work with <url>
fetch: add a --prune-tags option and fetch.pruneTags config
fetch tests: add scaffolding for the new fetch.pruneTags
git-fetch & config doc: link to the new PRUNING section
git remote doc: correct dangerous lies about what prune does
git fetch doc: add a new section to explain the ins & outs of pruning
fetch tests: fetch <url> <spec> as well as fetch [<remote>]
fetch tests: expand case/esac for later change
fetch tests: double quote a variable for interpolation
fetch tests: test --prune and refspec interaction
fetch tests: add a tag to be deleted to the pruning tests
fetch tests: re-arrange arguments for future readability
fetch tests: refactor in preparation for testing tag pruning
remote: add a macro for "refs/tags/*:refs/tags/*"
fetch: stop accessing "remote" variable indirectly
fetch: trivially refactor assignment to ref_nr
fetch: don't redundantly NULL something calloc() gave us
Junio C Hamano [Thu, 22 Feb 2018 21:04:46 +0000 (13:04 -0800)]
Merge branch 'sm/mv-dry-run-update' into jch
Code clean-up.
* sm/mv-dry-run-update:
mv: remove unneeded 'if (!show_only)'
t7001: add test case for --dry-run
Junio C Hamano [Thu, 22 Feb 2018 21:04:45 +0000 (13:04 -0800)]
Merge branch 'nd/parseopt-completion' into jch
Teach parse-options API an option to help the completion script,
and make use of the mechanism in command line completion.
* nd/parseopt-completion: (41 commits)
completion: use __gitcomp_builtin in _git_worktree
completion: use __gitcomp_builtin in _git_tag
completion: use __gitcomp_builtin in _git_status
completion: use __gitcomp_builtin in _git_show_branch
completion: use __gitcomp_builtin in _git_rm
completion: use __gitcomp_builtin in _git_revert
completion: use __gitcomp_builtin in _git_reset
completion: use __gitcomp_builtin in _git_replace
remote: force completing --mirror= instead of --mirror
completion: use __gitcomp_builtin in _git_remote
completion: use __gitcomp_builtin in _git_push
completion: use __gitcomp_builtin in _git_pull
completion: use __gitcomp_builtin in _git_notes
completion: use __gitcomp_builtin in _git_name_rev
completion: use __gitcomp_builtin in _git_mv
completion: use __gitcomp_builtin in _git_merge_base
completion: use __gitcomp_builtin in _git_merge
completion: use __gitcomp_builtin in _git_ls_remote
completion: use __gitcomp_builtin in _git_ls_files
completion: use __gitcomp_builtin in _git_init
...
Junio C Hamano [Thu, 22 Feb 2018 21:04:45 +0000 (13:04 -0800)]
Merge branch 'nm/tag-edit' into jch
"git tag" learned an explicit "--edit" option that allows the
message given via "-m" and "-F" to be further edited.
* nm/tag-edit:
tag: add --edit option
Junio C Hamano [Thu, 22 Feb 2018 21:04:44 +0000 (13:04 -0800)]
Merge branch 'bp/untracked-cache-noflush' into jch
Writing out the index file when the only thing that changed in it
is the untracked cache information is often wasteful, and this has
been optimized out.
* bp/untracked-cache-noflush:
dir.c: don't flag the index as dirty for changes to the untracked cache
Junio C Hamano [Thu, 22 Feb 2018 21:04:44 +0000 (13:04 -0800)]
Merge branch 'tg/worktree-add-existing-branch' into jch
"git worktree add" learned to check out an existing branch.
* tg/worktree-add-existing-branch:
worktree: teach "add" to check out existing branches
worktree: be clearer when "add" dwim-ery kicks in
worktree: improve message when creating a new worktree
Junio C Hamano [Thu, 22 Feb 2018 21:04:43 +0000 (13:04 -0800)]
Merge branch 'en/rename-directory-detection' into jch
Rename detection logic in "diff" family that is used in "merge" has
learned to guess when all of x/a, x/b and x/c have moved to z/a,
z/b and z/c, it is likely that x/d added in the meantime would also
want to move to z/d by taking the hint that the entire directory
'x' moved to 'z'. A bug causing dirty files involved in a rename
to be overwritten during merge has also been fixed as part of this
work.
* en/rename-directory-detection: (29 commits)
merge-recursive: ensure we write updates for directory-renamed file
merge-recursive: avoid spurious rename/rename conflict from dir renames
directory rename detection: new testcases showcasing a pair of bugs
merge-recursive: fix remaining directory rename + dirty overwrite cases
merge-recursive: fix overwriting dirty files involved in renames
merge-recursive: avoid clobbering untracked files with directory renames
merge-recursive: apply necessary modifications for directory renames
merge-recursive: when comparing files, don't include trees
merge-recursive: check for file level conflicts then get new name
merge-recursive: add computation of collisions due to dir rename & merging
merge-recursive: check for directory level conflicts
merge-recursive: add get_directory_renames()
merge-recursive: make a helper function for cleanup for handle_renames
merge-recursive: split out code for determining diff_filepairs
merge-recursive: make !o->detect_rename codepath more obvious
merge-recursive: fix leaks of allocated renames and diff_filepairs
merge-recursive: introduce new functions to handle rename logic
merge-recursive: move the get_renames() function
directory rename detection: tests for handling overwriting dirty files
directory rename detection: tests for handling overwriting untracked files
...
Junio C Hamano [Thu, 22 Feb 2018 21:04:43 +0000 (13:04 -0800)]
Merge branch 'nd/rebase-show-current-patch' into jch
The new "--show-current-patch" option gives an end-user facing way
to get the diff being applied when "git rebase" (and "git am")
stops with a conflict.
* nd/rebase-show-current-patch:
rebase: introduce and use pseudo-ref REBASE_HEAD
rebase: add --show-current-patch
am: add --show-current-patch
Junio C Hamano [Thu, 22 Feb 2018 21:04:42 +0000 (13:04 -0800)]
Merge branch 'pc/submodule-helper-foreach' into jch
* pc/submodule-helper-foreach:
submodule: port submodule subcommand 'foreach' from shell to C
submodule foreach: document variable '$displaypath'
submodule foreach: clarify the '$toplevel' variable documentation
submodule foreach: document '$sm_path' instead of '$path'
submodule foreach: correct '$path' in nested submodules from a subdirectory
Junio C Hamano [Thu, 22 Feb 2018 21:04:42 +0000 (13:04 -0800)]
Merge branch 'nd/diff-stat-with-summary' into jch
* nd/diff-stat-with-summary:
diff: add --stat-with-summary
diff.c: refactor pprint_rename() to use strbuf
Junio C Hamano [Thu, 22 Feb 2018 21:04:41 +0000 (13:04 -0800)]
Merge branch 'bw/c-plus-plus' into jch
Avoid using identifiers that clash with C++ keywords. Even though
it is not a goal to compile Git with C++ compilers, changes like
this help use of code analysis tools that targets C++ on our
codebase.
* bw/c-plus-plus: (37 commits)
replace: rename 'new' variables
trailer: rename 'template' variables
tempfile: rename 'template' variables
wrapper: rename 'template' variables
environment: rename 'namespace' variables
diff: rename 'template' variables
environment: rename 'template' variables
init-db: rename 'template' variables
unpack-trees: rename 'new' variables
trailer: rename 'new' variables
submodule: rename 'new' variables
split-index: rename 'new' variables
remote: rename 'new' variables
ref-filter: rename 'new' variables
read-cache: rename 'new' variables
line-log: rename 'new' variables
imap-send: rename 'new' variables
http: rename 'new' variables
entry: rename 'new' variables
diffcore-delta: rename 'new' variables
...
René Scharfe [Thu, 22 Feb 2018 19:29:25 +0000 (20:29 +0100)]
sequencer: factor out strbuf_read_file_or_whine()
Reduce code duplication by factoring out a function that reads an entire
file into a strbuf, or reports errors on stderr if something goes wrong.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Luke Diamand [Thu, 22 Feb 2018 09:50:22 +0000 (09:50 +0000)]
git-p4: add unshelve command
This can be used to "unshelve" a shelved P4 commit into
a git commit.
For example:
$ git p4 unshelve 12345
The resulting commit ends up in the branch:
refs/remotes/p4/unshelved/12345
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:59 +0000 (10:59 -0800)]
replace: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:58 +0000 (10:59 -0800)]
trailer: rename 'template' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:57 +0000 (10:59 -0800)]
tempfile: rename 'template' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:56 +0000 (10:59 -0800)]
wrapper: rename 'template' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:55 +0000 (10:59 -0800)]
environment: rename 'namespace' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:54 +0000 (10:59 -0800)]
diff: rename 'template' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:53 +0000 (10:59 -0800)]
environment: rename 'template' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:52 +0000 (10:59 -0800)]
init-db: rename 'template' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:51 +0000 (10:59 -0800)]
unpack-trees: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:50 +0000 (10:59 -0800)]
trailer: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:49 +0000 (10:59 -0800)]
submodule: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:48 +0000 (10:59 -0800)]
split-index: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:47 +0000 (10:59 -0800)]
remote: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:46 +0000 (10:59 -0800)]
ref-filter: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:45 +0000 (10:59 -0800)]
read-cache: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:44 +0000 (10:59 -0800)]
line-log: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:43 +0000 (10:59 -0800)]
imap-send: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:42 +0000 (10:59 -0800)]
http: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:41 +0000 (10:59 -0800)]
entry: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:40 +0000 (10:59 -0800)]
diffcore-delta: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:39 +0000 (10:59 -0800)]
diff: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:38 +0000 (10:59 -0800)]
diff-lib: rename 'new' variable
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:37 +0000 (10:59 -0800)]
commit: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:36 +0000 (10:59 -0800)]
combine-diff: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:35 +0000 (10:59 -0800)]
remote: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:34 +0000 (10:59 -0800)]
reflog: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:33 +0000 (10:59 -0800)]
pack-redundant: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:32 +0000 (10:59 -0800)]
help: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:31 +0000 (10:59 -0800)]
checkout: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:30 +0000 (10:59 -0800)]
apply: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:29 +0000 (10:59 -0800)]
apply: rename 'try' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams [Wed, 14 Feb 2018 18:59:28 +0000 (10:59 -0800)]
diff: rename 'this' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Ågren [Wed, 21 Feb 2018 18:51:44 +0000 (19:51 +0100)]
config: change default of `pager.config` 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.config`
at all when we are not listing or getting configuration. This change
will help with listing large configurations, but will not hurt users of
`git config --edit` 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 [Wed, 21 Feb 2018 18:51:43 +0000 (19:51 +0100)]
config: respect `pager.config` in list/get-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.config` when we are listing or "get"ing config.
We have several getters and some are guaranteed to give at most one line
of output. Paging all getters including those could be convenient from a
documentation point-of-view. The downside would be that a misconfigured
or not so modern pager might wait for user interaction before
terminating. Let's instead respect the config for precisely those
getters which may produce more than one line of output.
`--get-urlmatch` may or may not produce multiple lines of output,
depending on the exact usage. Let's not try to recognize the two modes,
but instead make `--get-urlmatch` always respect the config. Analyzing
the detailed usage might be trivial enough here, but could establish a
precedent that we will never be able to enforce throughout the codebase
and that will just open a can of worms.
This fixes the failing test added in the previous commit. Also adapt the
test for whether `git config foo.bar bar` and `git config --get foo.bar`
respects `pager.config`.
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Ågren [Wed, 21 Feb 2018 18:51:42 +0000 (19:51 +0100)]
t7006: add tests for how git config paginates
The next couple of commits will change how `git config` handles
`pager.config`, 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`. Similar work has
also been done to `git branch`.
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
tests for simple config-setting, `--edit`, `--get`, `--get-urlmatch`,
`get-all`, and `--list`. Those represent a fair portion of the various
options that will be affected by the next two commits.
Use `test_expect_failure` to document that we currently respect the
pager-configuration with `--edit`. 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).
The next commit will teach simple config-setting and `--get` to ignore
`pager.config`. Test the current behavior as "success", not "failure",
since the currently expected behavior according to documentation would
be to page. The next commit will change that expectation by updating the
documentation on `git config` and will redefine those successful tests.
Remove the test added in commit
3ba7e6e29a (config: run
setup_git_directory_gently() sooner, 2010-08-05) since it has some
overlap with these. We could leave it or tweak it, or place new tests
like these next to it, but let's instead make the tests for `git config`
as similar as possible to the ones for `git tag` and `git branch`, and
place them after those.
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 21 Feb 2018 21:18:52 +0000 (13:18 -0800)]
Merge branch 'bw/protocol-v2' into jch
The beginning of the next-gen transfer protocol.
* bw/protocol-v2: (35 commits)
remote-curl: don't request v2 when pushing
remote-curl: implement stateless-connect command
http: don't always add Git-Protocol header
http: allow providing extra headers for http requests
remote-curl: store the protocol version the server responded with
remote-curl: create copy of the service name
pkt-line: add packet_buf_write_len function
transport-helper: introduce stateless-connect
transport-helper: refactor process_connect_service
transport-helper: remove name parameter
connect: don't request v2 when pushing
connect: refactor git_connect to only get the protocol version once
fetch-pack: support shallow requests
upload-pack: support shallow requests
fetch-pack: perform a fetch using v2
upload-pack: introduce fetch server command
push: pass ref patterns when pushing
fetch: pass ref patterns when fetching
ls-remote: pass ref patterns when requesting a remote's refs
transport: convert transport_get_remote_refs to take a list of ref patterns
...
Junio C Hamano [Wed, 21 Feb 2018 21:18:51 +0000 (13:18 -0800)]
Merge branch 'nd/worktree-move' into jch
"git worktree" learned move and remove subcommands.
* nd/worktree-move:
worktree remove: allow it when $GIT_WORK_TREE is already gone
worktree remove: new command
worktree move: refuse to move worktrees with submodules
worktree move: accept destination as directory
worktree move: new command
worktree.c: add update_worktree_location()
worktree.c: add validate_worktree()
Junio C Hamano [Wed, 21 Feb 2018 21:18:51 +0000 (13:18 -0800)]
Merge branch 'xz/send-email-batch-size' into jch
"git send-email" learned to complain when the batch-size option is
not defined when the relogin-delay option is, since these two are
mutually required.
* xz/send-email-batch-size:
send-email: error out when relogin delay is missing
Junio C Hamano [Wed, 21 Feb 2018 21:18:50 +0000 (13:18 -0800)]
Merge branch 'cl/send-email-reply-to' into jch
"git send-email" learned "--reply-to=<address>" option.
* cl/send-email-reply-to:
send-email: support separate "Reply-To" address
send-email: rename variables for "In-reply-to" to $foo_in_reply_to
Junio C Hamano [Wed, 21 Feb 2018 21:18:50 +0000 (13:18 -0800)]
Merge branch 'sg/travis-build-during-script-phase' into jch
So... what do we want to do with this thing?
* sg/travis-build-during-script-phase:
travis-ci: build Git during the 'script' phase
Junio C Hamano [Wed, 21 Feb 2018 21:18:49 +0000 (13:18 -0800)]
Merge branch 'jh/status-no-ahead-behind' into jch
"git status" can spend a lot of cycles to compute the relation
between the current branch and its upstream, which can now be
disabled with "--no-ahead-behind" option.
At v5; is this ready for 'next'?
* jh/status-no-ahead-behind:
status: support --no-ahead-behind in long format
status: update short status to respect --no-ahead-behind
status: add --[no-]ahead-behind to status and commit for V2 format.
stat_tracking_info: return +1 when branches not equal
Junio C Hamano [Wed, 21 Feb 2018 21:18:48 +0000 (13:18 -0800)]
Merge branch 'bw/doc-submodule-recurse-config-with-clone' into jch
* bw/doc-submodule-recurse-config-with-clone:
submodule: indicate that 'submodule.recurse' doesn't apply to clone
Junio C Hamano [Wed, 21 Feb 2018 20:46:50 +0000 (12:46 -0800)]
### match next
Junio C Hamano [Wed, 21 Feb 2018 20:46:50 +0000 (12:46 -0800)]
Merge branch 'nd/am-quit' into jch
"git am" has learned "--quit" option, in addition to the existing
"--abort" option; having the pair mirrors a few other commands like
"rebase" and "cherry-pick".
* nd/am-quit:
am: support --quit
Junio C Hamano [Wed, 21 Feb 2018 20:46:49 +0000 (12:46 -0800)]
Merge branch 'es/worktree-add-post-checkout-hook' into jch
"git worktree add" learned to run the post-checkout hook, just like
"git clone" runs it upon the initial checkout.
* es/worktree-add-post-checkout-hook:
worktree: add: fix 'post-checkout' not knowing new worktree location
Junio C Hamano [Wed, 21 Feb 2018 20:46:49 +0000 (12:46 -0800)]
Merge branch 'sb/status-doc-fix' into jch
Docfix.
* sb/status-doc-fix:
Documentation/git-status: clarify status table for porcelain mode
Junio C Hamano [Wed, 21 Feb 2018 20:46:48 +0000 (12:46 -0800)]
Merge branch 'tk/apply-dev-null-verify-name-fix' into jch
Many places in "git apply" knew that "/dev/null" that signals
"there is no such file on this side of the diff" can be followed by
whitespace and garbage when parsing a patch, except for one, which
made an otherwise valid patch (e.g. ones from subversion) rejected.
* tk/apply-dev-null-verify-name-fix:
apply: handle Subversion diffs with /dev/null gracefully
apply: demonstrate a problem applying svn diffs
Junio C Hamano [Wed, 21 Feb 2018 20:46:47 +0000 (12:46 -0800)]
Merge branch 'gs/test-unset-xdg-cache-home' into jch
* gs/test-unset-xdg-cache-home:
test-lib.sh: unset XDG_CACHE_HOME
Junio C Hamano [Wed, 21 Feb 2018 20:46:45 +0000 (12:46 -0800)]
Merge branch 'tg/worktree-create-tracking' into jch
Hotfix for a recent topic.
* tg/worktree-create-tracking:
git-worktree.txt: fix indentation of example and text of 'add' command
git-worktree.txt: fix missing ")" typo
Junio C Hamano [Wed, 21 Feb 2018 20:46:45 +0000 (12:46 -0800)]
Merge branch 'tz/do-not-clean-spec-file' into jch
We no longer create any *.spec file, so "make clean" should not
remove it.
* tz/do-not-clean-spec-file:
Makefile: remove *.spec from clean target
Junio C Hamano [Wed, 21 Feb 2018 20:46:44 +0000 (12:46 -0800)]
Merge branch 'jk/push-options-via-transport-fix' into jch
"git push" over http transport did not unquote the push-options
correctly.
* jk/push-options-via-transport-fix:
remote-curl: unquote incoming push-options
t5545: factor out http repository setup
Junio C Hamano [Wed, 21 Feb 2018 20:46:43 +0000 (12:46 -0800)]
Merge branch 'bp/fsmonitor' into jch
Doc update for a recently added feature.
* bp/fsmonitor:
fsmonitor: update documentation to remove reference to invalid config settings
Junio C Hamano [Wed, 21 Feb 2018 20:46:42 +0000 (12:46 -0800)]
Merge branch 'jk/sq-dequote-on-bogus-input' into jch
Code to unquote single-quoted string (used in the parser for
configuration files, etc.) did not diagnose bogus input correctly
and produced bogus results instead.
* jk/sq-dequote-on-bogus-input:
sq_dequote: fix extra consumption of source string
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)]
Merge branch 'jk/test-hashmap-updates' into jch
Code clean-up.
* jk/test-hashmap-updates:
test-hashmap: use "unsigned int" for hash storage
test-hashmap: simplify alloc_test_entry
test-hashmap: use strbuf_getline rather than fgets
test-hashmap: use xsnprintf rather than snprintf
test-hashmap: check allocation computation for overflow
test-hashmap: use ALLOC_ARRAY rather than bare malloc
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)]
Merge branch 'rd/typofix' into jch
Typofix.
* rd/typofix:
Correct mispellings of ".gitmodule" to ".gitmodules"
t/: correct obvious typo "detahced"
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)]
Merge branch 'bc/doc-interpret-trailers-grammofix' into jch
Docfix.
* bc/doc-interpret-trailers-grammofix:
docs/interpret-trailers: fix agreement error
Junio C Hamano [Wed, 21 Feb 2018 20:46:40 +0000 (12:46 -0800)]
Merge branch 'as/ll-i18n' into jch
Some messages in low level start-up codepath have been i18n-ized.
* as/ll-i18n:
Mark messages for translations
Junio C Hamano [Wed, 21 Feb 2018 20:46:39 +0000 (12:46 -0800)]
Merge branch 'sg/doc-test-must-fail-args' into jch
Devdoc update.
* sg/doc-test-must-fail-args:
t: document 'test_must_fail ok=<signal-name>'
Junio C Hamano [Wed, 21 Feb 2018 20:46:38 +0000 (12:46 -0800)]
Merge branch 'sb/describe-blob' into jch
"git describe $garbage" stopped giving any errors when the garbage
happens to be a string with 40 hexadecimal letters.
* sb/describe-blob:
describe: confirm that blobs actually exist
Junio C Hamano [Wed, 21 Feb 2018 20:46:37 +0000 (12:46 -0800)]
Merge branch 'rs/check-ignore-multi' into jch
"git check-ignore" with multiple paths got confused when one is a
file and the other is a directory, which has been fixed.
* rs/check-ignore-multi:
check-ignore: fix mix of directories and other file types
Junio C Hamano [Wed, 21 Feb 2018 20:46:37 +0000 (12:46 -0800)]
Merge branch 'rj/sparse-updates' into jch
Devtool update.
* rj/sparse-updates:
Makefile: suppress a sparse warning for pack-revindex.c
config.mak.uname: remove SPARSE_FLAGS setting for cygwin
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)]
Merge branch 'jk/t0002-simplify' into jch
Code cleanup.
* jk/t0002-simplify:
t0002: simplify error checking
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)]
Merge branch 'ab/untracked-cache-invalidation-docs' into jch
Doc update to warn against remaining bugs in untracked cache.
* ab/untracked-cache-invalidation-docs:
update-index doc: note the caveat with "could not open..."
update-index doc: note a fixed bug in the untracked cache
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)]
Merge branch 'js/packet-read-line-check-null' into jch
Some low level protocol codepath could crash when they get an
unexpected flush packet, which is now fixed.
* js/packet-read-line-check-null:
always check for NULL return from packet_read_line()
correct error messages for NULL packet_read_line()
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)]
Merge branch 'js/fix-merge-arg-quoting-in-rebase-p' into jch
"git rebase -p" mangled log messages of a merge commit, which is
now fixed.
* js/fix-merge-arg-quoting-in-rebase-p:
rebase -p: fix incorrect commit message when calling `git merge`.
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)]
Merge branch 'jk/gettext-poison' into jch
Test updates.
* jk/gettext-poison:
git-sh-i18n: check GETTEXT_POISON before USE_GETTEXT_SCHEME
t0205: drop redundant test
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)]
Merge branch 'jk/doc-do-not-write-extern' into jch
Devdoc update.
* jk/doc-do-not-write-extern:
CodingGuidelines: mention "static" and "extern"
Junio C Hamano [Wed, 21 Feb 2018 20:46:34 +0000 (12:46 -0800)]
Merge branch 'bp/name-hash-dirname-fix' into jch
"git add" files in the same directory, but spelling the directory
path in different cases on case insensitive filesystem, corrupted
the name hash data structure and led to unexpected results. This
has been corrected.
* bp/name-hash-dirname-fix:
name-hash: properly fold directory names in adjust_dirname_case()
Junio C Hamano [Wed, 21 Feb 2018 20:46:33 +0000 (12:46 -0800)]
Merge branch 'jc/blame-missing-path' into jch
"git blame HEAD COPYING" in a bare repository failed to run, while
"git blame HEAD -- COPYING" run just fine. This has been corrected.
* jc/blame-missing-path:
blame: tighten command line parser
Junio C Hamano [Wed, 21 Feb 2018 20:46:33 +0000 (12:46 -0800)]
Merge branch 'nd/fix-untracked-cache-invalidation' into jch
Some bugs around "untracked cache" feature have been fixed.
Seems to uncover bad untracked cache information a bit too loudly,
for which there is ab/untracked-cache-invalidation-docs topic.
cf. <87d11omi2o.fsf@evledraar.gmail.com>
* nd/fix-untracked-cache-invalidation:
dir.c: ignore paths containing .git when invalidating untracked cache
dir.c: stop ignoring opendir() error in open_cached_dir()
dir.c: fix missing dir invalidation in untracked code
dir.c: avoid stat() in valid_cached_dir()
status: add a failing test showing a core.untrackedCache bug
Junio C Hamano [Wed, 21 Feb 2018 20:46:32 +0000 (12:46 -0800)]
Merge branch 'jt/binsearch-with-fanout' into jch
Refactor the code to binary search starting from a fan-out table
(which is how the packfile is indexed with object names) into a
reusable helper.
* jt/binsearch-with-fanout:
packfile: refactor hash search with fanout table
packfile: remove GIT_DEBUG_LOOKUP log statements
Junio C Hamano [Wed, 21 Feb 2018 20:45:35 +0000 (12:45 -0800)]
Fourth batch for 2.17
Junio C Hamano [Wed, 21 Feb 2018 20:45:05 +0000 (12:45 -0800)]
Merge branch 'sg/test-i18ngrep'
Test fixes.
* sg/test-i18ngrep:
t: make 'test_i18ngrep' more informative on failure
t: validate 'test_i18ngrep's parameters
t: move 'test_i18ncmp' and 'test_i18ngrep' to 'test-lib-functions.sh'
t5536: let 'test_i18ngrep' read the file without redirection
t5510: consolidate 'grep' and 'test_i18ngrep' patterns
t4001: don't run 'git status' upstream of a pipe
t6022: don't run 'git merge' upstream of a pipe
t5812: add 'test_i18ngrep's missing filename parameter
t5541: add 'test_i18ngrep's missing filename parameter
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)]
Merge branch 'gs/rebase-allow-empty-message'
"git rebase" learned to take "--allow-empty-message" option.
* gs/rebase-allow-empty-message:
rebase: add --allow-empty-message option
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)]
Merge branch 'lw/daemon-log-destination'
The log from "git daemon" can be redirected with a new option; one
relevant use case is to send the log to standard error (instead of
syslog) when running it from inetd.
* lw/daemon-log-destination:
daemon: add --log-destination=(stderr|syslog|none)
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)]
Merge branch 'nd/format-patch-stat-width'
"git format-patch" learned to give 72-cols to diffstat, which is
consistent with other line length limits the subcommand uses for
its output meant for e-mails.
* nd/format-patch-stat-width:
format-patch: reduce patch diffstat width to 72
format-patch: keep cover-letter diffstat wrapped in 72 columns
Brandon Williams [Tue, 20 Feb 2018 20:29:22 +0000 (12:29 -0800)]
submodule: indicate that 'submodule.recurse' doesn't apply to clone
Update the documentation for the 'submodule.recurse' config to identify
that the clone command does not respect it.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Olga Telezhnaya [Wed, 21 Feb 2018 06:59:01 +0000 (06:59 +0000)]
ref-filter: get rid of goto
Get rid of goto command in ref-filter for better readability.
Signed-off-by: Olga Telezhnaia <olyatelezhnaya@gmail.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>