]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
3 years agoMerge branch 'mv/log-since-as-filter'
Junio C Hamano [Fri, 20 May 2022 22:26:56 +0000 (15:26 -0700)] 
Merge branch 'mv/log-since-as-filter'

"git log --since=X" will stop traversal upon seeing a commit that
is older than X, but there may be commits behind it that is younger
than X when the commit was created with a faulty clock.  A new
option is added to keep digging without stopping, and instead
filter out commits with timestamp older than X.

* mv/log-since-as-filter:
  log: "--since-as-filter" option is a non-terminating "--since" variant

3 years agoMerge branch 'rs/external-diff-tempfile'
Junio C Hamano [Fri, 20 May 2022 22:26:55 +0000 (15:26 -0700)] 
Merge branch 'rs/external-diff-tempfile'

The temporary files fed to external diff command are now generated
inside a new temporary directory under the same basename.

* rs/external-diff-tempfile:
  diff: use mks_tempfile_dt()
  tempfile: add mks_tempfile_dt()

3 years agoMerge branch 'kf/p4-multiple-remotes'
Junio C Hamano [Fri, 20 May 2022 22:26:55 +0000 (15:26 -0700)] 
Merge branch 'kf/p4-multiple-remotes'

"git p4" update.

* kf/p4-multiple-remotes:
  git-p4: fix issue with multiple perforce remotes

3 years agoMerge branch 'tk/p4-with-explicity-sync'
Junio C Hamano [Fri, 20 May 2022 22:26:55 +0000 (15:26 -0700)] 
Merge branch 'tk/p4-with-explicity-sync'

"git p4" update.

* tk/p4-with-explicity-sync:
  git-p4: support explicit sync of arbitrary existing git-p4 refs

3 years agoMerge branch 'tk/p4-utf8-bom'
Junio C Hamano [Fri, 20 May 2022 22:26:54 +0000 (15:26 -0700)] 
Merge branch 'tk/p4-utf8-bom'

"git p4" update.

* tk/p4-utf8-bom:
  git-p4: preserve utf8 BOM when importing from p4 to git

3 years agoMerge branch 'cg/vscode-with-gdb'
Junio C Hamano [Fri, 20 May 2022 22:26:54 +0000 (15:26 -0700)] 
Merge branch 'cg/vscode-with-gdb'

VS code configuration updates.

* cg/vscode-with-gdb:
  contrib/vscode/: debugging with VS Code and gdb

3 years agoMerge branch 'sa/t1011-use-helpers'
Junio C Hamano [Fri, 20 May 2022 22:26:54 +0000 (15:26 -0700)] 
Merge branch 'sa/t1011-use-helpers'

A GSoC practice.

* sa/t1011-use-helpers:
  t1011: replace test -f with test_path_is_file

3 years agoMerge branch 'km/t3501-use-test-helpers'
Junio C Hamano [Fri, 20 May 2022 22:26:54 +0000 (15:26 -0700)] 
Merge branch 'km/t3501-use-test-helpers'

Test script updates.

* km/t3501-use-test-helpers:
  t3501: remove test -f and stop ignoring git <cmd> exit code

3 years agoMerge branch 'pb/submodule-recurse-mode-enum'
Junio C Hamano [Fri, 20 May 2022 22:26:53 +0000 (15:26 -0700)] 
Merge branch 'pb/submodule-recurse-mode-enum'

Small code clean-up.

* pb/submodule-recurse-mode-enum:
  submodule.h: use a named enum for RECURSE_SUBMODULES_*

3 years agoMerge branch 'ah/convert-warning-message'
Junio C Hamano [Fri, 20 May 2022 22:26:53 +0000 (15:26 -0700)] 
Merge branch 'ah/convert-warning-message'

Update a few end-user facing messages around eol conversion.

* ah/convert-warning-message:
  convert: clarify line ending conversion warning

3 years agoMerge branch 'gf/unused-includes'
Junio C Hamano [Fri, 20 May 2022 22:26:53 +0000 (15:26 -0700)] 
Merge branch 'gf/unused-includes'

Remove unused includes.

* gf/unused-includes:
  apply.c: remove unnecessary include
  serve.c: remove unnecessary include

3 years agoMerge branch 'gf/shorthand-version-and-help'
Junio C Hamano [Fri, 20 May 2022 22:26:52 +0000 (15:26 -0700)] 
Merge branch 'gf/shorthand-version-and-help'

"git -v" and "git -h" are now understood as "git --version" and
"git --help".

* gf/shorthand-version-and-help:
  cli: add -v and -h shorthands

3 years agoMerge branch 'rs/t7812-pcre2-ws-bug-test'
Junio C Hamano [Fri, 20 May 2022 22:26:52 +0000 (15:26 -0700)] 
Merge branch 'rs/t7812-pcre2-ws-bug-test'

A test to ensure workaround for an earlier pcre2 bug does work.

* rs/t7812-pcre2-ws-bug-test:
  t7812: test PCRE2 whitespace bug

3 years agoMerge branch 'ds/do-not-call-bug-on-bad-refs'
Junio C Hamano [Fri, 20 May 2022 22:26:52 +0000 (15:26 -0700)] 
Merge branch 'ds/do-not-call-bug-on-bad-refs'

Code clean-up.

* ds/do-not-call-bug-on-bad-refs:
  clone: die() instead of BUG() on bad refs

3 years agoMerge branch 'sg/safe-directory-tests-and-docs'
Junio C Hamano [Fri, 20 May 2022 22:26:52 +0000 (15:26 -0700)] 
Merge branch 'sg/safe-directory-tests-and-docs'

New tests for the safe.directory mechanism.

* sg/safe-directory-tests-and-docs:
  safe.directory: document and check that it's ignored in the environment
  t0033-safe-directory: check when 'safe.directory' is ignored
  t0033-safe-directory: check the error message without matching the trash dir

3 years agosecond 0th batch of topics from the previous cycle
Junio C Hamano [Wed, 11 May 2022 20:56:07 +0000 (13:56 -0700)] 
second 0th batch of topics from the previous cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'rs/commit-summary-wo-break-rewrite'
Junio C Hamano [Wed, 11 May 2022 20:56:22 +0000 (13:56 -0700)] 
Merge branch 'rs/commit-summary-wo-break-rewrite'

The commit summary shown after making a commit is matched to what
is given in "git status" not to use the break-rewrite heuristics.

* rs/commit-summary-wo-break-rewrite:
  commit, sequencer: turn off break_opt for commit summary

3 years agoMerge branch 'pw/test-malloc-with-sanitize-address'
Junio C Hamano [Wed, 11 May 2022 20:56:22 +0000 (13:56 -0700)] 
Merge branch 'pw/test-malloc-with-sanitize-address'

Avoid problems from interaction between malloc_check and address
sanitizer.

* pw/test-malloc-with-sanitize-address:
  tests: make SANITIZE=address imply TEST_NO_MALLOC_CHECK

3 years agoMerge branch 'ea/rebase-code-simplify'
Junio C Hamano [Wed, 11 May 2022 20:56:22 +0000 (13:56 -0700)] 
Merge branch 'ea/rebase-code-simplify'

