]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
3 years agoMerge branch 'bc/svn-hash-oid-fix'
Junio C Hamano [Mon, 2 Nov 2020 21:17:45 +0000 (13:17 -0800)] 
Merge branch 'bc/svn-hash-oid-fix'

A recent oid->hash conversion missed one spot, breaking "git svn".

* bc/svn-hash-oid-fix:
  svn: use correct variable name for short OID

3 years agoMerge branch 'js/t7006-cleanup'
Junio C Hamano [Mon, 2 Nov 2020 21:17:45 +0000 (13:17 -0800)] 
Merge branch 'js/t7006-cleanup'

Code clean-up.

* js/t7006-cleanup:
  t7006: Use test_path_is_* functions in test script

3 years agoMerge branch 'en/sequencer-rollback-lock-cleanup'
Junio C Hamano [Mon, 2 Nov 2020 21:17:44 +0000 (13:17 -0800)] 
Merge branch 'en/sequencer-rollback-lock-cleanup'

Code clean-up.

* en/sequencer-rollback-lock-cleanup:
  sequencer: remove duplicate rollback_lock_file() call

3 years agoMerge branch 'mk/diff-ignore-regex'
Junio C Hamano [Mon, 2 Nov 2020 21:17:43 +0000 (13:17 -0800)] 
Merge branch 'mk/diff-ignore-regex'

"git diff" family of commands learned the "-I<regex>" option to
ignore hunks whose changed lines all match the given pattern.

* mk/diff-ignore-regex:
  diff: add -I<regex> that ignores matching changes
  merge-base, xdiff: zero out xpparam_t structures

3 years agoMerge branch 'jt/apply-reverse-twice'
Junio C Hamano [Mon, 2 Nov 2020 21:17:43 +0000 (13:17 -0800)] 
Merge branch 'jt/apply-reverse-twice'

"git apply -R" did not handle patches that touch the same path
twice correctly, which has been corrected.  This is most relevant
in a patch that changes a path from a regular file to a symbolic
link (and vice versa).

* jt/apply-reverse-twice:
  apply: when -R, also reverse list of sections

3 years agoMerge branch 'sc/sequencer-gpg-octopus'
Junio C Hamano [Mon, 2 Nov 2020 21:17:43 +0000 (13:17 -0800)] 
Merge branch 'sc/sequencer-gpg-octopus'

"git rebase --rebase-merges" did not correctly pass --gpg-sign
command line option to underlying "git merge" when replaying a merge
using non-default merge strategy or when replaying an octopus merge
(because replaying a two-head merge with the default strategy was
done in a separate codepath, the problem did not trigger for most
users), which has been corrected.

* sc/sequencer-gpg-octopus:
  t3435: add tests for rebase -r GPG signing
  sequencer: pass explicit --no-gpg-sign to merge
  sequencer: fix gpg option passed to merge subcommand

3 years agoMerge branch 'en/test-selector'
Junio C Hamano [Mon, 2 Nov 2020 21:17:42 +0000 (13:17 -0800)] 
Merge branch 'en/test-selector'

Our test scripts can be told to run only individual pieces while
skipping others with the "--run=..." option; they were taught to
take a substring of test title, in addition to numbers, to name the
test pieces to run.

* en/test-selector:
  test-lib: reduce verbosity of skipped tests
  t6006, t6012: adjust tests to use 'setup' instead of synonyms
  test-lib: allow selecting tests by substring/glob with --run

3 years agoMerge branch 'jk/report-fn-typedef'
Junio C Hamano [Mon, 2 Nov 2020 21:17:42 +0000 (13:17 -0800)] 
Merge branch 'jk/report-fn-typedef'

Code clean-up.

* jk/report-fn-typedef:
  usage: define a type for a reporting function

3 years agoMerge branch 'nk/dir-c-comment-update'
Junio C Hamano [Mon, 2 Nov 2020 21:17:41 +0000 (13:17 -0800)] 
Merge branch 'nk/dir-c-comment-update'

Update stale in-code comment.

* nk/dir-c-comment-update:
  dir.c: fix comments to agree with argument name

3 years agoMerge branch 'jk/no-common'
Junio C Hamano [Mon, 2 Nov 2020 21:17:41 +0000 (13:17 -0800)] 
Merge branch 'jk/no-common'

Dev support to catch a tentative definition of a variable in our C
code as an error.

* jk/no-common:
  config.mak.dev: build with -fno-common

3 years agoMerge branch 'as/sample-push-to-checkout-hook'
Junio C Hamano [Mon, 2 Nov 2020 21:17:40 +0000 (13:17 -0800)] 
Merge branch 'as/sample-push-to-checkout-hook'

Add a sample 'push-to-checkout' hook, that performs the same as
what the built-in default action does.

* as/sample-push-to-checkout-hook:
  hook: add sample template for push-to-checkout

3 years agoMerge branch 'jk/fast-import-marks-cleanup'
Junio C Hamano [Mon, 2 Nov 2020 21:17:40 +0000 (13:17 -0800)] 
Merge branch 'jk/fast-import-marks-cleanup'

