Sergey Organov [Mon, 21 Dec 2020 15:20:00 +0000 (18:20 +0300)]
t4013: add tests for --diff-merges=first-parent
This new option provides essential new functionality, changing diff
output to first parent only, without changing history traversal mode,
so it deserves its own test.
As we do it, add additional test that --diff-merges=first-parent by
itself doesn't imply -p and only outputs diffs for merge commits.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:59 +0000 (18:19 +0300)]
doc/git-show: include --diff-merges description
Move description of --diff-merges option from git-log.txt to
diff-options.txt so that it is included in the git-show help.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:58 +0000 (18:19 +0300)]
doc/rev-list-options: document --first-parent changes merges format
After introduction of the --diff-merges=first-parent, the
--first-parent sets the default format for merges to the same value as
this new option. Document this behavior and add corresponding
reference to --diff-merges.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:57 +0000 (18:19 +0300)]
doc/diff-generate-patch: mention new --diff-merges option
Mention --diff-merges instead of -m in a note to merge formats to aid
discoverability, as -m is now described among --diff-merges options
anyway.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:56 +0000 (18:19 +0300)]
doc/git-log: describe new --diff-merges options
Describe all the new --diff-merges options in the git-log.txt and
adopt description of originals accordingly.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:55 +0000 (18:19 +0300)]
diff-merges: add '--diff-merges=1' as synonym for 'first-parent'
As we now have --diff-merges={m|c|cc}, add --diff-merges=1 as synonym
for --diff-merges=first-parent, to have shorter mnemonics for it as
well.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:54 +0000 (18:19 +0300)]
diff-merges: add old mnemonic counterparts to --diff-merges
This adds --diff-merges={m|c|cc} values that match mnemonics of old
options, for those who are used to them.
Note that, say, --diff-meres=cc behaves differently than --cc, as the
latter implies -p and therefore enables diffs for all the commits,
while the former enables output of diffs for merge commits only.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:53 +0000 (18:19 +0300)]
diff-merges: let new options enable diff without -p
New options don't have any visible effect unless -p is either given or
implied, as unlike -c/-cc we don't imply -p with --diff-merges. To fix
this, this patch adds new functionality by letting new options enable
output of diffs for merge commits only.
Add 'merges_need_diff' field and set it whenever diff output for merges is
enabled by any of the new options.
Extend diff output logic accordingly, to output diffs for merges when
'merges_need_diff' is set even when no -p has been provided.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:52 +0000 (18:19 +0300)]
diff-merges: do not imply -p for new options
Add 'combined_imply_patch' field and set it only for old --cc/-c
options, then imply -p if this flag is set instead of implying -p
whenever 'combined_merge' flag is set.
We don't want new --diff-merge options to imply -p, to make it
possible to enable output of diffs for merges independently from
non-merge commits. At the same time we want to preserve behavior of
old --c/-c/-m options and their interactions with --first-parent, to
stay backward-compatible.
This patch is first step in this direction: it separates old "--cc/-c
imply -p" logic from the rest of the options.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:51 +0000 (18:19 +0300)]
diff-merges: implement new values for --diff-merges
We first implement new options as exact synonyms for their original
counterparts, to get all the infrastructure right, and keep functional
improvements for later commits.
The following values are implemented:
--diff-merges= old equivalent
first|first-parent = --first-parent (only format implications)
sep|separate = -m
comb|combined = -c
dense| dense-combined = --cc
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:50 +0000 (18:19 +0300)]
diff-merges: make -m/-c/--cc explicitly mutually exclusive
-c/--cc got precedence over -m only because of external logic where
corresponding flags are checked before that for -m. This is too
error-prone, so add code that explicitly makes these 3 options
mutually exclusive, so that the last option specified on the
command-line gets precedence.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:49 +0000 (18:19 +0300)]
diff-merges: refactor opt settings into separate functions
To prepare introduction of new options some of which will be synonyms
to existing options, let every option handling code just call
corresponding function.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:48 +0000 (18:19 +0300)]
diff-merges: get rid of now empty diff_merges_init_revs()
After getting rid of 'ignore_merges' field, the diff_merges_init_revs()
function became empty. Get rid of it.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:47 +0000 (18:19 +0300)]
diff-merges: group diff-merge flags next to each other inside 'rev_info'
The relevant flags were somewhat scattered over definition of 'struct
rev_info'. Rearrange them to group them together.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:46 +0000 (18:19 +0300)]
diff-merges: split 'ignore_merges' field
'ignore_merges' was 3-way field that served two distinct purposes that
we now assign to 2 new independent flags: 'separate_merges', and
'explicit_diff_merges'.
'separate_merges' tells that we need to output diff format containing
separate diff for every parent (as opposed to 'combine_merges').
'explicit_diff_merges' tells that at least one of diff-merges options
has been explicitly specified on the command line, so no defaults
should apply.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:45 +0000 (18:19 +0300)]
diff-merges: fix -m to properly override -c/--cc
Logically, -m, -c, --cc specify 3 different formats for representing
merge commits, yet -m doesn't in fact override -c or --cc, that makes
no sense.
Fix -m to properly override -c/--cc, and change the tests accordingly.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:44 +0000 (18:19 +0300)]
t4013: add tests for -m failing to override -c/--cc
Logically, -m, -c, --cc specify 3 different formats for representing
merge commits, yet -m doesn't in fact override -c or --cc, that makes
no sense.
Add 2 expected to fail tests that demonstrate the problem.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:43 +0000 (18:19 +0300)]
t4013: support test_expect_failure through ':failure' magic
Add support to be able to specify expected failure, through :failure
magic, like this:
:failure cmd args
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:42 +0000 (18:19 +0300)]
diff-merges: revise revs->diff flag handling
Do not set revs->diff when we encounter an option that needs it, as
it'd be impossible to undo later. Besides, some other options than
what we handle here set this flag as well, and we'd interfere with
them trying to clear this flag later.
Rather set revs->diff, if finally needed, in diff_merges_setup_revs().
As an additional bonus, this also makes our code shorter.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:41 +0000 (18:19 +0300)]
diff-merges: handle imply -p on -c/--cc logic for log.c
Move logic that handles implying -p on -c/--cc from
log_setup_revisions_tweak() to diff_merges_setup_revs(), where it
belongs.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:40 +0000 (18:19 +0300)]
diff-merges: introduce revs->first_parent_merges flag
This new field allows us to separate format of diff for merges from
'first_parent_only' flag which primary purpose is limiting history
traversal.
This change further localizes diff format selection logic into the
diff-merges.c file.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:39 +0000 (18:19 +0300)]
diff-merges: new function diff_merges_set_dense_combined_if_unset()
Call it where given functionality is needed instead of direct
checking/tweaking of diff merges related fields.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:38 +0000 (18:19 +0300)]
diff-merges: new function diff_merges_suppress()
This function sets all the relevant flags to disabled state, so that
no code that checks only one of them get it wrong.
Then we call this new function everywhere where diff merges output
suppression is needed.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:37 +0000 (18:19 +0300)]
diff-merges: re-arrange functions to match the order they are called in
For clarity, define public functions in the order they are called, to
make logic inter-dependencies easier to grok.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:36 +0000 (18:19 +0300)]
diff-merges: rename diff_merges_default_to_enable() to match semantics
Rename diff_merges_default_to_enable() to
diff_merges_default_to_first_parent() to match its semantics.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:35 +0000 (18:19 +0300)]
diff-merges: move checks for first_parent_only out of the module
The checks for first_parent_only don't in fact belong to this module,
as the primary purpose of this flag is history traversal limiting, so
get it out of this module and rename the
diff_merges_first_parent_defaults_to_enable()
to
diff_merges_default_to_enable()
to match new semantics.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:34 +0000 (18:19 +0300)]
diff-merges: rename all functions to have common prefix
Use the same "diff_merges" prefix for all the diff merges function
names.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:33 +0000 (18:19 +0300)]
revision: move diff merges functions to its own diff-merges.c
Create separate diff-merges.c and diff-merges.h files, and move all
the code related to handling of diff merges there.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:32 +0000 (18:19 +0300)]
revision: provide implementation for diff merges tweaks
Use these implementations from show_setup_revisions_tweak() and
log_setup_revisions_tweak() in builtin/log.c.
This completes moving of management of diff merges parameters to a
single place, where we can finally observe them simultaneously.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:31 +0000 (18:19 +0300)]
revision: factor out initialization of diff-merge related settings
Move initialization code related to diffing merges into new
init_diff_merge_revs() function.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:30 +0000 (18:19 +0300)]
revision: factor out setup of diff-merge related settings
Move all the setting code related to diffing merges into new
setup_diff_merge_revs() function.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Sergey Organov [Mon, 21 Dec 2020 15:19:29 +0000 (18:19 +0300)]
revision: factor out parsing of diff-merge related options
Move all the parsing code related to diffing merges into new
parse_diff_merge_opts() function.
Signed-off-by: Sergey Organov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 30 Oct 2020 20:04:01 +0000 (13:04 -0700)]
Second batch
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 30 Oct 2020 20:04:24 +0000 (13:04 -0700)]
Merge branch 'js/ci-ghwf-dedup-tests'
GitHub Actions automated test improvement to skip tests on a tree
identical to what has already been tested.
* js/ci-ghwf-dedup-tests:
ci: make the "skip-if-redundant" check more defensive
ci: work around old records of GitHub runs
Junio C Hamano [Fri, 30 Oct 2020 20:04:24 +0000 (13:04 -0700)]
Merge branch 'dl/resurrect-update-for-sha256'
"git resurrect" script (in contrib/) learned that the object names
may be longer than 40-hex depending on the hash function in use.
* dl/resurrect-update-for-sha256:
contrib/git-resurrect.sh: use hash-agnostic OID pattern
contrib/git-resurrect.sh: indent with tabs
Junio C Hamano [Fri, 30 Oct 2020 20:04:24 +0000 (13:04 -0700)]
Merge branch 'cm/t7xxx-cleanup'
Micro clean-up.
* cm/t7xxx-cleanup:
t7102: prepare expected output inside test_expect_* block
t7201: put each command on a separate line
t7201: use 'git -C' to avoid subshell
t7102,t7201: remove whitespace after redirect operator
t7102,t7201: remove unnecessary blank spaces in test body
t7101,t7102,t7201: modernize test formatting
Junio C Hamano [Fri, 30 Oct 2020 20:04:24 +0000 (13:04 -0700)]
Merge branch 'ct/t0000-use-test-path-is-file'
Micro clean-up of a test script.
* ct/t0000-use-test-path-is-file:
t0000: use test_path_is_file instead of "test -f"
Junio C Hamano [Fri, 30 Oct 2020 20:04:23 +0000 (13:04 -0700)]
Merge branch 'en/t7518-unflake'
Work around flakiness in a test.
* en/t7518-unflake:
t7518: fix flaky grep invocation
Junio C Hamano [Thu, 29 Oct 2020 21:25:15 +0000 (14:25 -0700)]
Sync with Git 2.29.2
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 29 Oct 2020 21:24:09 +0000 (14:24 -0700)]
Git 2.29.2
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 29 Oct 2020 21:18:48 +0000 (14:18 -0700)]
Merge branch 'cc/doc-filter-branch-typofix' into maint
Docfix.
* cc/doc-filter-branch-typofix:
filter-branch doc: fix filter-repo typo
Junio C Hamano [Thu, 29 Oct 2020 21:18:47 +0000 (14:18 -0700)]
Merge branch 'jk/committer-date-is-author-date-fix' into maint
In 2.29, "--committer-date-is-author-date" option of "rebase" and
"am" subcommands lost the e-mail address by mistake, which has been
corrected.
* jk/committer-date-is-author-date-fix:
rebase: fix broken email with --committer-date-is-author-date
am: fix broken email with --committer-date-is-author-date
t3436: check --committer-date-is-author-date result more carefully
Junio C Hamano [Tue, 27 Oct 2020 05:52:28 +0000 (22:52 -0700)]
First batch
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Tue, 27 Oct 2020 22:09:51 +0000 (15:09 -0700)]
Merge branch 'dl/checkout-guess'
"git checkout" learned to use checkout.guess configuration variable
and enable/disable its "--[no-]guess" option accordingly.
* dl/checkout-guess:
checkout: learn to respect checkout.guess
Documentation/config/checkout: replace sq with backticks
Junio C Hamano [Tue, 27 Oct 2020 22:09:50 +0000 (15:09 -0700)]
Merge branch 'dl/checkout-p-merge-base'
"git checkout -p A...B [-- <path>]" did not work, even though the
same command without "-p" correctly used the merge-base between
commits A and B.
* dl/checkout-p-merge-base:
t2016: add a NEEDSWORK about the PERL prerequisite
add-patch: add NEEDSWORK about comparing commits
Doc: document "A...B" form for <tree-ish> in checkout and switch
builtin/checkout: fix `git checkout -p HEAD...` bug
Junio C Hamano [Tue, 27 Oct 2020 22:09:49 +0000 (15:09 -0700)]
Merge branch 'sb/clone-origin'
"git clone" learned clone.defaultremotename configuration variable
to customize what nickname to use to call the remote the repository
was cloned from.
* sb/clone-origin:
clone: allow configurable default for `-o`/`--origin`
clone: read new remote name from remote_name instead of option_origin
clone: validate --origin option before use
refs: consolidate remote name validation
remote: add tests for add and rename with invalid names
clone: use more conventional config/option layering
clone: add tests for --template and some disallowed option pairs
Junio C Hamano [Tue, 27 Oct 2020 22:09:49 +0000 (15:09 -0700)]
Merge branch 'sk/force-if-includes'
"git push --force-with-lease[=<ref>]" can easily be misused to lose
commits unless the user takes good care of their own "git fetch".
A new option "--force-if-includes" attempts to ensure that what is
being force-pushed was created after examining the commit at the
tip of the remote ref that is about to be force-replaced.
* sk/force-if-includes:
t, doc: update tests, reference for "--force-if-includes"
push: parse and set flag for "--force-if-includes"
push: add reflog check for "--force-if-includes"
Junio C Hamano [Tue, 27 Oct 2020 22:09:47 +0000 (15:09 -0700)]
Merge branch 'ds/maintenance-part-2'
"git maintenance", an extended big brother of "git gc", continues
to evolve.
* ds/maintenance-part-2:
maintenance: add incremental-repack auto condition
maintenance: auto-size incremental-repack batch
maintenance: add incremental-repack task
midx: use start_delayed_progress()
midx: enable core.multiPackIndex by default
maintenance: create auto condition for loose-objects
maintenance: add loose-objects task
maintenance: add prefetch task
Junio C Hamano [Tue, 27 Oct 2020 22:09:47 +0000 (15:09 -0700)]
Merge branch 'rs/worktree-list-show-locked'
"git worktree list" now shows if each worktree is locked. This
possibly may open us to show other kinds of states in the future.
* rs/worktree-list-show-locked:
worktree: teach `list` to annotate locked worktree
Junio C Hamano [Tue, 27 Oct 2020 22:09:46 +0000 (15:09 -0700)]
Merge branch 'rs/tighten-callers-of-deref-tag'
Code clean-up.
* rs/tighten-callers-of-deref-tag:
line-log: handle deref_tag() returning NULL
blame: handle deref_tag() returning NULL
grep: handle deref_tag() returning NULL
Junio C Hamano [Tue, 27 Oct 2020 22:09:46 +0000 (15:09 -0700)]
Merge branch 'rs/dist-doc-with-git-archive'
Use "git archive" more to produce the release tarball.
* rs/dist-doc-with-git-archive:
Makefile: remove the unused variable TAR_DIST_EXTRA_OPTS
Makefile: use git init/add/commit/archive for dist-doc
Junio C Hamano [Tue, 27 Oct 2020 22:09:46 +0000 (15:09 -0700)]
Merge branch 'cw/ci-ghwf-check-ws-errors'
Dev support.
* cw/ci-ghwf-check-ws-errors:
ci: github action - add check for whitespace errors
Junio C Hamano [Tue, 27 Oct 2020 22:09:46 +0000 (15:09 -0700)]
Merge branch 'sd/userdiff-css-update'
Userdiff for CSS update.
* sd/userdiff-css-update:
userdiff: expand detected chunk headers for css
Junio C Hamano [Tue, 27 Oct 2020 22:09:46 +0000 (15:09 -0700)]
Merge branch 'rk/completion-stash'
The command line completion script (in contrib/) learned that "git
stash show" takes the options "git diff" takes.
* rk/completion-stash:
git-completion.bash: stash-show: complete $__git_diff_common_options
git-completion.bash: __git_diff_common_options: add --[no-]patch
Junio C Hamano [Tue, 27 Oct 2020 22:09:46 +0000 (15:09 -0700)]
Merge branch 'kb/userdiff-rust-macro-rules'
Userdiff for Rust update.
* kb/userdiff-rust-macro-rules:
userdiff: recognize 'macro_rules!' as starting a Rust function block
Junio C Hamano [Tue, 27 Oct 2020 22:09:46 +0000 (15:09 -0700)]
Merge branch 'js/userdiff-php'
Userdiff for PHP update.
* js/userdiff-php:
userdiff: PHP: catch "abstract" and "final" functions
Junio C Hamano [Mon, 26 Oct 2020 21:47:12 +0000 (14:47 -0700)]
other small fixes for 2.29.2
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Mon, 26 Oct 2020 21:59:59 +0000 (14:59 -0700)]
Merge branch 'cc/doc-filter-branch-typofix'
Docfix.
* cc/doc-filter-branch-typofix:
filter-branch doc: fix filter-repo typo
Junio C Hamano [Mon, 26 Oct 2020 21:59:58 +0000 (14:59 -0700)]
Merge branch 'jk/committer-date-is-author-date-fix'
In 2.29, "--committer-date-is-author-date" option of "rebase" and
"am" subcommands lost the e-mail address by mistake, which has been
corrected.
* jk/committer-date-is-author-date-fix:
rebase: fix broken email with --committer-date-is-author-date
am: fix broken email with --committer-date-is-author-date
t3436: check --committer-date-is-author-date result more carefully
Jeff King [Fri, 23 Oct 2020 07:10:15 +0000 (03:10 -0400)]
rebase: fix broken email with --committer-date-is-author-date
Commit
7573cec52c (rebase -i: support --committer-date-is-author-date,
2020-08-17) copied the committer ident-parsing code from builtin/am.c.
And in doing so, it copied a bug in which we always set the email to an
empty string. We fixed the version in git-am in the previous commit;
this commit fixes the copied code.
Reported-by: VenomVendor <redacted>
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Fri, 23 Oct 2020 07:09:39 +0000 (03:09 -0400)]
am: fix broken email with --committer-date-is-author-date
Commit
e8cbe2118a (am: stop exporting GIT_COMMITTER_DATE, 2020-08-17)
rewrote the code for setting the committer date to use fmt_ident(),
rather than setting an environment variable and letting commit_tree()
handle it. But it introduced two bugs:
- we use the author email string instead of the committer email
- when parsing the committer ident, we used the wrong variable to
compute the length of the email, resulting in it always being a
zero-length string
This commit fixes both, which causes our test of this option via the
rebase "apply" backend to now succeed.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Fri, 23 Oct 2020 07:08:43 +0000 (03:08 -0400)]
t3436: check --committer-date-is-author-date result more carefully
After running "rebase --committer-date-is-author-date", we confirm that
the committer date is the same as the author date. However, we don't
look at any other parts of the committer ident line to make sure we
didn't screw them up. And indeed, there are a few bugs here. Depending
on the rebase backend in use, we may accidentally use the author email
instead of the committer's, or even an empty string.
Let's teach our test_ctime_is_atime helper to check the committer name
and email, which reveals several failing tests.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 22 Oct 2020 22:08:41 +0000 (15:08 -0700)]
Sync with Git 2.29.1
Junio C Hamano [Thu, 22 Oct 2020 22:07:25 +0000 (15:07 -0700)]
Git 2.29.1
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 22 Oct 2020 22:01:21 +0000 (15:01 -0700)]
Merge branch 'js/no-builtins-on-disk-option' into maint
Brown-paper-bag fix.
* js/no-builtins-on-disk-option:
SKIP_DASHED_BUILT_INS: do not skip the bin/ programs
Junio C Hamano [Thu, 22 Oct 2020 05:55:58 +0000 (22:55 -0700)]
t7102: prepare expected output inside test_expect_* block
That way we can notice if there is a breakage/bug in the parts of
the test that prepare the expected outcome, which is how modern
tests are arranged.
Signed-off-by: Junio C Hamano <redacted>
Charvi Mendiratta [Tue, 20 Oct 2020 12:11:52 +0000 (17:41 +0530)]
t7201: put each command on a separate line
Modern practice is to avoid multiple commands per line,
and instead place each command on its own line.
Signed-off-by: Charvi Mendiratta <redacted>
Signed-off-by: Junio C Hamano <redacted>
Charvi Mendiratta [Tue, 20 Oct 2020 11:43:18 +0000 (17:13 +0530)]
t7201: use 'git -C' to avoid subshell
Signed-off-by: Charvi Mendiratta <redacted>
Signed-off-by: Junio C Hamano <redacted>
Charvi Mendiratta [Tue, 20 Oct 2020 11:43:17 +0000 (17:13 +0530)]
t7102,t7201: remove whitespace after redirect operator
According to Documentation/CodingGuidelines, redirect
operator is written with space before, but no space
after them.
Let's remove these whitespaces after redirect operators.
Signed-off-by: Charvi Mendiratta <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Schindelin [Wed, 21 Oct 2020 15:13:31 +0000 (15:13 +0000)]
SKIP_DASHED_BUILT_INS: do not skip the bin/ programs
The idea of the `SKIP_DASHED_BUILT_INS` option is to stop hard-linking
the built-in commands as separate executables. The patches to do that
specifically excluded the three commands `receive-pack`,
`upload-archive` and `upload-pack`, though: these commands are expected
to be present in the `PATH` in their dashed form on the server side of
any fetch/push.
However, due to an oversight by myself, even if those commands were
still hard-linked, they were not installed into `bin/`.
Noticed-by: Michael Forney <redacted>
Signed-off-by: Johannes Schindelin <redacted>
Reviewed-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
Charvi Mendiratta [Tue, 20 Oct 2020 11:43:16 +0000 (17:13 +0530)]
t7102,t7201: remove unnecessary blank spaces in test body
t7102 and t7201 still follow the old style of having blank
lines around test body, which is not consistence with our
current practice.
Let's remove those unnecessary blank lines.
Signed-off-by: Charvi Mendiratta <redacted>
Signed-off-by: Junio C Hamano <redacted>
Charvi Mendiratta [Tue, 20 Oct 2020 11:43:15 +0000 (17:13 +0530)]
t7101,t7102,t7201: modernize test formatting
Some tests in these scripts are formatted using a very old style:
test_expect_success \
'title' \
'body line 1 &&
body line 2'
Updating the formatting to the modern style:
test_expect_success 'title' '
body line 1 &&
body line 2
'
Signed-off-by: Charvi Mendiratta <redacted>
Signed-off-by: Junio C Hamano <redacted>
Christian Couder [Tue, 20 Oct 2020 08:33:43 +0000 (10:33 +0200)]
filter-branch doc: fix filter-repo typo
The name of the tool is 'git-filter-repo' not
'git-repo-filter'.
Signed-off-by: Christian Couder <redacted>
Reviewed-by: Elijah Newren <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Mon, 19 Oct 2020 16:58:42 +0000 (09:58 -0700)]
Git 2.29
Signed-off-by: Junio C Hamano <redacted>
Elijah Newren [Fri, 16 Oct 2020 23:39:54 +0000 (23:39 +0000)]
t7518: fix flaky grep invocation
t7518.1 added in commit
862e80a413 ("ident: handle NULL email when
complaining of empty name", 2017-02-23), was trying to make sure that
the test with an empty ident did not segfault and did not result in
glibc quiety translating a NULL pointer into a name of "(null)". It did
the latter by ensuring that a grep for "null" didn't appear in the
output, but on one automatic CI run I observed the following output:
fatal: empty ident name (for <redacted>) not allowed
Note that 'null' appears as a substring of the domain name, found
within 'gcliasfzo2nullsdbrimjtbyhg'. Tighten the test by searching for
"(null)" rather than "null".
Signed-off-by: Elijah Newren <redacted>
Reviewed-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 18 Oct 2020 20:16:08 +0000 (13:16 -0700)]
Merge tag 'l10n-2.29.0-rnd2' of git://github.com/git-l10n/git-po
l10n for Git 2.29.0 round 2
* tag 'l10n-2.29.0-rnd2' of git://github.com/git-l10n/git-po:
l10n: zh_CN: for git v2.29.0 l10n round 1 and 2
l10n: de.po: Update German translation for Git 2.29.0
l10n: vi(5013t): Updated translation for v2.29.0 rd2
l10n: pt_PT: make on po/pt_PT.po
l10n: Portuguese translation team has changed. Wohoo!
l10n: bg.po: Updated Bulgarian translation (5013t)
l10n: sv.po: Update Swedish translation (5013t0f0u)
l10n: it.po: update the Italian translation
l10n: tr: v2.29.0 round 2
l10n: zh_TW.po: v2.29.0 round 2 (2 untranslated)
l10n: fr: v2.29.0 rnd 2
l10n: git.pot: v2.29.0 round 2 (1 new, 1 removed)
l10n: fr: v2.29.0 rnd 1
l10n: it.po: update the Italian translation for Git 2.29.0 round 1
l10n: tr: v2.29.0 round 1
l10n: Update Catalan translation
l10n: git.pot: v2.29.0 round 1 (124 new, 42 removed)
Caleb Tillman [Sat, 17 Oct 2020 02:43:53 +0000 (02:43 +0000)]
t0000: use test_path_is_file instead of "test -f"
Signed-off-by: Caleb Tillman <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jiang Xin [Sun, 18 Oct 2020 01:56:33 +0000 (09:56 +0800)]
Merge branch 'master' of github.com:Softcatala/git-po
* 'master' of github.com:Softcatala/git-po:
l10n: Update Catalan translation
Jiang Xin [Thu, 24 Sep 2020 00:51:52 +0000 (08:51 +0800)]
l10n: zh_CN: for git v2.29.0 l10n round 1 and 2
Translate 124 new messages (5013t0f0u) for git 2.29.0.
Reviewed-by: 依云 <redacted>
Reviewed-by: Fangyi Zhou <redacted>
Signed-off-by: Jiang Xin <redacted>
Junio C Hamano [Sat, 17 Oct 2020 20:10:58 +0000 (13:10 -0700)]
Merge https://github.com/prati0100/git-gui
* https://github.com/prati0100/git-gui:
git-gui: blame: prevent tool tips from sticking around after Command-Tab
git-gui: improve dark mode support
git-gui: fix mixed tabs and spaces; prefer tabs
Pratyush Yadav [Sat, 17 Oct 2020 09:35:27 +0000 (15:05 +0530)]
Merge branch 'sh/blame-tooltip'
Make sure `git gui blame` tooltips are destroyed once the window loses
focus on MacOS.
* sh/blame-tooltip:
git-gui: blame: prevent tool tips from sticking around after Command-Tab
Stefan Haller [Tue, 13 Oct 2020 13:26:43 +0000 (15:26 +0200)]
git-gui: blame: prevent tool tips from sticking around after Command-Tab
On Mac, tooltips are not automatically removed when a window loses
focus. Furthermore, mouse-move events are only dispatched to the active
window, which means that if we Command-tab to another application while
a tool tip is showing, the tool tip will stay there forever (in front of
other applications). So we must hide it manually when we lose focus.
Do this unconditionally here (i.e. without if {[is_MacOSX]}); it
shouldn't hurt on other platforms, even though they don't seem to have
this problem.
Signed-off-by: Stefan Haller <redacted>
Signed-off-by: Pratyush Yadav <redacted>
Junio C Hamano [Thu, 15 Oct 2020 18:58:37 +0000 (11:58 -0700)]
Git 2.29-rc2
Signed-off-by: Junio C Hamano <redacted>
Matthias Rüster [Mon, 12 Oct 2020 15:10:49 +0000 (17:10 +0200)]
l10n: de.po: Update German translation for Git 2.29.0
Reviewed-by: Ralf Thielow <redacted>
Reviewed-by: Phillip Szelat <redacted>
Signed-off-by: Matthias Rüster <redacted>
Jiang Xin [Wed, 14 Oct 2020 01:35:03 +0000 (09:35 +0800)]
Merge branch 'pt-PT' of github.com:git-l10n-pt-PT/git-po
* 'pt-PT' of github.com:git-l10n-pt-PT/git-po:
l10n: pt_PT: make on po/pt_PT.po
l10n: Portuguese translation team has changed. Wohoo!
Tran Ngoc Quan [Tue, 13 Oct 2020 01:38:20 +0000 (08:38 +0700)]
l10n: vi(5013t): Updated translation for v2.29.0 rd2
Signed-off-by: Tran Ngoc Quan <redacted>
Johannes Schindelin [Sun, 11 Oct 2020 21:27:11 +0000 (21:27 +0000)]
ci: make the "skip-if-redundant" check more defensive
In
7d78d5fc1a9 (ci: skip GitHub workflow runs for already-tested
commits/trees, 2020-10-08), we added a check that determines whether
there is already a workflow run for the given commit (or at least tree),
and if found, skips the current run.
We just worked around an issue with this check where older runs might
unexpectedly miss the `head_commit` attribute.
Let's be even more defensive by catching all kinds of exceptions,
logging them as warnings, and continue the run without skipping it
(after all, if the check fails, we _want_ to continue with the run).
This commit is best viewed with the diff option `-w` because it
increases the indentation level of the GitHub Action script by two
spaces, surrounding it by a `try ... catch` construct.
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Schindelin [Sun, 11 Oct 2020 21:27:10 +0000 (21:27 +0000)]
ci: work around old records of GitHub runs
Apparently older GitHub runs at least _sometimes_ lack information about
the `head_commit` (and therefore the `ci-config` check will fail with
"TypeError: Cannot read property 'tree_id' of null") in the check added
in
7d78d5fc1a9 (ci: skip GitHub workflow runs for already-tested
commits/trees, 2020-10-08).
Let's work around this by adding a defensive condition.
Reported-by: Philippe Blain <redacted>
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
René Scharfe [Sun, 11 Oct 2020 16:03:40 +0000 (18:03 +0200)]
line-log: handle deref_tag() returning NULL
Signed-off-by: René Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
René Scharfe [Sun, 11 Oct 2020 16:03:37 +0000 (18:03 +0200)]
blame: handle deref_tag() returning NULL
Signed-off-by: René Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
René Scharfe [Sun, 11 Oct 2020 16:03:28 +0000 (18:03 +0200)]
grep: handle deref_tag() returning NULL
deref_tag() can return NULL. Exit gracefully in that case instead
of blindly dereferencing the return value.
.name shouldn't ever be NULL, but grep_object() handles that case
explicitly, so let's be defensive here as well and show the broken
object's ID if it happens to lack a name after all.
Signed-off-by: René Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
Rafael Silva [Sun, 11 Oct 2020 10:11:52 +0000 (10:11 +0000)]
worktree: teach `list` to annotate locked worktree
The "git worktree list" shows the absolute path to the working tree,
the commit that is checked out and the name of the branch. It is not
immediately obvious which of the worktrees, if any, are locked.
"git worktree remove" refuses to remove a locked worktree with
an error message. If "git worktree list" told which worktrees
are locked in its output, the user would not even attempt to
remove such a worktree, or would realize that
"git worktree remove -f -f <path>" is required.
Teach "git worktree list" to append "locked" to its output.
The output from the command becomes like so:
$ git worktree list
/path/to/main abc123 [master]
/path/to/worktree 456def (detached HEAD)
/path/to/locked-worktree 123abc (detached HEAD) locked
Helped-by: Junio C Hamano <redacted>
Helped-by: Eric Sunshine <redacted>
Signed-off-by: Rafael Silva <redacted>
Reviewed-by: Eric Sunshine <redacted>
Signed-off-by: Junio C Hamano <redacted>
René Scharfe [Sun, 11 Oct 2020 06:14:35 +0000 (08:14 +0200)]
Makefile: remove the unused variable TAR_DIST_EXTRA_OPTS
Signed-off-by: René Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
René Scharfe [Sat, 10 Oct 2020 16:45:18 +0000 (18:45 +0200)]
Makefile: use git init/add/commit/archive for dist-doc
Reduce the dependency on external tools by generating the distribution
archives for HTML documentation and manpages using git commands instead
of tar. This gives the archive entries the same meta data as those in
the dist archive for binaries.
Signed-off-by: René Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
Daniel Santos [Mon, 12 Oct 2020 08:47:24 +0000 (09:47 +0100)]
l10n: pt_PT: make on po/pt_PT.po
Pull from the language Coordenator repository and
`make` done at the top-level directory.
Signed-off-by: Daniel Santos <redacted>
Daniel Santos [Mon, 12 Oct 2020 08:32:37 +0000 (09:32 +0100)]
l10n: Portuguese translation team has changed. Wohoo!
I am excited. Because I like a lot languages, and because I believe this
is the way to contribute to a large number of Portuguese speaking
person.
Jiang Xin and last Portuguese team gave me the lead. Thank you very
much. Honored to be a part of such a project.
Signed-off-by: Daniel Santos <redacted>
Jiang Xin [Mon, 12 Oct 2020 07:19:19 +0000 (15:19 +0800)]
Merge branch 'master' of github.com:alshopov/git-po
* 'master' of github.com:alshopov/git-po:
l10n: bg.po: Updated Bulgarian translation (5013t)
Jiang Xin [Mon, 12 Oct 2020 07:18:03 +0000 (15:18 +0800)]
Merge branch 'master' of github.com:nafmo/git-l10n-sv
* 'master' of github.com:nafmo/git-l10n-sv:
l10n: sv.po: Update Swedish translation (5013t0f0u)
Jiang Xin [Mon, 12 Oct 2020 07:11:30 +0000 (15:11 +0800)]
Merge branch 'update-italian-translation' of github.com:AlessandroMenti/git-po
* 'update-italian-translation' of github.com:AlessandroMenti/git-po:
l10n: it.po: update the Italian translation
Alexander Shopov [Sun, 11 Oct 2020 12:46:54 +0000 (14:46 +0200)]
l10n: bg.po: Updated Bulgarian translation (5013t)
Signed-off-by: Alexander Shopov <redacted>