Code clean-up.

* ea/rebase-code-simplify:
  rebase: simplify an assignment of options.type in cmd_rebase

3 years agoMerge branch 'kt/commit-graph-plug-fp-leak-on-error'
Junio C Hamano [Wed, 11 May 2022 20:56:22 +0000 (13:56 -0700)] 
Merge branch 'kt/commit-graph-plug-fp-leak-on-error'

Fix a leak of FILE * in an error codepath.

* kt/commit-graph-plug-fp-leak-on-error:
  commit-graph: close file before returning NULL

3 years agoMerge branch 'ah/rebase-keep-base-fix'
Junio C Hamano [Wed, 11 May 2022 20:56:21 +0000 (13:56 -0700)] 
Merge branch 'ah/rebase-keep-base-fix'

"git rebase --keep-base <upstream> <branch-to-rebase>" computed the
commit to rebase onto incorrectly, which has been corrected.

* ah/rebase-keep-base-fix:
  rebase: use correct base for --keep-base when a branch is given

3 years agoMerge branch 'master' of git://git.ozlabs.org/~paulus/gitk
Junio C Hamano [Wed, 11 May 2022 15:25:02 +0000 (08:25 -0700)] 
Merge branch 'master' of git://git.ozlabs.org/~paulus/gitk

* 'master' of git://git.ozlabs.org/~paulus/gitk:
  gitk: include y coord in recorded sash position
  gitk: trivial indentation fix

3 years agogitk: include y coord in recorded sash position
halilsen [Sun, 20 Feb 2022 19:47:36 +0000 (19:47 +0000)] 
gitk: include y coord in recorded sash position

6cd80496e9 ("gitk: Resize panes correctly when reducing window size",
2020-10-03) introduces a mechanism to record previously-set sash
positions to make sure that correct values are used while computing
resize proportions. However, if we are not using ttk, then sash
represents only the x coordinate and the recorded sash (`oldsash`) only
includes the x coordinate. When we need to access the y coordinate via
the recorded sash position, we generate the following Application Error
popup:

Error: expected integer but got ""

expected integer but got ""

expected integer but got ""

     while executing

"$win sash place 0 $sash0 [lindex $s0 1]"

     (procedure "resizeclistpanes" line 38)

     invoked from within

"resizeclistpanes .tf.histframe.pwclist 2818"

     (command bound to event)

To fix this, if we are not using ttk, we append the sash positions with
the y coordinates before recording them to match the use_ttk case.

Signed-off-by: Halil Sen <halil.sen@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
3 years agogitk: trivial indentation fix
halilsen [Sun, 20 Feb 2022 19:47:35 +0000 (19:47 +0000)] 
gitk: trivial indentation fix

No functional changes.

Signed-off-by: Halil Sen <halil.sen@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
3 years ago0th batch for topics from the previous cycle
Junio C Hamano [Wed, 11 May 2022 00:36:46 +0000 (17:36 -0700)] 
0th batch for topics from the previous cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'ea/progress-partial-blame'
Junio C Hamano [Wed, 11 May 2022 00:41:11 +0000 (17:41 -0700)] 
Merge branch 'ea/progress-partial-blame'

The progress meter of "git blame" was showing incorrect numbers
when processing only parts of the file.

* ea/progress-partial-blame:
  blame: report correct number of lines in progress when using ranges

3 years agoMerge branch 'fr/vimdiff-layout'
Junio C Hamano [Wed, 11 May 2022 00:41:11 +0000 (17:41 -0700)] 
Merge branch 'fr/vimdiff-layout'

Reimplement "vimdiff[123]" mergetool drivers with a more generic
layout mechanism.

* fr/vimdiff-layout:
  mergetools: add description to all diff/merge tools
  vimdiff: add tool documentation
  vimdiff: integrate layout tests in the unit tests framework ('t' folder)
  vimdiff: new implementation with layout support

3 years agoMerge branch 'jh/p4-various-fixups'
Junio C Hamano [Wed, 11 May 2022 00:41:11 +0000 (17:41 -0700)] 
Merge branch 'jh/p4-various-fixups'

Various cleanups to "git p4".

* jh/p4-various-fixups: (22 commits)
  git-p4: sort imports
  git-p4: seperate multiple statements onto seperate lines
  git-p4: move inline comments to line above
  git-p4: only seperate code blocks by a single empty line
  git-p4: compare to singletons with "is" and "is not"
  git-p4: normalize indentation of lines in conditionals
  git-p4: ensure there is a single space around all operators
  git-p4: ensure every comment has a single #
  git-p4: remove spaces between dictionary keys and colons
  git-p4: remove redundant backslash-continuations inside brackets
  git-p4: remove extraneous spaces before function arguments
  git-p4: place a single space after every comma
  git-p4: removed brackets when assigning multiple return values
  git-p4: remove spaces around default arguments
  git-p4: remove padding from lists, tuples and function arguments
  git-p4: sort and de-duplcate pylint disable list
  git-p4: remove commented code
  git-p4: convert descriptive class and function comments into docstrings
  git-p4: improve consistency of docstring formatting
  git-p4: indent with 4-spaces
  ...

3 years agoMerge branch 'tk/untracked-cache-with-uall'
Junio C Hamano [Wed, 11 May 2022 00:41:10 +0000 (17:41 -0700)] 
Merge branch 'tk/untracked-cache-with-uall'

The performance of the "untracked cache" feature has been improved
when "--untracked-files=<mode>" and "status.showUntrackedFiles"
are combined.

* tk/untracked-cache-with-uall:
  untracked-cache: support '--untracked-files=all' if configured
  untracked-cache: test untracked-cache-bypassing behavior with -uall

3 years agoMerge branch 'ab/misc-cleanup'
Junio C Hamano [Wed, 11 May 2022 00:41:10 +0000 (17:41 -0700)] 
Merge branch 'ab/misc-cleanup'

Code clean-up.

* ab/misc-cleanup:
  alloc.[ch]: remove alloc_report() function
  object-store.h: remove unused has_sha1_file*()
  pack-bitmap-write: remove unused bitmap_reset() function
  xdiff/xmacros.h: remove unused XDL_PTRFREE
  configure.ac: remove USE_PIC comment
  run-command.h: remove always unused "clean_on_exit_handler_cbdata"

3 years agoSync with v2.36.1
Junio C Hamano [Thu, 5 May 2022 21:39:03 +0000 (14:39 -0700)] 
Sync with v2.36.1

3 years agoGit 2.36.1 v2.36.1
Junio C Hamano [Thu, 5 May 2022 21:36:37 +0000 (14:36 -0700)] 
Git 2.36.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'ab/cc-package-fixes' into maint
Junio C Hamano [Thu, 5 May 2022 21:36:25 +0000 (14:36 -0700)] 
Merge branch 'ab/cc-package-fixes' into maint

Correct choices of C compilers used in various CI jobs.
source: <patch-v3-1.1-8b3444ecc87-20220422T092015Z-avarab@gmail.com>