Code clean-up.

* jk/fast-import-marks-cleanup:
  fast-import: remove duplicated option-parsing line

3 years agoMerge branch 'lo/zsh-completion'
Junio C Hamano [Mon, 2 Nov 2020 21:17:40 +0000 (13:17 -0800)] 
Merge branch 'lo/zsh-completion'

Update instructions for command line completion (in contrib/) for zsh.

* lo/zsh-completion:
  completion: fix zsh installation instructions

3 years agoMerge branch 'tk/credential-config'
Junio C Hamano [Mon, 2 Nov 2020 21:17:39 +0000 (13:17 -0800)] 
Merge branch 'tk/credential-config'

"git credential' didn't honor the core.askPass configuration
variable (among other things), which has been corrected.

* tk/credential-config:
  credential: load default config

3 years agoMerge branch 'dl/diff-merge-base'
Junio C Hamano [Mon, 2 Nov 2020 21:17:39 +0000 (13:17 -0800)] 
Merge branch 'dl/diff-merge-base'

"git diff A...B" learned "git diff --merge-base A B", which is a
longer short-hand to say the same thing.

* dl/diff-merge-base:
  contrib/completion: complete `git diff --merge-base`
  builtin/diff-tree: learn --merge-base
  builtin/diff-index: learn --merge-base
  t4068: add --merge-base tests
  diff-lib: define diff_get_merge_base()
  diff-lib: accept option flags in run_diff_index()
  contrib/completion: extract common diff/difftool options
  git-diff.txt: backtick quote command text
  git-diff-index.txt: make --cached description a proper sentence
  t4068: remove unnecessary >tmp

3 years agoMerge branch 'bk/sob-dco'
Junio C Hamano [Mon, 2 Nov 2020 21:17:39 +0000 (13:17 -0800)] 
Merge branch 'bk/sob-dco'

Document that the meaning of a Signed-off-by trailer can vary from
project to project in the end-user documentation, and clarify what
it means to this project.

* bk/sob-dco:
  Documentation: stylistically normalize references to Signed-off-by:
  SubmittingPatches: clarify DCO is our --signoff rule
  Documentation: clarify and expand description of --signoff
  doc: preparatory clean-up of description on the sign-off option

3 years agoMerge branch 'ds/maintenance-commit-graph-auto-fix'
Junio C Hamano [Mon, 2 Nov 2020 21:17:39 +0000 (13:17 -0800)] 
Merge branch 'ds/maintenance-commit-graph-auto-fix'

Test-coverage enhancement of running commit-graph task "git
maintenance" as needed led to discovery and fix of a bug.

* ds/maintenance-commit-graph-auto-fix:
  maintenance: core.commitGraph=false prevents writes
  maintenance: test commit-graph auto condition

3 years agoMerge branch 'ds/commit-graph-merging-fix'
Junio C Hamano [Mon, 2 Nov 2020 21:17:39 +0000 (13:17 -0800)] 
Merge branch 'ds/commit-graph-merging-fix'

When "git commit-graph" detects the same commit recorded more than
once while it is merging the layers, it used to die.  The code now
ignores all but one of them and continues.

* ds/commit-graph-merging-fix:
  commit-graph: don't write commit-graph when disabled
  commit-graph: ignore duplicates when merging layers

3 years agoMerge branch 'es/test-cmp-typocatcher'
Junio C Hamano [Mon, 2 Nov 2020 21:17:38 +0000 (13:17 -0800)] 
Merge branch 'es/test-cmp-typocatcher'

A test helper "test_cmp A B" was taught to diagnose missing files A
or B as a bug in test, but some tests legitimately wanted to notice
a failure to even create file B as an error, in addition to leaving
the expected result in it, and were misdiagnosed as a bug.  This
has been corrected.

* es/test-cmp-typocatcher:
  Revert "test_cmp: diagnose incorrect arguments"

3 years agoMerge branch 'jk/fast-import-marks-alloc-fix'
Junio C Hamano [Mon, 2 Nov 2020 21:17:37 +0000 (13:17 -0800)] 
Merge branch 'jk/fast-import-marks-alloc-fix'

"git fast-import" wasted a lot of memory when many marks were in use.

* jk/fast-import-marks-alloc-fix:
  fast-import: fix over-allocation of marks storage

3 years agoMerge branch 'js/avoid-split-sideband-message'
Junio C Hamano [Mon, 2 Nov 2020 21:17:37 +0000 (13:17 -0800)] 
Merge branch 'js/avoid-split-sideband-message'

The side-band status report can be sent at the same time as the
primary payload multiplexed, but the demultiplexer on the receiving
end incorrectly split a single status report into two, which has
been corrected.

* js/avoid-split-sideband-message:
  test-pkt-line: drop colon from sideband identity
  sideband: report unhandled incomplete sideband messages as bugs
  sideband: avoid reporting incomplete sideband messages