* ab/cc-package-fixes:
  CI: select CC based on CC_PACKAGE (again)

3 years agoMerge branch 'jc/cocci-xstrdup-or-null-fix' into maint
Junio C Hamano [Thu, 5 May 2022 21:36:25 +0000 (14:36 -0700)] 
Merge branch 'jc/cocci-xstrdup-or-null-fix' into maint

Get rid of a bogus and over-eager coccinelle rule.
source: <xmqq1qxd6e4x.fsf@gitster.g>

* jc/cocci-xstrdup-or-null-fix:
  cocci: drop bogus xstrdup_or_null() rule

3 years agoMerge branch 'rs/format-patch-pathspec-fix' into maint
Junio C Hamano [Thu, 5 May 2022 21:36:25 +0000 (14:36 -0700)] 
Merge branch 'rs/format-patch-pathspec-fix' into maint

"git format-patch <args> -- <pathspec>" lost the pathspec when
showing the second and subsequent commits, which has been
corrected.
source: <c36896a1-6247-123b-4fa3-b7eb24af1897@web.de>

* rs/format-patch-pathspec-fix:
  2.36 format-patch regression fix

3 years agoMerge branch 'rs/fast-export-pathspec-fix' into maint
Junio C Hamano [Thu, 5 May 2022 21:36:25 +0000 (14:36 -0700)] 
Merge branch 'rs/fast-export-pathspec-fix' into maint

"git fast-export -- <pathspec>" lost the pathspec when showing the
second and subsequent commits, which has been corrected.
source: <2c988c7b-0efe-4222-4a43-8124fe1a9da6@web.de>

* rs/fast-export-pathspec-fix:
  2.36 fast-export regression fix

3 years agoMerge branch 'jc/show-pathspec-fix' into maint
Junio C Hamano [Thu, 5 May 2022 21:36:24 +0000 (14:36 -0700)] 
Merge branch 'jc/show-pathspec-fix' into maint

"git show <commit1> <commit2>... -- <pathspec>" lost the pathspec
when showing the second and subsequent commits, which has been
corrected.
source: <xmqqo80j87g0.fsf_-_@gitster.g>

* jc/show-pathspec-fix:
  2.36 show regression fix

3 years agoMerge branch 'rs/name-rev-fix-free-after-use' into maint
Junio C Hamano [Thu, 5 May 2022 21:36:24 +0000 (14:36 -0700)] 
Merge branch 'rs/name-rev-fix-free-after-use' into maint

Regression fix for 2.36 where "git name-rev" started to sometimes
reference strings after they are freed.

This fixes a regression in 2.36 and is slate to go to 2.36.1
source: <340c8810-d912-7b18-d46e-a9d43f20216a@web.de>

* rs/name-rev-fix-free-after-use:
  Revert "name-rev: release unused name strings"

3 years agoMerge branch 'jc/diff-tree-stdin-fix' into maint
Junio C Hamano [Thu, 5 May 2022 21:36:24 +0000 (14:36 -0700)] 
Merge branch 'jc/diff-tree-stdin-fix' into maint

"diff-tree --stdin" has been broken for about a year, but 2.36
release broke it even worse by breaking running the command with
<pathspec>, which in turn broke "gitk" and got noticed.  This has
been corrected by aligning its behaviour to that of "log".

This fixes a regression in 2.36 and is slate to go to 2.36.1
source: <xmqq7d7bsu2n.fsf@gitster.g>

* jc/diff-tree-stdin-fix:
  2.36 gitk/diff-tree --stdin regression fix

3 years agoMerge branch 'gc/submodule-update-part2' into maint
Junio C Hamano [Thu, 5 May 2022 21:36:24 +0000 (14:36 -0700)] 
Merge branch 'gc/submodule-update-part2' into maint

"git submodule update" without pathspec should silently skip an
uninitialized submodule, but it started to become noisy by mistake.

This fixes a regression in 2.36 and is slate to go to 2.36.1
source: <pull.1258.v2.git.git.1650890741430.gitgitgadget@gmail.com>

* gc/submodule-update-part2:
  submodule--helper: fix initialization of warn_if_uninitialized

3 years agoA bit more regression fixes for 2.36
Junio C Hamano [Wed, 4 May 2022 16:51:39 +0000 (09:51 -0700)] 
A bit more regression fixes for 2.36

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'cm/reftable-0-length-memset'
Junio C Hamano [Wed, 4 May 2022 16:51:29 +0000 (09:51 -0700)] 
Merge branch 'cm/reftable-0-length-memset'

Code clean-up.

* cm/reftable-0-length-memset:
  reftable: avoid undefined behaviour breaking t0032

3 years agoMerge branch 'ab/cc-package-fixes'
Junio C Hamano [Wed, 4 May 2022 16:51:29 +0000 (09:51 -0700)] 
Merge branch 'ab/cc-package-fixes'

Correct choices of C compilers used in various CI jobs.

* ab/cc-package-fixes:
  CI: select CC based on CC_PACKAGE (again)

3 years agoMerge branch 'ds/midx-normalize-pathname-before-comparison'
Junio C Hamano [Wed, 4 May 2022 16:51:29 +0000 (09:51 -0700)] 
Merge branch 'ds/midx-normalize-pathname-before-comparison'

The path taken by "git multi-pack-index" command from the end user
was compared with path internally prepared by the tool withut first
normalizing, which lead to duplicated paths not being noticed,
which has been corrected.

* ds/midx-normalize-pathname-before-comparison:
  cache: use const char * for get_object_directory()
  multi-pack-index: use --object-dir real path
  midx: use real paths in lookup_multi_pack_index()

3 years agoMerge branch 'jc/cocci-xstrdup-or-null-fix'
Junio C Hamano [Wed, 4 May 2022 16:51:28 +0000 (09:51 -0700)] 
Merge branch 'jc/cocci-xstrdup-or-null-fix'

Get rid of a bogus and over-eager coccinelle rule.

* jc/cocci-xstrdup-or-null-fix:
  cocci: drop bogus xstrdup_or_null() rule

3 years agoMerge branch 'jc/clone-remote-name-leak-fix'
Junio C Hamano [Wed, 4 May 2022 16:51:28 +0000 (09:51 -0700)] 
Merge branch 'jc/clone-remote-name-leak-fix'

"git clone --origin X" leaked piece of memory that held value read
from the clone.defaultRemoteName configuration variable, which has
been plugged.

* jc/clone-remote-name-leak-fix:
  clone: plug a miniscule leak

3 years agoMerge branch 'rs/format-patch-pathspec-fix'
Junio C Hamano [Wed, 4 May 2022 16:51:28 +0000 (09:51 -0700)] 
Merge branch 'rs/format-patch-pathspec-fix'

"git format-patch <args> -- <pathspec>" lost the pathspec when
showing the second and subsequent commits, which has been
corrected.

* rs/format-patch-pathspec-fix:
  2.36 format-patch regression fix

3 years agoMerge branch 'rs/fast-export-pathspec-fix'
Junio C Hamano [Wed, 4 May 2022 16:51:28 +0000 (09:51 -0700)] 
Merge branch 'rs/fast-export-pathspec-fix'

"git fast-export -- <pathspec>" lost the pathspec when showing the
second and subsequent commits, which has been corrected.

* rs/fast-export-pathspec-fix:
  2.36 fast-export regression fix

3 years agoMerge branch 'jc/show-pathspec-fix'
Junio C Hamano [Wed, 4 May 2022 16:51:28 +0000 (09:51 -0700)] 
Merge branch 'jc/show-pathspec-fix'

"git show <commit1> <commit2>... -- <pathspec>" lost the pathspec
when showing the second and subsequent commits, which has been
corrected.

* jc/show-pathspec-fix:
  2.36 show regression fix

3 years agococci: drop bogus xstrdup_or_null() rule
Junio C Hamano [Sun, 1 May 2022 05:00:30 +0000 (22:00 -0700)] 
cocci: drop bogus xstrdup_or_null() rule

13092a91 (cocci: refactor common patterns to use xstrdup_or_null(),
2016-10-12) introduced a rule to rewrite this conditional call to
xstrdup(E) and an assignment to variable V:

    - if (E)
    -    V = xstrdup(E);

into an unconditional call to xstrdup_or_null(E) and an assignment
to variable V:

    + V = xstrdup_or_null(E);

which is utterly bogus.  The original code may already have an
acceptable value in V and the conditional assignment may be to
improve the value already in V with a copy of a better value E when
(and only when) E is not NULL.

The rewritten construct unconditionally discards the existing value
of V and replaces it with a copy of E, even when E is NULL, which
changes the meaning of the program.

By the way, if it were

-if (E && !V)
- V = xstrdup(E);
+V = xstrdup_or_null(E);

it would probably have been correct.  But there is no existing code
that would have been improved by such a rule, so let's just remove
the bogus one without replacing with the more specific one.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoclone: plug a miniscule leak
Junio C Hamano [Sun, 1 May 2022 05:17:15 +0000 (22:17 -0700)] 
clone: plug a miniscule leak

The remote_name variable is first assigned a copy of the value of
the "clone.defaultremotename" configuration variable and then by the
value of the "--origin" command line option.  The former is prepared
to see multiple instances of the configuration variable by freeing
the current value of the variable before a copy of the newly
discovered value gets assigned to it.  The latter however blindly
assigned a copy of the new value to the variable, thereby leaking
the value read from the configuration variable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years ago2.36 fast-export regression fix
René Scharfe [Sat, 30 Apr 2022 14:31:43 +0000 (16:31 +0200)] 
2.36 fast-export regression fix

e900d494dc (diff: add an API for deferred freeing, 2021-02-11) added a
way to allow reusing diffopts: the no_free bit.  244c27242f (diff.[ch]:
have diff_free() call clear_pathspec(opts.pathspec), 2022-02-16) made
that mechanism mandatory.

git fast-export doesn't set no_free, so path limiting stopped working
after the first commit.  Set the flag and add a basic test to make sure
only changes to the specified files are exported.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years ago2.36 format-patch regression fix
René Scharfe [Sat, 30 Apr 2022 10:32:44 +0000 (12:32 +0200)] 
2.36 format-patch regression fix

e900d494dc (diff: add an API for deferred freeing, 2021-02-11) added a
way to allow reusing diffopts: the no_free bit.  244c27242f (diff.[ch]:
have diff_free() call clear_pathspec(opts.pathspec), 2022-02-16) made
that mechanism mandatory.

git format-patch only sets no_free when --output is given, causing it to
forget pathspecs after the first commit.  Set no_free unconditionally
instead.

The existing test was unable to detect this breakage because it checks
stderr for the absence of a certain string, but format-patch writes to
stdout.  Also the test was not checking the case of one commit modifying
multiple files and a pathspec limiting the diff.  Replace it with a more
thorough one.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years ago2.36 show regression fix
Junio C Hamano [Sat, 30 Apr 2022 05:29:51 +0000 (22:29 -0700)] 
2.36 show regression fix

This only surfaced as a regression after 2.36 release, but the
breakage was already there with us for at least a year.

e900d494 (diff: add an API for deferred freeing, 2021-02-11)
introduced a mechanism to delay freeing resources held in
diff_options struct that need to be kept as long as the struct will
be reused to compute diff.  "git log -p" was taught to utilize the
mechanism but it was done with an incorrect assumption that the
underlying helper function, cmd_log_walk(), is called only once,
and it is OK to do the freeing at the end of it.

Alas, for "git show A B", the function is called once for each
commit given, so it is not OK to free the resources until we finish
calling it for all the commits given from the command line.

During 2.36 release cycle, we started clearing the <pathspec> as
part of this freeing, which made the bug a lot more visible.

Fix this breakage by tweaking how cmd_log_walk() frees the resources
at the end and using a variant of it that does not immediately free
the resources to show each commit object from the command line in
"git show".

Protect the fix with a few new tests.

Reported-by: Daniel Li <dan@danielyli.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoSome regression fixes for 2.36
Junio C Hamano [Thu, 28 Apr 2022 17:44:14 +0000 (10:44 -0700)] 
Some regression fixes for 2.36

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'rs/name-rev-fix-free-after-use'
Junio C Hamano [Thu, 28 Apr 2022 17:46:04 +0000 (10:46 -0700)] 
Merge branch 'rs/name-rev-fix-free-after-use'

Regression fix for 2.36 where "git name-rev" started to sometimes
reference strings after they are freed.

* rs/name-rev-fix-free-after-use:
  Revert "name-rev: release unused name strings"

3 years agoMerge branch 'jc/diff-tree-stdin-fix'
Junio C Hamano [Thu, 28 Apr 2022 17:46:04 +0000 (10:46 -0700)] 
Merge branch 'jc/diff-tree-stdin-fix'

"diff-tree --stdin" has been broken for about a year, but 2.36
release broke it even worse by breaking running the command with
<pathspec>, which in turn broke "gitk" and got noticed.  This has
been corrected by aligning its behaviour to that of "log".

* jc/diff-tree-stdin-fix:
  2.36 gitk/diff-tree --stdin regression fix

3 years agoMerge branch 'gc/submodule-update-part2'
Junio C Hamano [Thu, 28 Apr 2022 17:46:04 +0000 (10:46 -0700)] 
Merge branch 'gc/submodule-update-part2'

"git submodule update" without pathspec should silently skip an
uninitialized submodule, but it started to become noisy by mistake.

* gc/submodule-update-part2:
  submodule--helper: fix initialization of warn_if_uninitialized

3 years agosafe.directory: document and check that it's ignored in the environment
SZEDER Gábor [Wed, 27 Apr 2022 17:06:49 +0000 (19:06 +0200)] 
safe.directory: document and check that it's ignored in the environment

The description of 'safe.directory' mentions that it's respected in
the system and global configs, and ignored in the repository config
and on the command line, but it doesn't mention whether it's respected
or ignored when specified via environment variables (nor does the
commit message adding 'safe.directory' [1]).