3 years agoSecond batch
Junio C Hamano [Fri, 30 Oct 2020 20:04:01 +0000 (13:04 -0700)] 
Second batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'js/ci-ghwf-dedup-tests'
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

3 years agoMerge branch 'dl/resurrect-update-for-sha256'
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

3 years agoMerge branch 'cm/t7xxx-cleanup'
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

3 years agoMerge branch 'ct/t0000-use-test-path-is-file'
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"

3 years agoMerge branch 'en/t7518-unflake'
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

3 years agoSync with Git 2.29.2
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 <gitster@pobox.com>
3 years agoGit 2.29.2 v2.29.2
Junio C Hamano [Thu, 29 Oct 2020 21:24:09 +0000 (14:24 -0700)] 
Git 2.29.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'cc/doc-filter-branch-typofix' into maint
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

3 years agoMerge branch 'jk/committer-date-is-author-date-fix' into maint
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

3 years agoFirst batch
Junio C Hamano [Tue, 27 Oct 2020 05:52:28 +0000 (22:52 -0700)] 
First batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'dl/checkout-guess'
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

3 years agoMerge branch 'dl/checkout-p-merge-base'
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

3 years agoMerge branch 'sb/clone-origin'
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

3 years agoMerge branch 'sk/force-if-includes'
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"

3 years agoMerge branch 'ds/maintenance-part-2'
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

3 years agoMerge branch 'rs/worktree-list-show-locked'
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

3 years agoMerge branch 'rs/tighten-callers-of-deref-tag'
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

3 years agoMerge branch 'rs/dist-doc-with-git-archive'
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

3 years agoMerge branch 'cw/ci-ghwf-check-ws-errors'
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

3 years agoMerge branch 'sd/userdiff-css-update'
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

3 years agoMerge branch 'rk/completion-stash'
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

3 years agoMerge branch 'kb/userdiff-rust-macro-rules'
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

3 years agoMerge branch 'js/userdiff-php'
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

3 years agotest-pkt-line: drop colon from sideband identity
Jeff King [Tue, 27 Oct 2020 07:13:09 +0000 (03:13 -0400)] 
test-pkt-line: drop colon from sideband identity

We pass "sideband: " as our identity for errors to recv_sideband(). But
it already adds the trailing colon and space. This doesn't invalidate
any tests, but it looks funny when you examine the test output.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoother small fixes for 2.29.2
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 <gitster@pobox.com>
3 years agoMerge branch 'cc/doc-filter-branch-typofix'
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

3 years agoMerge branch 'jk/committer-date-is-author-date-fix'
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

3 years agorebase: fix broken email with --committer-date-is-author-date
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 <info@venomvendor.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoam: fix broken email with --committer-date-is-author-date
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot3436: check --committer-date-is-author-date result more carefully
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoSync with Git 2.29.1
Junio C Hamano [Thu, 22 Oct 2020 22:08:41 +0000 (15:08 -0700)] 
Sync with Git 2.29.1

3 years agoGit 2.29.1 v2.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 <gitster@pobox.com>
3 years agoMerge branch 'js/no-builtins-on-disk-option' into maint
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

3 years agot7102: prepare expected output inside test_expect_* block
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 <gitster@pobox.com>
3 years agot7201: put each command on a separate line
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 <charvi077@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot7201: use 'git -C' to avoid subshell
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 <charvi077@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot7102,t7201: remove whitespace after redirect operator
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 <charvi077@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosvn: use correct variable name for short OID
brian m. carlson [Thu, 22 Oct 2020 01:18:11 +0000 (01:18 +0000)] 
svn: use correct variable name for short OID