Clarify that 'safe.directory' is ignored when specified in the
environment, and add tests to make sure that it remains so.

[1] 8959555cee (setup_git_directory(): add an owner check for the
                top-level directory, 2022-03-02)

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot0033-safe-directory: check when 'safe.directory' is ignored
SZEDER Gábor [Wed, 27 Apr 2022 17:06:48 +0000 (19:06 +0200)] 
t0033-safe-directory: check when 'safe.directory' is ignored

According to the documentation 'safe.directory' "is only respected
when specified in a system or global config, not when it is specified
in a repository config or via the command line option -c
safe.directory=<path>".

Add tests to check that 'safe.directory' in the repository config or
on the command line is indeed ignored.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot0033-safe-directory: check the error message without matching the trash dir
SZEDER Gábor [Wed, 27 Apr 2022 17:06:47 +0000 (19:06 +0200)] 
t0033-safe-directory: check the error message without matching the trash dir

Since 8959555cee (setup_git_directory(): add an owner check for the
top-level directory, 2022-03-02) when git finds itself in a repository
owned by someone else, it aborts with a "fatal: unsafe repository
(<repo path>)" error message and an advice about how to set the
'safe.directory' config variable to mark that repository as safe.
't0033-safe-directory.sh' contains tests that check that this feature
and handling said config work as intended.  To ensure that git dies
for the right reason, several of those tests check that its standard
error contains the name of that config variable, but:

  - it only appears in the advice part, not in the actual error
    message.

  - it is interpreted as a regexp by 'grep', so, because of the dot,
    it matches the name of the test script and the path of the trash
    directory as well.  Consequently, these tests could be fooled by
    any error message that would happen to include the path of the
    test repository.

Tighten these checks to look for "unsafe repository" instead.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosubmodule--helper: fix initialization of warn_if_uninitialized
Orgad Shaneh [Mon, 25 Apr 2022 12:45:41 +0000 (12:45 +0000)] 
submodule--helper: fix initialization of warn_if_uninitialized

The .warn_if_uninitialized member was introduced by 48308681
(git submodule update: have a dedicated helper for cloning,
2016-02-29) to submodule_update_clone struct and initialized to
false.  When c9911c93 (submodule--helper: teach update_data more
options, 2022-03-15) moved it to update_data struct, it started
to initialize it to true but this change was not explained in
its log message.

The member is set to true only when pathspec was given, and is
used when a submodule that matched the pathspec is found
uninitialized to give diagnostic message.  "submodule update"
without pathspec is supposed to iterate over all submodules
(i.e. without pathspec limitation) and update only the
initialized submodules, and finding uninitialized submodules
during the iteration is a totally expected and normal thing that
should not be warned.

[jc: added tests]

Signed-off-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years ago2.36 gitk/diff-tree --stdin regression fix
Junio C Hamano [Tue, 26 Apr 2022 16:11:44 +0000 (09:11 -0700)] 
2.36 gitk/diff-tree --stdin regression fix

This only surfaced as a regression after 2.36 release, but the
breakage was already there with us for at least a year.

The diff_free() call is to be used after we completely finished with
a diffopt structure.  After "git diff A B" finishes producing
output, calling it before process exit is fine.  But there are
commands that prepares diff_options struct once, compares two sets
of paths, releases resources that were used to do the comparison,
then reuses the same diff_option struct to go on to compare the next
two sets of paths, like "git log -p".

After "git log -p" finishes showing a single commit, calling it
before it goes on to the next commit is NOT fine.  There is a
mechanism, the .no_free member in diff_options struct, to help "git
log" to avoid calling diff_free() after showing each commit and
instead call it just one.  When the mechanism was introduced in
e900d494 (diff: add an API for deferred freeing, 2021-02-11),
however, we forgot to do the same to "diff-tree --stdin", which *is*
a moral equivalent to "git log".

During 2.36 release cycle, we started clearing the pathspec in
diff_free(), so programs like gitk that runs

    git diff-tree --stdin -- <pathspec>

downstream of a pipe, processing one commit after another, started
showing irrelevant comparison outside the given <pathspec> from the
second commit.  The same commit, by forgetting to teach the .no_free
mechanism, broke "diff-tree --stdin -I<regexp>" and nobody noticed
it for over a year, presumably because it is so seldom used an
option.

But <pathspec> is a different story.  The breakage was very
prominently visible and was reported immediately after 2.36 was
released.

Fix this breakage by mimicking how "git log" utilizes the .no_free
member so that "diff-tree --stdin" behaves more similarly to "log".

Protect the fix with a few new tests.

Reported-by: Matthias Aßhauer <mha1993@live.de>
Helped-by: René Scharfe <l.s.r@web.de>
Helped-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agocache: use const char * for get_object_directory()
Derrick Stolee [Mon, 25 Apr 2022 18:27:14 +0000 (18:27 +0000)] 
cache: use const char * for get_object_directory()

The get_object_directory() method returns the exact string stored at
the_repository->objects->odb->path. The return type of "char *" implies
that the caller must keep track of the buffer and free() it when
complete. This causes significant problems later when the ODB is
accessed.

Use "const char *" as the return type to avoid this confusion. There are
no current callers that care about the non-const definition.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agomulti-pack-index: use --object-dir real path
Derrick Stolee [Mon, 25 Apr 2022 18:27:13 +0000 (18:27 +0000)] 
multi-pack-index: use --object-dir real path

The --object-dir argument to 'git multi-pack-index' allows a user to
specify an alternate to use instead of the local $GITDIR. This is used
by third-party tools like VFS for Git to maintain the pack-files in a
"shared object cache" used by multiple clones.

On Windows, the user can specify a path using a Windows-style file path
with backslashes such as "C:\Path\To\ObjectDir". This same path style is
used in the .git/objects/info/alternates file, so it already matches the
path of that alternate. However, find_odb() converts these paths to
real-paths for the comparison, which use forward slashes. As of the
previous change, lookup_multi_pack_index() uses real-paths, so it
correctly finds the target multi-pack-index when given these paths.

Some commands such as 'git multi-pack-index repack' call child processes
using the object_dir value, so it can be helpful to convert the path to
the real-path before sending it to those locations.

Add a callback to convert the real path immediately upon parsing the
argument. We need to be careful that we don't store the exact value out
of get_object_directory() and free it, or we could corrupt a later use
of the_repository->objects->odb->path.

We don't use get_object_directory() for the initial instantiation in
cmd_multi_pack_index() because we need 'git multi-pack-index -h' to work
without a Git repository.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agomidx: use real paths in lookup_multi_pack_index()
Derrick Stolee [Mon, 25 Apr 2022 18:27:12 +0000 (18:27 +0000)] 
midx: use real paths in lookup_multi_pack_index()

This helper looks for a parsed multi-pack-index whose object directory
matches the given object_dir. Before going into the loop over the parsed
multi-pack-indexes, it calls find_odb() to ensure that the given
object_dir is actually a known object directory.

However, find_odb() uses real-path manipulations to compare the input to
the alternate directories. This same real-path comparison is not used in
the loop, leading to potential issues with the strcmp().

Update the method to use the real-path values instead.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoclone: die() instead of BUG() on bad refs
Derrick Stolee [Mon, 25 Apr 2022 13:47:30 +0000 (13:47 +0000)] 
clone: die() instead of BUG() on bad refs

When cloning directly from a local repository, we load a list of refs
based on scanning the $GIT_DIR/refs/ directory of the "server"
repository. If files exist in that directory that do not parse as
hexadecimal hashes, then the ref array used by write_remote_refs()
ends up with some entries with null OIDs. This causes us to hit a BUG()
statement in ref_transaction_create():

  BUG: create called without valid new_oid

This BUG() call used to be a die() until 033abf97f (Replace all
die("BUG: ...") calls by BUG() ones, 2018-05-02). Before that, the die()
was added by f04c5b552 (ref_transaction_create(): check that new_sha1 is
valid, 2015-02-17).

The original report for this bug [1] mentioned that this problem did not
exist in Git 2.27.0. The failure bisects unsurprisingly to 968f12fda
(refs: turn on GIT_REF_PARANOIA by default, 2021-09-24). When
GIT_REF_PARANOIA is enabled, this case always fails as far back as I am
able to successfully compile and test the Git codebase.

[1] https://github.com/git-for-windows/git/issues/3781

There are two approaches to consider here. One would be to remove this
BUG() statement in favor of returning with an error. There are only two
callers to ref_transaction_create(), so this would have a limited
impact.

The other approach would be to add special casing in 'git clone' to
avoid this faulty input to the method.

While I originally started with changing 'git clone', I decided that
modifying ref_transaction_create() was a more complete solution. This
prevents failing with a BUG() statement when we already have a good way
to report an error (including a reason for that error) within the
method. Both callers properly check the return value and die() with the
error message, so this is an appropriate direction.

The added test helps check against a regression, but does check that our
intended error message is handled correctly.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoRevert "name-rev: release unused name strings"
René Scharfe [Fri, 22 Apr 2022 18:44:40 +0000 (20:44 +0200)] 
Revert "name-rev: release unused name strings"

This reverts commit 2d53975488df195e1431c3f90bfb5b60018d5bf6.

3656f84278 (name-rev: prefer shorter names over following merges,
2021-12-04) broke the assumption of 2d53975488 (name-rev: release unused
name strings, 2020-02-04) that a better name for a child is a better
name for all of its ancestors as well, because it added a penalty for
generation > 0.  This leads to strings being free(3)'d that are still
needed.

079f970971 (name-rev: sort tip names before applying, 2020-02-05)
already reduced the number of free(3) calls for the use case that
motivated the original patch (name-rev --all in the Chromium repository)
from ca. 44000 to 5, and 3656f84278 eliminated even those few.  So this
revert won't affect name-rev's performance on that particular repo.

Reported-by: Thomas Hurst <tom@hur.st>
Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agolog: "--since-as-filter" option is a non-terminating "--since" variant
Miklos Vajna [Sat, 23 Apr 2022 12:59:57 +0000 (14:59 +0200)] 
log: "--since-as-filter" option is a non-terminating "--since" variant

The "--since=<time>" option of "git log" limits the commits displayed by
the command by stopping the traversal once it sees a commit whose
timestamp is older than the given time and not digging further into its
parents.

This is OK in a history where a commit always has a newer timestamp than
any of its parents'.  Once you see a commit older than the given <time>,
all ancestor commits of it are even older than the time anyway.  It
poses, however, a problem when there is a commit with a wrong timestamp
that makes it appear older than its parents.  Stopping traversal at the
"incorrectly old" commit will hide its ancestors that are newer than
that wrong commit and are newer than the cut-off time given with the
--since option.  --max-age and --after being the synonyms to --since,
they share the same issue.

Add a new "--since-as-filter" option that is a variant of
"--since=<time>".  Instead of stopping the traversal to hide an old
enough commit and its all ancestors, exclude commits with an old
timestamp from the output but still keep digging the history.

Without other traversal stopping options, this will force the command in
"git log" family to dig down the history to the root.  It may be an
acceptable cost for a small project with short history and many commits
with screwy timestamps.

It is quite unlikely for us to add traversal stopper other than since,
so have this as a --since-as-filter option, rather than a separate
--as-filter, that would be probably more confusing.

Signed-off-by: Miklos Vajna <vmiklos@vmiklos.hu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoCI: select CC based on CC_PACKAGE (again)
Ævar Arnfjörð Bjarmason [Fri, 22 Apr 2022 09:20:53 +0000 (11:20 +0200)] 
CI: select CC based on CC_PACKAGE (again)

Fix a regression in 707d2f2fe86 (CI: use "$runs_on_pool", not
"$jobname" to select packages & config, 2021-11-23).

In that commit I changed CC=gcc from CC=gcc-9, but on OSX the "gcc" in
$PATH points to clang, we need to use gcc-9 instead. Likewise for the
linux-gcc job CC=gcc-8 was changed to the implicit CC=gcc, which would
select GCC 9.4.0 instead of GCC 8.4.0.

Furthermore in 25715419bf4 (CI: don't run "make test" twice in one
job, 2021-11-23) when the "linux-TEST-vars" job was split off from
"linux-gcc" the "cc_package: gcc-8" line was copied along with
it, so its "cc_package" line wasn't working as intended either.

As a table, this is what's changed by this commit, i.e. it only
affects the linux-gcc, linux-TEST-vars and osx-gcc jobs:

|-------------------+-----------+-------------------+-------+-------|
| jobname           | vector.cc | vector.cc_package | old   | new   |
|-------------------+-----------+-------------------+-------+-------|
| linux-clang       | clang     | -                 | clang | clang |
| linux-sha256      | clang     | -                 | clang | clang |
| linux-gcc         | gcc       | gcc-8             | gcc   | gcc-8 |
| osx-clang         | clang     | -                 | clang | clang |
| osx-gcc           | gcc       | gcc-9             | clang | gcc-9 |
| linux-gcc-default | gcc       | -                 | gcc   | gcc   |
| linux-TEST-vars   | gcc       | gcc-8             | gcc   | gcc-8 |
|-------------------+-----------+-------------------+-------+-------|

Reported-by: Carlo Arenas <carenas@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agorebase: use correct base for --keep-base when a branch is given
Alex Henrie [Thu, 21 Apr 2022 04:42:33 +0000 (22:42 -0600)] 
rebase: use correct base for --keep-base when a branch is given

--keep-base rebases onto the merge base of the given upstream and the
current HEAD regardless of whether a branch is given. This is contrary
to the documentation and to the option's intended purpose. Instead,
rebase onto the merge base of the given upstream and the given branch.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agodiff: use mks_tempfile_dt()
René Scharfe [Wed, 20 Apr 2022 20:30:10 +0000 (22:30 +0200)] 
diff: use mks_tempfile_dt()