The commit 9ab33150a0 ("perl: create and switch variables for hash
constants", 2020-06-22) converted each instance of the variable
$sha1_short into $oid_short in the Subversion code, since git-svn now
understands SHA-256.  However, one conversion was missed.

As a result, Perl complains about the use of this variable:

  Use of uninitialized value $sha1_short in regexp compilation at
  /usr/lib64/perl5/vendor_perl/5.30.3/Git/SVN/Log.pm line 301, <$fh>
  line 6.

Because we're parsing raw diff output here, the likelihood is very low
that we'll actually misparse the data, since the only lines we're going
to get starting with colons are the ones we're expecting.  Even if we
had a newline in a path, we'd end up with a quoted path.  Our regex is
just less strict than we'd like it to be.

However, it's obviously undesirable that our code is emitting Perl
warnings, so let's convert it to use the proper variable name.

Reported-by: Nikos Chantziaras <realnc@gmail.com>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoSKIP_DASHED_BUILT_INS: do not skip the bin/ programs
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 <mforney@mforney.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosequencer: remove duplicate rollback_lock_file() call
Elijah Newren [Wed, 21 Oct 2020 13:24:35 +0000 (13:24 +0000)] 
sequencer: remove duplicate rollback_lock_file() call

Commit 2b6ad0f4bc ("rebase --rebase-merges: add support for octopus
merges", 2017-12-21) introduced a case where rollback_lock_file() was
unconditionally called twice in a row with no intervening commands.
Remove the duplicate.

Signed-off-by: Elijah Newren <newren@gmail.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot7006: Use test_path_is_* functions in test script
Joey Salazar [Tue, 20 Oct 2020 19:53:52 +0000 (19:53 +0000)] 
t7006: Use test_path_is_* functions in test script

Modernize the test by replacing `test -e` instances with
`test_path_is_file` helper functions, and `! test -e` with
`test_path_is_missing`, for better readability and diagnostic messages.

Signed-off-by: Joey Salazar <jgsal@protonmail.com>
Reviewed-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoapply: when -R, also reverse list of sections
Jonathan Tan [Tue, 20 Oct 2020 22:04:52 +0000 (15:04 -0700)] 
apply: when -R, also reverse list of sections

A patch changing a symlink into a file is written with 2 sections (in
the code, represented as "struct patch"): firstly, the deletion of the
symlink, and secondly, the creation of the file. When applying that
patch with -R, the sections are reversed, so we get:

 (1) creation of a symlink, then
 (2) deletion of a file.

This causes an issue when the "deletion of a file" section is checked,
because Git observes that the so-called file is not a file but a
symlink, resulting in a "wrong type" error message.

What we want is:

 (1) deletion of a file, then
 (2) creation of a symlink.

In the code, this is reflected in the behavior of previous_patch() when
invoked from check_preimage() when the deletion is checked. Creation
then deletion means that when the deletion is checked, previous_patch()
returns the creation section, triggering a mode conflict resulting in
the "wrong type" error message. But deletion then creation means that
when the deletion is checked, previous_patch() returns NULL, so the
deletion mode is checked against lstat, which is what we want.

There are also other ways a patch can contain 2 sections referencing the
same file, for example, in 7a07841c0b ("git-apply: handle a patch that
touches the same path more than once better", 2008-06-27). "git apply
-R" fails in the same way, and this commit makes this case succeed.

Therefore, when building the list of sections, build them in reverse
order (by adding to the front of the list instead of the back) when -R
is passed.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosideband: report unhandled incomplete sideband messages as bugs
Johannes Schindelin [Mon, 19 Oct 2020 19:35:41 +0000 (19:35 +0000)] 
sideband: report unhandled incomplete sideband messages as bugs

It was pretty tricky to verify that incomplete sideband messages are
handled correctly by the `recv_sideband()`/`demultiplex_sideband()`
code: they have to be flushed out at the end of the loop in
`recv_sideband()`, but the actual flushing is done by the
`demultiplex_sideband()` function (which therefore has to know somehow
that the loop will be done after it returns).

To catch future bugs where incomplete sideband messages might not be
shown by mistake, let's catch that condition and report a bug.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosideband: avoid reporting incomplete sideband messages
Johannes Schindelin [Mon, 19 Oct 2020 19:35:40 +0000 (19:35 +0000)] 
sideband: avoid reporting incomplete sideband messages

In 2b695ecd74d (t5500: count objects through stderr, not trace,
2020-05-06) we tried to ensure that the "Total 3" message could be
grepped in Git's output, even if it sometimes got chopped up into
multiple lines in the trace machinery.

However, the first instance where this mattered now goes through the
sideband machinery, where it is _still_ possible for messages to get
chopped up: it *is* possible for the standard error stream to be sent
byte-for-byte and hence it can be easily interrupted. Meaning: it is
possible for the single line that we're looking for to be chopped up
into multiple sideband packets, with a primary packet being delivered
between them.

This seems to happen occasionally in the `vs-test` part of our CI
builds, i.e. with binaries built using Visual C, but not when building
with GCC or clang; The symptom is that t5500.43 fails to find a line
matching `remote: Total 3` in the `log` file, which ends in something
along these lines:

remote: Tota
remote: l 3 (delta 0), reused 0 (delta 0), pack-reused 0

This should not happen, though: we have code in `demultiplex_sideband()`
_specifically_ to stitch back together lines that were delivered in
separate sideband packets.

However, this stitching was broken in a subtle way in fbd76cd450
(sideband: reverse its dependency on pkt-line, 2019-01-16): before that
change, incomplete sideband lines would not be flushed upon receiving a
primary packet, but after that patch, they would be.

The subtleness of this bug comes from the fact that it is easy to get
confused by the ambiguous meaning of the `break` keyword: after writing
the primary packet contents, the `break;` in the original version of
`recv_sideband()` does _not_ break out of the `while` loop, but instead
only ends the `switch` case:

while (!retval) {
[...]
switch (band) {
[...]
case 1:
/* Write the contents of the primary packet */
write_or_die(out, buf + 1, len);
/* Here, we do *not* break out of the loop, `retval` is unchanged */
break;
[...]
}

if (outbuf.len) {
/* Write any remaining sideband messages lacking a trailing LF */
strbuf_addch(&outbuf, '\n');
xwrite(2, outbuf.buf, outbuf.len);
}

In contrast, after fbd76cd450 (sideband: reverse its dependency on
pkt-line, 2019-01-16), the body of the `while` loop was extracted into
`demultiplex_sideband()`, crucially _including_ the logic to write
incomplete sideband messages:

switch (band) {
[...]
case 1:
*sideband_type = SIDEBAND_PRIMARY;
/* This does not break out of the loop: the loop is in the caller */
break;
[...]
}

cleanup:
[...]
/* This logic is now no longer _outside_ the loop but _inside_ */
if (scratch->len) {
strbuf_addch(scratch, '\n');
xwrite(2, scratch->buf, scratch->len);
}

The correct way to fix this is to return from `demultiplex_sideband()`
early. The caller will then write out the contents of the primary packet
and continue looping. The `scratch` buffer for incomplete sideband
messages is owned by that caller, and will continue to accumulate the
remainder(s) of those messages. The loop will only end once
`demultiplex_sideband()` returned non-zero _and_ did not indicate a
primary packet, which is the case only when we hit the `cleanup:` path,
in which we take care of flushing any unfinished sideband messages and
release the `scratch` buffer.

To ensure that this does not get broken again, we introduce a pair of
subcommands of the `pkt-line` test helper that specifically chop up the
sideband message and squeeze a primary packet into the middle.

Final note: The other test case touched by 2b695ecd74d (t5500: count
objects through stderr, not trace, 2020-05-06) is not affected by this
issue because the sideband machinery is not involved there.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot7102,t7201: remove unnecessary blank spaces in test body
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 <charvi077@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot7101,t7102,t7201: modernize test formatting
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 <charvi077@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agodiff: add -I<regex> that ignores matching changes
Michał Kępień [Tue, 20 Oct 2020 06:48:09 +0000 (08:48 +0200)] 
diff: add -I<regex> that ignores matching changes

Add a new diff option that enables ignoring changes whose all lines
(changed, removed, and added) match a given regular expression.  This is
similar to the -I/--ignore-matching-lines option in standalone diff
utilities and can be used e.g. to ignore changes which only affect code
comments or to look for unrelated changes in commits containing a large
number of automatically applied modifications (e.g. a tree-wide string
replacement).  The difference between -G/-S and the new -I option is
that the latter filters output on a per-change basis.

Use the 'ignore' field of xdchange_t for marking a change as ignored or
not.  Since the same field is used by --ignore-blank-lines, identical
hunk emitting rules apply for --ignore-blank-lines and -I.  These two
options can also be used together in the same git invocation (they are
complementary to each other).

Rename xdl_mark_ignorable() to xdl_mark_ignorable_lines(), to indicate
that it is logically a "sibling" of xdl_mark_ignorable_regex() rather
than its "parent".

Signed-off-by: Michał Kępień <michal@isc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agomerge-base, xdiff: zero out xpparam_t structures
Michał Kępień [Tue, 20 Oct 2020 06:48:08 +0000 (08:48 +0200)] 
merge-base, xdiff: zero out xpparam_t structures

xpparam_t structures are usually zero-initialized before their specific
fields are assigned to, but there are three locations in the tree where
that does not happen.  Add the missing memset() calls in order to make
initialization of xpparam_t structures consistent tree-wide and to
prevent stack garbage from being used as field values.

Signed-off-by: Michał Kępień <michal@isc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agofilter-branch doc: fix filter-repo typo
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 <chriscool@tuxfamily.org>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoRevert "test_cmp: diagnose incorrect arguments"
Junio C Hamano [Fri, 16 Oct 2020 20:51:04 +0000 (13:51 -0700)] 
Revert "test_cmp: diagnose incorrect arguments"

This reverts commit d572f52a64c6a69990f72ad6a09504b9b615d2e4; the
idea to detect that "test_cmp expect actual" was fed a misspelt
filename meant well, but when the version of Git tested exhibits a
bug, the reason why these two files do not match may be because one
of them did not get created as expected, in which case missing file
is not a sign of misspelt filename but is a genuine test failure.

Acked-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoDocumentation: stylistically normalize references to Signed-off-by:
Bradley M. Kuhn [Tue, 20 Oct 2020 01:03:55 +0000 (18:03 -0700)] 
Documentation: stylistically normalize references to Signed-off-by:

Ted reported an old typo in the git-commit.txt and merge-options.txt.
Namely, the phrase "Signed-off-by line" was used without either a
definite nor indefinite article.

Upon examination, it seems that the documentation (including items in
Documentation/, but also option help strings) have been quite
inconsistent on usage when referring to `Signed-off-by`.

First, very few places used a definite or indefinite article with the
phrase "Signed-off-by line", but that was the initial typo that led
to this investigation.  So, normalize using either an indefinite or
definite article consistently.

The original phrasing, in Commit 3f971fc425b (Documentation updates,
2005-08-14), is "Add Signed-off-by line".  Commit 6f855371a53 (Add
--signoff, --check, and long option-names. 2005-12-09) switched to
using "Add `Signed-off-by:` line", but didn't normalize the former
commit to match.  Later commits seem to have cut and pasted from one
or the other, which is likely how the usage became so inconsistent.

Junio stated on the git mailing list in
<xmqqy2k1dfoh.fsf@gitster.c.googlers.com> a preference to leave off
the colon.  Thus, prefer `Signed-off-by` (with backticks) for the
documentation files and Signed-off-by (without backticks) for option
help strings.

Additionally, Junio argued that "trailer" is now the standard term to
refer to `Signed-off-by`, saying that "becomes plenty clear that we
are not talking about any random line in the log message".  As such,
prefer "trailer" over "line" anywhere the former word fits.

However, leave alone those few places in documentation that use
Signed-off-by to refer to the process (rather than the specific
trailer), or in places where mail headers are generally discussed in
comparison with Signed-off-by.

Reported-by: "Theodore Y. Ts'o" <tytso@mit.edu>
Signed-off-by: Bradley M. Kuhn <bkuhn@sfconservancy.org>
Acked-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoSubmittingPatches: clarify DCO is our --signoff rule
Junio C Hamano [Tue, 20 Oct 2020 01:03:54 +0000 (18:03 -0700)] 
SubmittingPatches: clarify DCO is our --signoff rule

The description on sign-off and DCO was written back in the days
where there was only a choice between "use sign-off and it means the
contributor agrees to the Linux-kernel style DCO" and "not using
sign-off at all will make your patch unusable".  These days, we are
trying to clarify that the exact meaning of a sign-off varies
project to project.

Let's be more explicit when presenting what _our_ rules are.  It is
of secondary importance that it originally came from the kernel
project, so move the description as a historical note at the end,
while cautioning that what a sign-off means to us may be different from
what it means to other projects contributors may have been used to.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Reviewed-by: Bradley M. Kuhn <bkuhn@sfconservancy.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoDocumentation: clarify and expand description of --signoff
Bradley M. Kuhn [Tue, 20 Oct 2020 01:03:53 +0000 (18:03 -0700)] 
Documentation: clarify and expand description of --signoff

Building on past documentation improvements in b2c150d3aa (Expand
documentation describing --signoff, 2016-01-05), further clarify
that any project using Git may and often does set its own policy.

However, leave intact reference to the Linux DCO, which Git also
uses.  It is reasonable for Git to advocate for its own Signed-off-by
methodology in its documentation, as long as the documentation
remains respectful that YMMV and other projects may well have very
different contributor representations tied to Signed-off-by.

Signed-off-by: Bradley M. Kuhn <bkuhn@sfconservancy.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agodoc: preparatory clean-up of description on the sign-off option
Junio C Hamano [Tue, 20 Oct 2020 01:03:52 +0000 (18:03 -0700)] 
doc: preparatory clean-up of description on the sign-off option

Almost identical text on the signed-off-by trailer appears in the
documentation for "git commit" and "git merge" and its friends.

Introduce a new signoff-option.txt file to be shared.  A couple of
things of note are:

 - The short-form "-s" is available only in "git commit", but not in
   commands that are friends of "git merge", as it is used as a
   short-hand for "--strategy".

 - The original lacks description on the negated "--no-signoff" form
   on "git commit" side, but it equally is applicable.  It however
   was unclear in the original text that not adding a Signed-off-by
   trailer is the default, so rephrase to explain it as a way to
   countermand a --signoff option that appeared earlier on the same
   command line.

This is in preparation to apply a further clarification on what
exactly the Signed-off-by trailer means.

Suggested-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Reviewed-by: Bradley M. Kuhn <bkuhn@sfconservancy.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoGit 2.29 v2.29.0
Junio C Hamano [Mon, 19 Oct 2020 16:58:42 +0000 (09:58 -0700)] 
Git 2.29

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agotest-lib: reduce verbosity of skipped tests
Elijah Newren [Sun, 18 Oct 2020 00:23:47 +0000 (00:23 +0000)] 
test-lib: reduce verbosity of skipped tests

When using the --run flag to run just two or three tests from a test
file which contains several dozen tests, having every skipped test print
out dozens of lines of output for the test code for that skipped test
(in addition to the TAP output line) adds up to hundreds or thousands of
lines of irrelevant output that make it very hard to fish out the
relevant results you were looking for.  Simplify the output for skipped
tests to remove this extra output, leaving only the TAP output line
(i.e. the line reading "ok <number> # skip <test-description>", which
already mentions that the test was "skip"ped).

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot6006, t6012: adjust tests to use 'setup' instead of synonyms
Elijah Newren [Sun, 18 Oct 2020 00:23:46 +0000 (00:23 +0000)] 
t6006, t6012: adjust tests to use 'setup' instead of synonyms

With the new ability to pass --run=setup to select which tests to run,
it is more convenient if tests use the term "setup" instead of synonyms
like 'prepare' or 'rebuild'.  There are undoubtedly many other tests in
our testsuite that could be changed over too, these are just a couple
that I ran into.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agotest-lib: allow selecting tests by substring/glob with --run
Elijah Newren [Sun, 18 Oct 2020 00:23:45 +0000 (00:23 +0000)] 
test-lib: allow selecting tests by substring/glob with --run

Many of our test scripts have several "setup" tests.  It's a lot easier
to say

   ./t0050-filesystem.sh --run=setup,9

in order to run all the setup tests as well as test #9, than it is to
track down what all the setup tests are and enter all their numbers in
the list.  Also, I often find myself wanting to run just one or a couple
tests from the test file, but I don't know the numbering of any of the
tests -- to get it I either have to first run the whole test file (or
start counting by hand or figure out some other clever but non-obvious
tricks).  It's really convenient to be able to just look at the test
description(s) and then run

   ./t6416-recursive-corner-cases.sh --run=symlink

or

   ./t6402-merge-rename.sh --run='setup,unnecessary update'

Add such an ability to test selection which relies on merely matching
against the test description.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot7518: fix flaky grep invocation
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 <runner@fv-az128-670.gcliasfzo2nullsdbrimjtbyhg.cx.internal.cloudapp.net>) 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 <newren@gmail.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge tag 'l10n-2.29.0-rnd2' of git://github.com/git-l10n/git-po
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)

3 years agot3435: add tests for rebase -r GPG signing
Samuel Čavoj [Sat, 17 Oct 2020 23:15:57 +0000 (01:15 +0200)] 
t3435: add tests for rebase -r GPG signing

Add test cases of various combinations of the commit.gpgsign option and
--gpg-sign, --no-gpg-sign flags with rebase -r with the default merge
strategy. This excercises a different code-path from those with octopus
merges or overridden merge strategy with rebase -s.

Signed-off-by: Samuel Čavoj <samuel@cavoj.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosequencer: pass explicit --no-gpg-sign to merge
Samuel Čavoj [Sat, 17 Oct 2020 23:15:56 +0000 (01:15 +0200)] 
sequencer: pass explicit --no-gpg-sign to merge

The merge subcommand launched for merges with non-default strategy would
use its own default behaviour to decide how to sign commits, regardless
of what opts->gpg_sign was set to. For example the --no-gpg-sign flag
given to rebase explicitly would get ignored, if commit.gpgsign was set
to true.

Fix the issue and add a test case excercising this behaviour.

Signed-off-by: Samuel Čavoj <samuel@cavoj.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosequencer: fix gpg option passed to merge subcommand
Samuel Čavoj [Sat, 17 Oct 2020 23:15:55 +0000 (01:15 +0200)] 
sequencer: fix gpg option passed to merge subcommand

When performing a rebase with --rebase-merges using either a custom
strategy specified with -s or an octopus merge, and at the same time
having gpgsign enabled (either rebase -S or config commit.gpgsign), the
operation would fail on making the merge commit. Instead of "-S%s" with
the key id substituted, only the bare key id would get passed to the
underlying merge command, which tried to interpret it as a ref.

Fix the issue and add test cases as suggested by Johannes Schindelin and
Junio C Hamano.

Signed-off-by: Samuel Čavoj <samuel@cavoj.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot0000: use test_path_is_file instead of "test -f"
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 <caleb.tillman@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'master' of github.com:Softcatala/git-po
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

3 years agol10n: zh_CN: for git v2.29.0 l10n round 1 and 2
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: 依云 <lilydjwg@gmail.com>
Reviewed-by: Fangyi Zhou <me@fangyi.io>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
3 years agoMerge https://github.com/prati0100/git-gui
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

3 years agoMerge branch 'sh/blame-tooltip'
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

3 years agogit-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 <stefan@haller-berlin.de>
Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
3 years agocredential: load default config
Thomas Koutcher [Thu, 15 Oct 2020 21:59:20 +0000 (21:59 +0000)] 
credential: load default config

Make `git credential fill` honour the core.askPass variable.

Signed-off-by: Thomas Koutcher <thomas.koutcher@online.fr>
[jk: added test]
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agocompletion: fix zsh installation instructions
Alexey [Thu, 2 Jul 2020 10:51:20 +0000 (10:51 +0000)] 
completion: fix zsh installation instructions

- Fix wrong script in completion configuration. zsh wants bash completion
  path here, not path to itself.

- Add `compinit` autoload command, since whole thing didn't work
  if it is not loaded.

Signed-off-by: Alexey <lesha.ogonkov@gmail.com>
Reviewed-by: Stefan Haller <lists@haller-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agofast-import: remove duplicated option-parsing line
Jeff King [Thu, 15 Oct 2020 19:34:11 +0000 (15:34 -0400)] 
fast-import: remove duplicated option-parsing line

Commit 1bdca81641 (fast-import: add options for rewriting submodules,
2020-02-22) accidentally added two lines parsing the option
"rewrite-submodules-from". This didn't do anything in practice, because
they're in an if/else chain and so the second one can never trigger.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agohook: add sample template for push-to-checkout
Adam Spiers [Thu, 15 Oct 2020 22:54:46 +0000 (23:54 +0100)] 
hook: add sample template for push-to-checkout

The template is a more-or-less exact translation to shell of the C
code for the default behaviour for git's push-to-checkout hook defined
in the push_to_deploy() function in builtin/receive-pack.c, to serve
as a convenient starting point for modification.

It also contains relevant text extracted from the git-config(1) and
githooks(5) man pages.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoconfig.mak.dev: build with -fno-common
Jeff King [Thu, 15 Oct 2020 19:30:29 +0000 (15:30 -0400)] 
config.mak.dev: build with -fno-common

It's an easy mistake to define a variable in a header with "int x;" when
you really meant to only declare the variable as "extern int x;"
instead. Clang and gcc will both allow this when building with
"-fcommon"; they put these "tentative definitions" in a common block
which the linker is able to resolve.

This is the default in clang and was the default in gcc until gcc-10,
since it helps some legacy code. However, we would prefer not to rely on
this because:

  - using "extern" makes the intent more clear (so it's a style issue,
    but it's one the compiler can help us catch)

  - according to the gcc manpage, it may yield a speed and code size
    penalty

So let's build explicitly with -fno-common when the DEVELOPER knob is
set, which will let developers using clang and older versions of gcc
notice these problems.

I didn't bother making this conditional on a particular version of gcc.
As far as I know, this option has been available forever in both gcc and
clang, so old versions don't need to avoid it. And we already expect gcc
and clang options throughout config.mak.dev, so it's unlikely anybody
setting the DEVELOPER knob is using anything else. It's a noop on
gcc-10, of course, but it's not worth trying to exclude it there.

Note that there's nothing to fix in the code; we already don't have any
issues here. But if you want to test the patch, you can add a bare "int
x;" into cache.h, which will cause the link step to fail.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agodir.c: fix comments to agree with argument name
Alex Vandiver [Thu, 15 Oct 2020 16:28:36 +0000 (16:28 +0000)] 
dir.c: fix comments to agree with argument name

Signed-off-by: Alex Vandiver <alexmv@dropbox.com>
Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agousage: define a type for a reporting function
Jeff King [Thu, 15 Oct 2020 19:30:04 +0000 (15:30 -0400)] 
usage: define a type for a reporting function

The usage, die, warning, and error routines all work with a function
pointer that takes the message to be reported. We usually just mention
the function's full type inline. But this makes the use of these
pointers hard to read, especially because C's syntax for returning a
function pointer is so awful:

  void (*get_error_routine(void))(const char *err, va_list params);

Unless you read it very carefully, this looks like a function pointer
declaration. Let's instead use a single typedef to define a reporting
function, which is the same for all four types.

Note that this also removes the "extern" from these declarations to
match the surrounding functions. They were missed in 554544276a (*.[ch]:
remove extern from function declarations using spatch, 2019-04-29)
presumably because of the unusual syntax.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoGit 2.29-rc2 v2.29.0-rc2
Junio C Hamano [Thu, 15 Oct 2020 18:58:37 +0000 (11:58 -0700)] 
Git 2.29-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agofast-import: fix over-allocation of marks storage
Jeff King [Thu, 15 Oct 2020 15:38:49 +0000 (11:38 -0400)] 
fast-import: fix over-allocation of marks storage

Fast-import stores its marks in a trie-like structure made of mark_set
structs. Each struct has a fixed size (1024). If our id number is too
large to fit in the struct, then we allocate a new struct which shifts
the id number by 10 bits. Our original struct becomes a child node
of this new layer, and the new struct becomes the top level of the trie.

This scheme was broken by ddddf8d7e2 (fast-import: permit reading
multiple marks files, 2020-02-22). Before then, we had a top-level
"marks" pointer, and the push-down worked by assigning the new top-level
struct to "marks". But after that commit, insert_mark() takes a pointer
to the mark_set, rather than using the global "marks". It continued to
assign to the global "marks" variable during the push down, which was
wrong for two reasons:

  - we added a call in option_rewrite_submodules() which uses a separate
    mark set; pushing down on "marks" is outright wrong here. We'd
    corrupt the "marks" set, and we'd fail to correctly store any
    submodule mappings with an id over 1024.

  - the other callers passed "marks", but the push-down was still wrong.
    In read_mark_file(), we take the pointer to the mark_set as a
    parameter. So even though insert_mark() was updating the global
    "marks", the local pointer we had in read_mark_file() was not
    updated. As a result, we'd add a new level when needed, but then the
    next call to insert_mark() wouldn't see it! It would then allocate a
    new layer, which would also not be seen, and so on. Lookups for the
    lost layers obviously wouldn't work, but before we even hit any
    lookup stage, we'd generally run out of memory and die.

Our tests didn't notice either of these cases because they didn't have
enough marks to trigger the push-down behavior. The new tests in t9304
cover both cases (and fail without this patch).

We can solve the problem by having insert_mark() take a pointer-to-pointer
of the top-level of the set. Then our push down can assign to it in a
way that the caller actually sees. Note the subtle reordering in
option_rewrite_submodules(). Our call to read_mark_file() may modify our
top-level set pointer, so we have to wait until after it returns to
assign its value into the string_list.

Reported-by: Sergey Brester <serg.brester@sebres.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>