Git uses temporary files to pass the contents of blobs to external diff
programs and textconv filters.  It calls mks_tempfile_ts() to create
them, which puts them all in the same directory.  This requires adding
a random name prefix.

Use mks_tempfile_dt() instead, which allows the files to have arbitrary
names, each in their own separate temporary directory.  This way they
can have the same basename as the original blob, which looks nicer in
graphical diff programs.

The test in t4020 to check the prettiness of the temporary paths was
neutered by 5476bdf0e8 (diff tests: don't ignore "git diff" exit code in
"read" loop, 2022-03-07), which removed its grep check without replacing
it with an equivalent test_cmp check.  Add one that only checks the
basename of the temporary file and nothing else.

And make the test more robust while at it, by using test_when_finished
to get rid of the added file even if the test fails.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agotempfile: add mks_tempfile_dt()
René Scharfe [Wed, 20 Apr 2022 20:26:09 +0000 (22:26 +0200)] 
tempfile: add mks_tempfile_dt()

Add a function to create a temporary file with a certain name in a
temporary directory created using mkdtemp(3).  Its result is more
sightly than the paths created by mks_tempfile_ts(), which include
a random prefix.  That's useful for files passed to a program that
displays their name, e.g. an external diff tool.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agocommit-graph: close file before returning NULL
Kleber Tarcísio [Mon, 18 Apr 2022 17:13:27 +0000 (17:13 +0000)] 
commit-graph: close file before returning NULL

There are two reasons that we could return NULL early within
load_commit_graph_chain():

 1. The file does not exist, so the file pointer is NULL.
 2. The file exists, but is too small to contain a single hash.

These were grouped together when the function was first written in
5c84b3396 (commit-graph: load commit-graph chains, 2019-06-18) in order
to simplify how the 'chain_name' string is freed. However, the current
code leaves a narrow window where the file pointer is not closed when
the file exists, but is rejected for being too small.

Split out these cases separately to ensure we close the file in this
case.

Signed-off-by: Kleber Tarcísio <klebertarcisio@yahoo.com.br>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agorebase: simplify an assignment of options.type in cmd_rebase
Edmundo Carmona Antoranz [Mon, 18 Apr 2022 17:27:21 +0000 (19:27 +0200)] 
rebase: simplify an assignment of options.type in cmd_rebase

There is an if statement where both if and else have the same
assignment of options.type to REBASE_MERGE. Simplify
it by getting that assigmnent out of the if.

Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoGit 2.36 v2.36.0
Junio C Hamano [Mon, 18 Apr 2022 05:21:51 +0000 (22:21 -0700)] 
Git 2.36

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge tag 'l10n-2.36.0-rnd2.1' of https://github.com/git-l10n/git-po
Junio C Hamano [Mon, 18 Apr 2022 05:20:49 +0000 (22:20 -0700)] 
Merge tag 'l10n-2.36.0-rnd2.1' of https://github.com/git-l10n/git-po

l10n-2.36.0-rnd2.1

* tag 'l10n-2.36.0-rnd2.1' of https://github.com/git-l10n/git-po:
  l10n: sv.po: Update Swedish translation (5282t0f0u)
  l10n: Update Catalan translation
  l10n: po-id for 2.36 (round 2)
  l10n: de.po: Update German translation
  l10n: zh_CN v2.36.0 round 2
  l10n: pt_PT: update Portuguese translation
  l10n: vi(5285t): v2.36.0 round 2
  l10n: zh_TW: v2.36.0 round 2
  l10n: fr: v2.36 round 2
  l10n: tr: v2.36.0 round 2
  l10n: git.pot: v2.36.0 round 2 (4 new, 3 removed)
  l10n: fr: v2.36 round 1
  l10n: zh_CN v2.36.0 round 1
  l10n: Update zh_CN repo link
  l10n: po-id for 2.36 (round 1)
  l10n: tr: v2.36.0 round 1
  l10n: git.pot: v2.36.0 round 1 (192 new, 106 removed)
  l10n: pt_PT: update TEAMS file
  l10n: pt_PT: update Portuguese translation

3 years agoMerge branch 'cb/buggy-gcc-12-workaround'
Junio C Hamano [Sun, 17 Apr 2022 23:32:05 +0000 (16:32 -0700)] 
Merge branch 'cb/buggy-gcc-12-workaround'

A couple of work around for CI breaking warnings from gcc 12.

* cb/buggy-gcc-12-workaround:
  config.mak.dev: alternative workaround to gcc 12 warning in http.c
  config.mak.dev: workaround gcc 12 bug affecting "pedantic" CI job

3 years agol10n: sv.po: Update Swedish translation (5282t0f0u)
Peter Krefting [Sun, 17 Apr 2022 17:13:34 +0000 (18:13 +0100)] 
l10n: sv.po: Update Swedish translation (5282t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
3 years agoMerge branch 'master' of github.com:Softcatala/git-po
Jiang Xin [Sun, 17 Apr 2022 01:07:28 +0000 (09:07 +0800)] 
Merge branch 'master' of github.com:Softcatala/git-po

* 'master' of github.com:Softcatala/git-po:
  l10n: Update Catalan translation

3 years agol10n: Update Catalan translation
Jordi Mas [Sat, 16 Apr 2022 18:17:17 +0000 (20:17 +0200)] 
l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>
3 years agol10n: po-id for 2.36 (round 2)
Bagas Sanjaya [Thu, 14 Apr 2022 06:40:35 +0000 (13:40 +0700)] 
l10n: po-id for 2.36 (round 2)

Translate following new components:
  * setup.c
  * split-index.c
  * strbuf.c
  * trailer.c

Also delete obsolete strings.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
3 years agoconfig.mak.dev: alternative workaround to gcc 12 warning in http.c
Carlo Marcelo Arenas Belón [Fri, 15 Apr 2022 23:13:42 +0000 (16:13 -0700)] 
config.mak.dev: alternative workaround to gcc 12 warning in http.c

This provides a "no code change needed" option to the "fix" currently
queued as part of ab/http-gcc-12-workaround and therefore should be
reverted once that gets merged.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoconfig.mak.dev: workaround gcc 12 bug affecting "pedantic" CI job
Carlo Marcelo Arenas Belón [Fri, 15 Apr 2022 23:13:41 +0000 (16:13 -0700)] 
config.mak.dev: workaround gcc 12 bug affecting "pedantic" CI job

Originally noticed by Peff[1], but yet to be corrected[2] and planned to
be released with Fedora 36 (scheduled for Apr 19).

  dir.c: In function ‘git_url_basename’:
  dir.c:3085:13: error: ‘memchr’ specified bound [9223372036854775808, 0] exceeds maximum object size 9223372036854775807 [-Werror=stringop-overread]
   3085 |         if (memchr(start, '/', end - start) == NULL
        |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fedora is used as part of the CI, and therefore that release will trigger
failures, unless the version of the image used is locked to an older
release, as an alternative.

Restricting the flag to the affected source file, as well as implementing
an independent facility to track these workarounds was specifically punted
to minimize the risk of introducing problems so close to a release.

This change should be reverted once the underlying gcc bug is solved and
which should be visible by NOT triggering a warning, otherwise.

[1] https://lore.kernel.org/git/YZQhLh2BU5Hquhpo@coredump.intra.peff.net/
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2075786

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoreftable: avoid undefined behaviour breaking t0032
Carlo Marcelo Arenas Belón [Fri, 15 Apr 2022 08:30:59 +0000 (01:30 -0700)] 
reftable: avoid undefined behaviour breaking t0032

1214aa841bc (reftable: add blocksource, an abstraction for random
access reads, 2021-10-07), makes the assumption that it is ok to
free a reftable_block pointing to NULL if the size is also set to
0, but implements that using a memset call that at least in glibc
based system will trigger a runtime exception if called with a
NULL pointer as its first parameter.

Avoid doing so by adding a conditional to check for the size in all
three identically looking functions that were affected, and therefore,
still allow memset to help catch callers that might incorrectly pass
a NULL pointer with a non zero size, but avoiding the exception for
the valid cases.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'master' of github.com:ruester/git-po-de
Jiang Xin [Fri, 15 Apr 2022 00:26:53 +0000 (08:26 +0800)] 
Merge branch 'master' of github.com:ruester/git-po-de

* 'master' of github.com:ruester/git-po-de:
  l10n: de.po: Update German translation

3 years agoMerge branch 'fz/po-2.36.0-round2' of github.com:fangyi-zhou/git-po
Jiang Xin [Fri, 15 Apr 2022 00:26:06 +0000 (08:26 +0800)] 
Merge branch 'fz/po-2.36.0-round2' of github.com:fangyi-zhou/git-po

* 'fz/po-2.36.0-round2' of github.com:fangyi-zhou/git-po:
  l10n: zh_CN v2.36.0 round 2

3 years agoMerge branch 'jc/revert-ref-transaction-hook-changes'
Junio C Hamano [Thu, 14 Apr 2022 21:17:12 +0000 (14:17 -0700)] 
Merge branch 'jc/revert-ref-transaction-hook-changes'

Revert the "deletion of a ref should not trigger transaction events
for loose and packed ref backends separately" that regresses the
behaviour when a ref is not modified since it was packed.

* jc/revert-ref-transaction-hook-changes:
  RelNotes: revert the description on the reverted topics
  Revert "fetch: increase test coverage of fetches"
  Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'"

3 years agoMerge branch 'jc/relnotes-updates'
Junio C Hamano [Thu, 14 Apr 2022 21:17:12 +0000 (14:17 -0700)] 
Merge branch 'jc/relnotes-updates'

Wording updates for 2.36 release notes.

* jc/relnotes-updates:
  RelNotes: mention safe.directory
  RelNotes: clarify "bisect run unexecutable" tweak

3 years agol10n: de.po: Update German translation
Matthias Rüster [Sat, 9 Apr 2022 15:57:47 +0000 (17:57 +0200)] 
l10n: de.po: Update German translation

Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Reviewed-by: Phillip Szelat <phillip.szelat@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
3 years agol10n: zh_CN v2.36.0 round 2
Fangyi Zhou [Thu, 14 Apr 2022 14:46:21 +0000 (15:46 +0100)] 
l10n: zh_CN v2.36.0 round 2

Signed-off-by: Fangyi Zhou <me@fangyi.io>
3 years agol10n: pt_PT: update Portuguese translation
Daniel Santos [Wed, 23 Feb 2022 19:39:47 +0000 (19:39 +0000)] 
l10n: pt_PT: update Portuguese translation

 * update the following words translations: commit, untracked, stage,
   cache, stash, work..., index, reset, label, check..., tags, graft,
   alternate object, amend, ancestor, cherry-pick, bisect, blame, chain,
   cache, bug, chunk, branch, bundle, clean, clone, commit-graph, commit
   object, commit-ish, committer, cover letter, conflict, dangling,
   detach, dir, dumb, fast-forward, file system, fixup, fork, fetch, Git
   archive, gitdir, graft, replace ref
 * correct some mispellings
 * git-po-helper update
 * remove some obsolete lines
 * unfuzzy entries
 * random translation updates
 * update contact in pt_PT.po
 * add the following words to the translation table: override, recurse,
   print, offset, unbundle, mirror repository, multi-pack, bad,
   whitespace, batch
 * remove the following words of the translation table: core Git
 * change the following words on the translation table: dry-run, apply,
   patch, replay, blame, chain, gitdir, file system, fork, unset, handle
 * some translation to the first person
 * update copyright text
 * word 'utilização:' to 'uso:'
 * word 'pai' to 'parente'

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
3 years agol10n: vi(5285t): v2.36.0 round 2
Tran Ngoc Quan [Thu, 14 Apr 2022 06:58:46 +0000 (13:58 +0700)] 
l10n: vi(5285t): v2.36.0 round 2

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
3 years agoMerge branch 'loc/tw/0407' of github.com:l10n-tw/git-po
Jiang Xin [Thu, 14 Apr 2022 05:13:38 +0000 (13:13 +0800)] 
Merge branch 'loc/tw/0407' of github.com:l10n-tw/git-po

* 'loc/tw/0407' of github.com:l10n-tw/git-po:
  l10n: zh_TW: v2.36.0 round 2

3 years agol10n: zh_TW: v2.36.0 round 2
Yi-Jyun Pan [Thu, 7 Apr 2022 06:30:49 +0000 (14:30 +0800)] 
l10n: zh_TW: v2.36.0 round 2

Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
3 years agoRelNotes: revert the description on the reverted topics
Junio C Hamano [Wed, 13 Apr 2022 23:55:36 +0000 (16:55 -0700)] 
RelNotes: revert the description on the reverted topics

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoRelNotes: mention safe.directory
Junio C Hamano [Wed, 13 Apr 2022 23:51:41 +0000 (16:51 -0700)] 
RelNotes: mention safe.directory

Helped-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoRelNotes: clarify "bisect run unexecutable" tweak
Junio C Hamano [Wed, 13 Apr 2022 23:42:33 +0000 (16:42 -0700)] 
RelNotes: clarify "bisect run unexecutable" tweak

We do not have to guess how common the mistake the change targets is
when describing it.  Such an argument may be good while proposing a
change, but does not quite belong in the record of what has already
happened, i.e. a release note.

Helped-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoRevert "fetch: increase test coverage of fetches"
Junio C Hamano [Wed, 13 Apr 2022 22:58:04 +0000 (15:58 -0700)] 
Revert "fetch: increase test coverage of fetches"

This reverts commit 2a0cafd464709cfa22fe7249290c644a2a26c520,
as it expects a working "a ref deletion must produce a single
transaction, not one for loose and another for packed" topic,
which we do not have.

3 years agoRevert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'"
Junio C Hamano [Wed, 13 Apr 2022 22:51:33 +0000 (15:51 -0700)] 
Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'"

This reverts commit 991b4d47f0accd3955d05927d5ce434e03ffbdb6, reversing
changes made to bcd020f88e1e22f38422ac3f73ab06b34ec4bef1.