]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
3 years agopo/git.pot: don't check in result of "make pot"
Ævar Arnfjörð Bjarmason [Thu, 26 May 2022 14:50:32 +0000 (22:50 +0800)] 
po/git.pot: don't check in result of "make pot"

Remove the "po/git.pot" file from being tracked, which started with
dce37b66fb0 (l10n: initial git.pot for 1.7.10 upcoming release,
2012-02-13).

The reason the po/git.pot started being checked in was because the
po/*.po files were changed a schema where we'd generate them from a
known-good snapshot of po/git.pot, instead of each translator running
"make pot" themselves.

This makes sense, but we don't need to carry this file in-tree just to
achieve that aim, and doing so has resulted in a significant amount of
"diff churn" since this method of doing it was introduced:

    $ git log -p --oneline -- po/git.pot|wc -l
    553743

We can instead let l10n contributors to generate "po/git.pot" in runtime
to update their own "po/XX.po", and the l10n coordinator can check
pull requests using CI pipeline.

This reverts to the schema introduced initially in cd5513a7168 (i18n:
Makefile: "pot" target to extract messages marked for translation,
2011-02-22).

The actual "git rm" of po/git.pot was in preceding commit to make this
change easier to review, and to preempt the mailing list from blocking
it due to it being too large.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agopo/git.pot: this is now a generated file
Jiang Xin [Thu, 26 May 2022 14:50:31 +0000 (22:50 +0800)] 
po/git.pot: this is now a generated file

We no longer keep track of the contents of this file.

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMakefile: remove duplicate and unwanted files in FOUND_SOURCE_FILES
Jiang Xin [Thu, 26 May 2022 14:50:30 +0000 (22:50 +0800)] 
Makefile: remove duplicate and unwanted files in FOUND_SOURCE_FILES

We get source files saved in "$(FOUND_SOURCE_FILES)" by running the
command "git ls-files" or the command "find". We tried to have the
both commands return the same list of files, but apparently the "find"
command will return more files, such as the generated headers. We can
filter out these generated headers to get closer results.

In addition to this, "$(FOUND_SOURCE_FILES)" may contain duplicate
files. E.g. "git-ls-files" may have duplicate entries for the same file
in different staging areas if there are unresolved conflicts in the
working tree. For this case, we can reduce duplicate entries by passing
the option "--deduplicate" to git-ls-files.

Junio reported that when running "make" in a working tree with
unresolved conflicts, "make" may report warnings like below:

    Makefile:xxxx: target '.build/pot/po/FOO.c.po' given more than once
                   in the same rule

The duplicate targets are introduced by the following pattern rule we
added in the preceding commit for incremental build of "po/git.pot".

    $(LOCALIZED_C_GEN_PO): .build/pot/po/%.po: %

Although we have resolved this issue by sorting to create a unique
$(LOCALIZED_C), other targets may benefit from this. Such as: tags,
cscope.out, etc.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoi18n CI: stop allowing non-ASCII source messages in po/git.pot
Ævar Arnfjörð Bjarmason [Thu, 26 May 2022 14:50:29 +0000 (22:50 +0800)] 
i18n CI: stop allowing non-ASCII source messages in po/git.pot

In the preceding commit we moved away from using xgettext(1) to both
generate the po/git.pot, and to merge the incrementally generated
po/git.pot+ file as we sourced translations from C, shell and Perl.

Doing it this way, which dates back to my initial
implementation[1][2][3] was conflating two things: With xgettext(1)
the --from-code both controls what encoding is specified in the
po/git.pot's header, and what encoding we allow in source messages.

We don't ever want to allow non-ASCII in *source messages*, and doing
so has hid e.g. a buggy message introduced in
a6226fd772b (submodule--helper: convert the bulk of cmd_add() to C,
2021-08-10) from us, we'd warn about it before, but only when running
"make pot", but the operation would still succeed. Now we'll error out
on it when running "make pot".

Since the preceding Makefile changes made this easy: let's add a "make
check-pot" target with the same prerequisites as the "po/git.pot"
target, but without changing the file "po/git.pot". Running it as part
of the "static-analysis" CI target will ensure that we catch any such
issues in the future. E.g.:

    $ make check-pot
        XGETTEXT .build/pot/po/builtin/submodule--helper.c.po
    xgettext: Non-ASCII string at builtin/submodule--helper.c:3381.
              Please specify the source encoding through --from-code.
    make: *** [.build/pot/po/builtin/submodule--helper.c.po] Error 1

1. cd5513a7168 (i18n: Makefile: "pot" target to extract messages
   marked for translation, 2011-02-22)
2. adc3b2b2767 (Makefile: add xgettext target for *.sh files,
   2011-05-14)
3. 5e9637c6297 (i18n: add infrastructure for translating Git with
   gettext, 2011-11-18)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMakefile: have "make pot" not "reset --hard"
Ævar Arnfjörð Bjarmason [Thu, 26 May 2022 14:50:28 +0000 (22:50 +0800)] 
Makefile: have "make pot" not "reset --hard"

Before commit fc0fd5b23b (Makefile: help gettext tools to cope with our
custom PRItime format, 2017-07-20), we'd consider source files as-is
with gettext, but because we need to understand PRItime in the same way
that gettext itself understands PRIuMAX, we'd first check if we had a
clean checkout, then munge all of the processed files in-place with
"sed", generate "po/git.pot", and then finally "reset --hard" to undo
our changes.

By generating "pot" snippets in ".build/pot/po" for each source file
and rewriting certain source files with PRItime macros to temporary
files in ".build/pot/po", we can avoid running "make pot" by altering
files in place and doing a "reset --hard" afterwards.

This speed of "make pot" is slower than before on an initial run,
because we run "xgettext" many times (once per source file), but it
can be boosted by parallelization. It is *much* faster for incremental
runs, and will allow us to implement related targets in subsequent
commits.

When the "pot" target was originally added in cd5513a7168 (i18n:
Makefile: "pot" target to extract messages marked for translation,
2011-02-22) it behaved like a "normal" target. I.e. we'd skip the
re-generation of the po/git.pot if nothing had to be done.

Then after po/git.pot was checked in in dce37b66fb0 (l10n: initial
git.pot for 1.7.10 upcoming release, 2012-02-13) the target was broken
until 1f31963e921 (i18n: treat "make pot" as an explicitly-invoked
target, 2014-08-22) when it was made to depend on "FORCE". I.e. the
Makefile's dependency resolution inherently can't handle incremental
building when the target file may be updated by git (or something else
external to "make"). But this case no longer applies, so FORCE is no
longer needed.

That out of the way, the main logic change here is getting rid of the
"reset --hard":

We'll generate intermediate ".build/pot/po/%.po" files from "%", which
is handy to see at a glance what strings (if any) in a given file are
marked for translation:

$ make .build/pot/po/pretty.c.po
[...]
$ cat .build/pot/po/pretty.c.po
#: pretty.c:1051
msgid "unable to parse --pretty format"
msgstr ""
$

For these C source files which contain the PRItime macros, we will
create temporary munged "*.c" files in a tree in ".build/pot/po"
corresponding to our source tree, and have "xgettext" consider those.
The rule needs to be careful to "(cd .build/pot/po && ...)", because
otherwise the comments in the po/git.pot file wouldn't refer to the
correct source locations (they'd be prefixed with ".build/pot/po").
These temporary munged "*.c” files will be removed immediately after
the corresponding po files are generated, because some development tools
cannot ignore the duplicate source files in the ".build" directory
according to the ".gitignore" file, and that may cause trouble.

The output of the generated po/git.pot file is changed in one minor
way: Because we're using msgcat(1) instead of xgettext(1) to
concatenate the output we'll now disambiguate where "TRANSLATORS"
comments come from, in cases where a message is the same in N files,
and either only one has a "TRANSLATORS" comment, or they're
different. E.g. for the "Your edited hunk[...]" message we'll now
apply this change (comment content elided):

+#. #-#-#-#-#  add-patch.c.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
[...]
+#. #-#-#-#-#  git-add--interactive.perl.po  #-#-#-#-#
 #. TRANSLATORS: do not translate [y/n]
[...]
 #: add-patch.c:1253 git-add--interactive.perl:1244
 msgid ""
 "Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
 msgstr ""

There are six such changes, and they all make the context more
understandable, as msgcat(1) is better at handling these edge cases
than xgettext(1)'s previously used "--join-existing" flag.

But filenames in the above disambiguation lines of extracted-comments
have an extra ".po" extension compared to the filenames at the file
locations. While we could rename the intermediate ".build/pot/po/%.po"
files without the ".po" extension to use more intuitive filenames in
the disambiguation lines of extracted-comments, but that will confuse
developer tools with lots of invalid C or other source files in
".build/pot/po" directory.

The addition of "--omit-header" option for xgettext makes the "pot"
snippets in ".build/pot/po/*.po" smaller. But as we'll see in a
subsequent commit this header behavior has been hiding an
encoding-related bug from us, so let's carry it forward instead of
re-generating it with xgettext(1).

The "po/git.pot" file should have a header entry, because a proper
header entry will increase the speed of creating a new po file using
msginit and set a proper "POT-Creation-Date:" field in the header
entry of a "po/XX.po" file. We use xgettext to generate a separate
header file at ".build/pot/git.header" from "/dev/null", and use this
header to assemble "po/git.pot".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMakefile: generate "po/git.pot" from stable LOCALIZED_C
Jiang Xin [Thu, 26 May 2022 14:50:27 +0000 (22:50 +0800)] 
Makefile: generate "po/git.pot" from stable LOCALIZED_C

Different users may generate a different message template file
"po/git.pot". This is because the POT file is generated from
"$(LOCALIZED_C)", which is supposed to list all the sources that we
extract the strings to be translated from. But "$(LOCALIZED_C)"
includes "$(C_OBJ)", which only lists the source files used in the
current build for a specific platform and specific compiler
conditions.

Instead of using "$(C_OBJ)", we use "$(FOUND_C_SOURCES)", which lists
all source files we keep track of (or ship in a tarball extract), to
form a stable "LOCALIZED_C". We also add "$(SCALAR_SOURCES)", which
is part of "$(C_OBJ)" but not included in "$(FOUND_C_SOURCES)".

With this update, the newly generated "po/git.pot" will have 30 new
entries coming from the following C source files:

 * compat/fsmonitor/fsm-listen-win32.c
 * compat/mingw.c
 * compat/regex/regcomp.c
 * compat/simple-ipc/ipc-win32.c

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMakefile: sort source files before feeding to xgettext
Jiang Xin [Thu, 26 May 2022 14:50:26 +0000 (22:50 +0800)] 
Makefile: sort source files before feeding to xgettext

We will feed xgettext with more C source files and in different order
in subsequent commit. To generate a stable "po/git.pot" regardless of
the number and order of input source files, we sort the c, perl, and
shell source files in groups before feeding them to xgettext.

Ævar suggested that we should not pass the option "--sort-by-file" to
xgettext to sort the translatable strings, as it will mix the three
groups of source files (c, perl and shell) in the file "po/git.pot",
and change the order of translatable strings in the same line of a file.

With this update, the newly generated "po/git.pot" will have the same
entries while in a different order.

With the help of a custom diff driver as shown below,

    git config --global diff.gettext-fmt.textconv \
        "msgcat --no-location --sort-by-file"

and appending a new entry "*.pot diff=gettext-fmt" to git attributes,
we can see that there are no substantial changes in "po/git.pot".

We won't checkin the newly generated "po/git.pot", because we will
remove it from tree in a later commit.

Suggested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.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 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.

3 years agoSync with Git 2.35.3
Junio C Hamano [Wed, 13 Apr 2022 22:26:32 +0000 (15:26 -0700)] 
Sync with Git 2.35.3

3 years agoGit 2.35.3 v2.35.3
Junio C Hamano [Wed, 13 Apr 2022 22:21:34 +0000 (15:21 -0700)] 
Git 2.35.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoGit 2.34.3 v2.34.3
Junio C Hamano [Wed, 13 Apr 2022 22:21:31 +0000 (15:21 -0700)] 
Git 2.34.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoGit 2.33.3 v2.33.3
Junio C Hamano [Wed, 13 Apr 2022 22:21:28 +0000 (15:21 -0700)] 
Git 2.33.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoGit 2.32.2 v2.32.2
Junio C Hamano [Wed, 13 Apr 2022 22:21:26 +0000 (15:21 -0700)] 
Git 2.32.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoGit 2.31.3 v2.31.3
Junio C Hamano [Wed, 13 Apr 2022 22:21:08 +0000 (15:21 -0700)] 
Git 2.31.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoGit 2.30.4 v2.30.4
Junio C Hamano [Wed, 13 Apr 2022 20:31:29 +0000 (13:31 -0700)] 
Git 2.30.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosetup: opt-out of check with safe.directory=*
Derrick Stolee [Wed, 13 Apr 2022 15:32:31 +0000 (15:32 +0000)] 
setup: opt-out of check with safe.directory=*

With the addition of the safe.directory in 8959555ce
(setup_git_directory(): add an owner check for the top-level directory,
2022-03-02) released in v2.35.2, we are receiving feedback from a
variety of users about the feature.

Some users have a very large list of shared repositories and find it
cumbersome to add this config for every one of them.

In a more difficult case, certain workflows involve running Git commands
within containers. The container boundary prevents any global or system
config from communicating `safe.directory` values from the host into the
container. Further, the container almost always runs as a different user
than the owner of the directory in the host.

To simplify the reactions necessary for these users, extend the
definition of the safe.directory config value to include a possible '*'
value. This value implies that all directories are safe, providing a
single setting to opt-out of this protection.

Note that an empty assignment of safe.directory clears all previous
values, and this is already the case with the "if (!value || !*value)"
condition.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosetup: fix safe.directory key not being checked
Matheus Valadares [Wed, 13 Apr 2022 15:32:30 +0000 (15:32 +0000)] 
setup: fix safe.directory key not being checked

It seems that nothing is ever checking to make sure the safe directories
in the configs actually have the key safe.directory, so some unrelated
config that has a value with a certain directory would also make it a
safe directory.

Signed-off-by: Matheus Valadares <me@m28.io>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agot0033: add tests for safe.directory
Derrick Stolee [Wed, 13 Apr 2022 15:32:29 +0000 (15:32 +0000)] 
t0033: add tests for safe.directory

It is difficult to change the ownership on a directory in our test
suite, so insert a new GIT_TEST_ASSUME_DIFFERENT_OWNER environment
variable to trick Git into thinking we are in a differently-owned
directory. This allows us to test that the config is parsed correctly.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agol10n: fr: v2.36 round 2
Jean-Noël Avila [Wed, 13 Apr 2022 19:21:48 +0000 (21:21 +0200)] 
l10n: fr: v2.36 round 2

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
3 years agol10n: tr: v2.36.0 round 2
Emir SARI [Wed, 13 Apr 2022 10:28:58 +0000 (13:28 +0300)] 
l10n: tr: v2.36.0 round 2

Signed-off-by: Emir SARI <emir_sari@icloud.com>
3 years agol10n: git.pot: v2.36.0 round 2 (4 new, 3 removed)
Jiang Xin [Wed, 13 Apr 2022 06:55:25 +0000 (14:55 +0800)] 
l10n: git.pot: v2.36.0 round 2 (4 new, 3 removed)

Generate po/git.pot from v2.36.0-rc2 for git v2.36.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
3 years agoMerge branch 'master' of github.com:git/git
Jiang Xin [Wed, 13 Apr 2022 06:51:53 +0000 (14:51 +0800)] 
Merge branch 'master' of github.com:git/git

* 'master' of github.com:git/git: (25 commits)
  Git 2.36-rc2
  i18n: fix some badly formatted i18n strings
  Git 2.36-rc1
  t9902: split test to run on appropriate systems
  ls-tree doc: document interaction with submodules
  Documentation: add --batch-command to cat-file synopsis
  git-ls-tree.txt: fix the name of "%(objectsize:padded)"
  submodule-helper: fix usage string
  doc: replace "--" with {litdd} in credential-cache/fsmonitor
  contrib/scalar: fix 'all' target in Makefile
  Documentation/Makefile: fix "make info" regression in dad9cd7d518
  configure.ac: fix HAVE_SYNC_FILE_RANGE definition
  git-compat-util: really support openssl as a source of entropy
  ls-tree: `-l` should not imply recursive listing
  Git 2.35.2
  Git 2.34.2
  Git 2.33.2
  Git 2.32.1
  Git 2.31.2
  Git 2.30.3
  ...

3 years agoGit 2.36-rc2 v2.36.0-rc2
Junio C Hamano [Tue, 12 Apr 2022 04:27:02 +0000 (21:27 -0700)] 
Git 2.36-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'ja/i18n-fix-for-2.36'
Junio C Hamano [Mon, 11 Apr 2022 23:45:17 +0000 (16:45 -0700)] 
Merge branch 'ja/i18n-fix-for-2.36'

Fixes to some localizable strings.

* ja/i18n-fix-for-2.36:
  i18n: fix some badly formatted i18n strings

3 years agoMerge tag 'v2.35.2'
Junio C Hamano [Mon, 11 Apr 2022 23:44:45 +0000 (16:44 -0700)] 
Merge tag 'v2.35.2'

3 years agoi18n: fix some badly formatted i18n strings
Jean-Noël Avila [Mon, 11 Apr 2022 19:23:30 +0000 (19:23 +0000)] 
i18n: fix some badly formatted i18n strings

String in submodule--helper is not correctly formatting
placeholders. The string in git-send-email is partial.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'fr_2.36_rnd1' of github.com:jnavila/git
Jiang Xin [Mon, 11 Apr 2022 00:48:13 +0000 (08:48 +0800)] 
Merge branch 'fr_2.36_rnd1' of github.com:jnavila/git

* 'fr_2.36_rnd1' of github.com:jnavila/git:
  l10n: fr: v2.36 round 1

3 years agoMerge branch 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po
Jiang Xin [Mon, 11 Apr 2022 00:47:13 +0000 (08:47 +0800)] 
Merge branch 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po

* 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po:
  l10n: zh_CN v2.36.0 round 1
  l10n: Update zh_CN repo link

3 years agol10n: fr: v2.36 round 1
Jean-Noël Avila [Sat, 9 Apr 2022 16:53:27 +0000 (18:53 +0200)] 
l10n: fr: v2.36 round 1

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
3 years agoGit 2.36-rc1 v2.36.0-rc1
Junio C Hamano [Fri, 8 Apr 2022 20:54:49 +0000 (13:54 -0700)] 
Git 2.36-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'ld/sparse-index-bash-completion'
Junio C Hamano [Fri, 8 Apr 2022 20:53:48 +0000 (13:53 -0700)] 
Merge branch 'ld/sparse-index-bash-completion'

Test regression fix.

* ld/sparse-index-bash-completion:
  t9902: split test to run on appropriate systems

3 years agoMerge branch 'tl/ls-tree-oid-only'
Junio C Hamano [Fri, 8 Apr 2022 20:53:48 +0000 (13:53 -0700)] 
Merge branch 'tl/ls-tree-oid-only'

Docfix.

* tl/ls-tree-oid-only:
  ls-tree doc: document interaction with submodules

3 years agot9902: split test to run on appropriate systems
Adam Dinwoodie [Fri, 8 Apr 2022 09:53:53 +0000 (10:53 +0100)] 
t9902: split test to run on appropriate systems

The "FUNNYNAMES" test prerequisite passes on Cygwin, as the Cygwin
file system interface has a workaround for the underlying operating
system's lack of support for tabs, newlines or quotes.  However, it does
not add support for backslash, which is treated as a directory
separator, meaning one of the tests added by 48803821b1 ("completion:
handle unusual characters for sparse-checkout", 2022-02-07) will fail on
Cygwin.

To avoid this failure while still getting maximal test coverage, split
that test into two: test handling of paths that include tabs on anything
that has the FUNNYNAMES prerequisite, but skip testing handling of paths
that include backslashes unless both FUNNYNAMES is set and the system is
not Cygwin.

It might be nice to have more granularity than "FUNNYNAMES" and its
sibling "FUNNIERNAMES" provide, so that tests could be run based on
specific individual characters supported by the file system being
tested, but that seems like it would make the prerequisite checks in
this area much more verbose for very little gain.

Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agols-tree doc: document interaction with submodules
Ævar Arnfjörð Bjarmason [Fri, 8 Apr 2022 16:00:25 +0000 (18:00 +0200)] 
ls-tree doc: document interaction with submodules

The ls-tree documentation had never been updated after it learned to
interact with submodules to explicitly mention them. The initial
support was added in f35a6d3bce7 (Teach core object handling functions
about gitlinks, 2007-04-09). E.g. the discussion of --long added in
f35a6d3bce7 (Teach core object handling functions about gitlinks,
2007-04-09) didn't explicitly mention them.

But this documentation added in 455923e0a15 (ls-tree: introduce
"--format" option, 2022-03-23) had no such excuse, and was actively
misleading by providing an exhaustive but incomplete list of object
types we'd emit.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agol10n: zh_CN v2.36.0 round 1
Fangyi Zhou [Wed, 6 Apr 2022 09:39:20 +0000 (10:39 +0100)] 
l10n: zh_CN v2.36.0 round 1

Reviewed-by: 依云 <lilydjwg@gmail.com>
Signed-off-by: Fangyi Zhou <me@fangyi.io>
3 years agol10n: Update zh_CN repo link
Fangyi Zhou [Wed, 6 Apr 2022 09:41:07 +0000 (10:41 +0100)] 
l10n: Update zh_CN repo link

Signed-off-by: Fangyi Zhou <me@fangyi.io>
3 years agoMerge branch 'jc/cat-file-batch-commands'
Junio C Hamano [Thu, 7 Apr 2022 22:04:19 +0000 (15:04 -0700)] 
Merge branch 'jc/cat-file-batch-commands'

Doc fix.

* jc/cat-file-batch-commands:
  Documentation: add --batch-command to cat-file synopsis

3 years agoDocumentation: add --batch-command to cat-file synopsis
Ævar Arnfjörð Bjarmason [Thu, 7 Apr 2022 19:08:59 +0000 (21:08 +0200)] 
Documentation: add --batch-command to cat-file synopsis

440c705ea63 (cat-file: add --batch-command mode, 2022-02-18) added
the new option and operating mode without listing it to the synopsis
section.  Fix it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'tz/doc-litdd-fixes'
Junio C Hamano [Thu, 7 Apr 2022 19:23:47 +0000 (12:23 -0700)] 
Merge branch 'tz/doc-litdd-fixes'

Documentation markup fix.

* tz/doc-litdd-fixes:
  doc: replace "--" with {litdd} in credential-cache/fsmonitor

3 years agoMerge branch 'js/apply-partial-clone-filters-recursively'
Junio C Hamano [Thu, 7 Apr 2022 19:23:31 +0000 (12:23 -0700)] 
Merge branch 'js/apply-partial-clone-filters-recursively'

Typofix

* js/apply-partial-clone-filters-recursively:
  submodule-helper: fix usage string

3 years agoMerge branch 'tl/ls-tree-oid-only'
Junio C Hamano [Thu, 7 Apr 2022 19:23:23 +0000 (12:23 -0700)] 
Merge branch 'tl/ls-tree-oid-only'

* tl/ls-tree-oid-only:
  git-ls-tree.txt: fix the name of "%(objectsize:padded)"

3 years agogit-ls-tree.txt: fix the name of "%(objectsize:padded)"
Martin Ågren [Thu, 7 Apr 2022 15:52:31 +0000 (17:52 +0200)] 
git-ls-tree.txt: fix the name of "%(objectsize:padded)"

Commit 455923e0a1 ("ls-tree: introduce "--format" option", 2022-03-23)
introduced `--format` and the various placeholders it can take, such as
%(objectname) and %(objectsize).

At some point when that patch was being developed, those placeholders
had shorter names, e.g., %(name) and %(size), which can be seen in the
commit message of 455923e0a1. One instance of "%(size:padded)" also
managed to enter the documentation in the final version of the patch.
Correct it to "%(objectsize:padded)".

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agosubmodule-helper: fix usage string
Fangyi Zhou [Wed, 6 Apr 2022 20:32:57 +0000 (21:32 +0100)] 
submodule-helper: fix usage string

The missing space at the end of the line makes the closing square
bracket sticking to the dash in the next line

Found during localisation v2.36.0 round 1

Signed-off-by: Fangyi Zhou <me@fangyi.io>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agol10n: po-id for 2.36 (round 1)
Bagas Sanjaya [Wed, 9 Mar 2022 08:00:50 +0000 (15:00 +0700)] 
l10n: po-id for 2.36 (round 1)

Update following components:

  * add-interactive.c
  * branch.c
  * config.c
  * help.c
  * merge-ort-wrappers.c
  * builtin/bisect--helper.c
  * builtin/branch.c
  * builtin/cat-file.c
  * builtin/checkout.c
  * builtin/clone.c
  * builtin/config.c
  * builtin/reflog.c
  * builtin/remote.c
  * builtin/sparse-checkout.c
  * builtin/submodule--helper.c
  * builtin/unpack-objects.c

Translate following new components:
  * connect.c
  * connected.c
  * date.c
  * hook.c
  * files-backend.c
  * ident.c
  * merge-ort.c
  * merge-recursive.c
  * refs.c
  * refspec.c
  * revision.c
  * symlinks.c
  * worktree.c
  * builtin/notes.c
  * builtin/multi-pack-index.c
  * builtin/commit.c
  * builtin/merge-base.c

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
3 years agodoc: replace "--" with {litdd} in credential-cache/fsmonitor
Todd Zullinger [Wed, 6 Apr 2022 18:41:22 +0000 (14:41 -0400)] 
doc: replace "--" with {litdd} in credential-cache/fsmonitor

Asciidoc renders `--` as em-dash.  This is not appropriate for command
names.  It also breaks linkgit links to these commands.

Fix git-credential-cache--daemon and git-fsmonitor--daemon.  The latter
was added 3248486920 (fsmonitor: document builtin fsmonitor, 2022-03-25)
and included several links.  A check for broken links in the HTML docs
turned this up.

Manually inspecting the other Documentation/git-*--*.txt files turned up
the issue in git-credential-cache--daemon.

While here, quote `git credential-cache--daemon` in the synopsis to
match the vast majority of our other documentation.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'tl/ls-tree-oid-only'
Junio C Hamano [Wed, 6 Apr 2022 22:21:59 +0000 (15:21 -0700)] 
Merge branch 'tl/ls-tree-oid-only'

"git ls-tree" learns "--oid-only" option, similar to "--name-only",
and more generalized "--format" option.
source: <cover.1648026472.git.dyroneteng@gmail.com>

* tl/ls-tree-oid-only:
  ls-tree: `-l` should not imply recursive listing

3 years agoMerge branch 'bc/csprng-mktemps'
Junio C Hamano [Wed, 6 Apr 2022 22:21:58 +0000 (15:21 -0700)] 
Merge branch 'bc/csprng-mktemps'

Build fix.

* bc/csprng-mktemps:
  git-compat-util: really support openssl as a source of entropy

3 years agoMerge branch 'ns/core-fsyncmethod'
Junio C Hamano [Wed, 6 Apr 2022 22:21:58 +0000 (15:21 -0700)] 
Merge branch 'ns/core-fsyncmethod'

A couple of fix-up to a topic that is now in 'master'.
source: <pull.1193.git.1648663716891.gitgitgadget@gmail.com>

* ns/core-fsyncmethod:
  configure.ac: fix HAVE_SYNC_FILE_RANGE definition

3 years agoMerge branch 'ab/make-optim-noop'
Junio C Hamano [Wed, 6 Apr 2022 22:21:58 +0000 (15:21 -0700)] 
Merge branch 'ab/make-optim-noop'

A micro fix to a topic earlier merged to 'master'
source: <patch-1.1-05949221e3f-20220319T002715Z-avarab@gmail.com>

* ab/make-optim-noop:
  contrib/scalar: fix 'all' target in Makefile
  Documentation/Makefile: fix "make info" regression in dad9cd7d518

3 years agocontrib/scalar: fix 'all' target in Makefile
Victoria Dye [Tue, 5 Apr 2022 22:35:36 +0000 (22:35 +0000)] 
contrib/scalar: fix 'all' target in Makefile

Add extra ':' to second 'all' target definition to allow 'scalar' to build.
Without this fix, the 'all:' and 'all::' targets together cause a build
failure when 'scalar' build is enabled with 'INCLUDE_SCALAR':

    Makefile:14: *** target file `all' has both : and :: entries.  Stop.

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoDocumentation/Makefile: fix "make info" regression in dad9cd7d518
Ævar Arnfjörð Bjarmason [Tue, 5 Apr 2022 19:56:20 +0000 (21:56 +0200)] 
Documentation/Makefile: fix "make info" regression in dad9cd7d518

Fix a regression in my dad9cd7d518 (Makefile: move ".SUFFIXES" rule to
shared.mak, 2022-03-03). As explained in the GNU make documentation
for the $* variable, available at:

info make --index-search='$*'

This rule relied on ".texi" being in the default list of suffixes, as
seen at:

make -f/dev/null -p | grep -v -e ^# -e ^$|grep -F .SUFFIXES

The documentation explains what was going on here:

In an explicit rule, there is no stem; so '$*' cannot be determined
in that way.  Instead, if the target name ends with a recognized
suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), '$*' is
set to the target name minus the suffix.  For example, if the
target name is 'foo.c', then '$*' is set to 'foo', since '.c' is a
suffix.  GNU 'make' does this bizarre thing only for compatibility
with other implementations of 'make'.  You should generally avoid
using '$*' except in implicit rules or static pattern rules.

If the target name in an explicit rule does not end with a
recognized suffix, '$*' is set to the empty string for that rule.

I.e. this rule added back in 5cefc33bffd (Documentation: add
gitman.info target, 2007-12-10) was resolving gitman.texi from
gitman.info. We can instead just use the more obvious $< variable
referring to the prerequisite.

This was the only use of $* in our Makefiles in an explicit rule, the
three remaining ones are all implicit rules, and therefore didn't
depend on the ".SUFFIXES" list.

Reported-by: Adam Dinwoodie <adam@dinwoodie.org>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Tested-by: Adam Dinwoodie <adam@dinwoodie.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoconfigure.ac: fix HAVE_SYNC_FILE_RANGE definition
Adam Dinwoodie [Tue, 5 Apr 2022 10:00:20 +0000 (11:00 +0100)] 
configure.ac: fix HAVE_SYNC_FILE_RANGE definition

If sync_file_range is not available when building the configure script,
there is a cosmetic bug when running that script reporting
"HAVE_SYNC_FILE_RANGE: command not found".  Remove that error message by
defining HAVE_SYNC_FILE_RANGE to an empty string, rather than generating
a script where that appears as a bare command.

Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agogit-compat-util: really support openssl as a source of entropy
Carlo Marcelo Arenas Belón [Tue, 5 Apr 2022 04:28:26 +0000 (21:28 -0700)] 
git-compat-util: really support openssl as a source of entropy

05cd988dce5 (wrapper: add a helper to generate numbers from a CSPRNG,
2022-01-17), configure openssl as the source for entropy in NON-STOP
but doesn't add the needed header or link options.

Since the only system that is configured to use openssl as a source
of entropy is NON-STOP, add the header unconditionally, and -lcrypto
to the list of external libraries.

An additional change is required to make sure a NO_OPENSSL=1 build
will be able to work as well (tested on Linux with a modified value
of CSPRNG_METHOD = openssl), and the more complex logic that allows
for compatibility with APPLE_COMMON_CRYPTO or allowing for simpler
ways to link (without libssl) has been punted for now.

Reported-by: Randall Becker <rsbecker@nexbridge.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agols-tree: `-l` should not imply recursive listing
Josh Steadmon [Mon, 4 Apr 2022 22:42:24 +0000 (15:42 -0700)] 
ls-tree: `-l` should not imply recursive listing

In 9c4d58ff2c (ls-tree: split up "fast path" callbacks, 2022-03-23), a
refactoring of the various read_tree_at() callbacks caused us to
unconditionally recurse into directories if `-l` (long format) was
passed on the command line, regardless of whether or not we also pass
the `-r` (recursive) flag.

Fix this by making show_tree_long() return the value of `recurse`,
rather than always returning 1. This value is interpreted by
read_tree_at() to be a signal on whether or not to recurse.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agol10n: tr: v2.36.0 round 1
Emir SARI [Wed, 6 Apr 2022 09:49:32 +0000 (12:49 +0300)] 
l10n: tr: v2.36.0 round 1

Signed-off-by: Emir SARI <emir_sari@icloud.com>
3 years agol10n: git.pot: v2.36.0 round 1 (192 new, 106 removed)
Jiang Xin [Wed, 6 Apr 2022 06:35:30 +0000 (14:35 +0800)] 
l10n: git.pot: v2.36.0 round 1 (192 new, 106 removed)

Generate po/git.pot from v2.36.0-rc0 for git v2.36.0 l10n round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
3 years agoMerge branch 'master' of github.com:git-l10n/git-po
Jiang Xin [Wed, 6 Apr 2022 06:39:54 +0000 (14:39 +0800)] 
Merge branch 'master' of github.com:git-l10n/git-po

* 'master' of github.com:git-l10n/git-po:
  l10n: pt_PT: update TEAMS file
  l10n: pt_PT: update Portuguese translation

3 years agoGit 2.36-rc0 v2.36.0-rc0
Junio C Hamano [Mon, 4 Apr 2022 17:24:07 +0000 (10:24 -0700)] 
Git 2.36-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoMerge branch 'pw/worktree-list-with-z'
Junio C Hamano [Mon, 4 Apr 2022 17:56:25 +0000 (10:56 -0700)] 
Merge branch 'pw/worktree-list-with-z'

"git worktree list --porcelain" did not c-quote pathnames and lock
reasons with unsafe bytes correctly, which is worked around by
introducing NUL terminated output format with "-z".

* pw/worktree-list-with-z:
  worktree: add -z option for list subcommand

3 years agoMerge branch 'jc/coding-guidelines-decl-in-for-loop'
Junio C Hamano [Mon, 4 Apr 2022 17:56:24 +0000 (10:56 -0700)] 
Merge branch 'jc/coding-guidelines-decl-in-for-loop'

Coding Guidelines clarification.

* jc/coding-guidelines-decl-in-for-loop:
  CodingGuidelines: give deadline for "for (int i = 0; ..."

3 years agoMerge branch 'vd/mv-refresh-stat'
Junio C Hamano [Mon, 4 Apr 2022 17:56:24 +0000 (10:56 -0700)] 
Merge branch 'vd/mv-refresh-stat'

"git mv" failed to refresh the cached stat information for the
entry it moved.

* vd/mv-refresh-stat:
  mv: refresh stat info for moved entry

3 years agoMerge branch 'jh/builtin-fsmonitor-part2'
Junio C Hamano [Mon, 4 Apr 2022 17:56:24 +0000 (10:56 -0700)] 
Merge branch 'jh/builtin-fsmonitor-part2'

Built-in fsmonitor (part 2).

* jh/builtin-fsmonitor-part2: (30 commits)
  t7527: test status with untracked-cache and fsmonitor--daemon
  fsmonitor: force update index after large responses
  fsmonitor--daemon: use a cookie file to sync with file system
  fsmonitor--daemon: periodically truncate list of modified files
  t/perf/p7519: add fsmonitor--daemon test cases
  t/perf/p7519: speed up test on Windows
  t/perf/p7519: fix coding style
  t/helper/test-chmtime: skip directories on Windows
  t/perf: avoid copying builtin fsmonitor files into test repo
  t7527: create test for fsmonitor--daemon
  t/helper/fsmonitor-client: create IPC client to talk to FSMonitor Daemon
  help: include fsmonitor--daemon feature flag in version info
  fsmonitor--daemon: implement handle_client callback
  compat/fsmonitor/fsm-listen-darwin: implement FSEvent listener on MacOS
  compat/fsmonitor/fsm-listen-darwin: add MacOS header files for FSEvent
  compat/fsmonitor/fsm-listen-win32: implement FSMonitor backend on Windows
  fsmonitor--daemon: create token-based changed path cache
  fsmonitor--daemon: define token-ids
  fsmonitor--daemon: add pathname classification
  fsmonitor--daemon: implement 'start' command
  ...

3 years agoMerge branch 'tk/ambiguous-fetch-refspec'
Junio C Hamano [Mon, 4 Apr 2022 17:56:23 +0000 (10:56 -0700)] 
Merge branch 'tk/ambiguous-fetch-refspec'

Give hint when branch tracking cannot be established because fetch
refspecs from multiple remote repositories overlap.

* tk/ambiguous-fetch-refspec:
  tracking branches: add advice to ambiguous refspec error

3 years agoMerge branch 'rc/fetch-refetch'
Junio C Hamano [Mon, 4 Apr 2022 17:56:23 +0000 (10:56 -0700)] 
Merge branch 'rc/fetch-refetch'

"git fetch --refetch" learned to fetch everything without telling
the other side what we already have, which is useful when you
cannot trust what you have in the local object store.

* rc/fetch-refetch:
  docs: mention --refetch fetch option
  fetch: after refetch, encourage auto gc repacking
  t5615-partial-clone: add test for fetch --refetch
  fetch: add --refetch option
  builtin/fetch-pack: add --refetch option
  fetch-pack: add refetch
  fetch-negotiator: add specific noop initializer

3 years agoMerge branch 'jc/mailsplit-warn-on-tty'
Junio C Hamano [Mon, 4 Apr 2022 17:56:23 +0000 (10:56 -0700)] 
Merge branch 'jc/mailsplit-warn-on-tty'

"git am" can read from the standard input when no mailbox is given
on the command line, but the end-user gets no indication when it
happens, making Git appear stuck.

* jc/mailsplit-warn-on-tty:
  am/apply: warn if we end up reading patches from terminal

3 years agoMerge branch 'ns/trace2-fsync-stat'
Junio C Hamano [Mon, 4 Apr 2022 17:56:23 +0000 (10:56 -0700)] 
Merge branch 'ns/trace2-fsync-stat'

Trace2 code has been taught to report stats for fsync operations.

* ns/trace2-fsync-stat:
  trace2: add stats for fsync operations

3 years agoMerge branch 'gc/branch-recurse-submodules-fix'
Junio C Hamano [Mon, 4 Apr 2022 17:56:22 +0000 (10:56 -0700)] 
Merge branch 'gc/branch-recurse-submodules-fix'

A handful of obvious clean-ups around a topic that is already in
'master'.

* gc/branch-recurse-submodules-fix:
  branch.c: simplify advice-and-die sequence
  branch: rework comments for future developers
  branch: remove negative exit code
  branch --set-upstream-to: be consistent when advising
  branch: give submodule updating advice before exit
  branch: support more tracking modes when recursing

3 years agoMerge branch 'ns/fsync-or-die-message-fix'
Junio C Hamano [Mon, 4 Apr 2022 17:56:22 +0000 (10:56 -0700)] 
Merge branch 'ns/fsync-or-die-message-fix'

When creating a loose object file, we didn't report the exact
filename of the file we failed to fsync, even though the
information was readily available, which has been corrected.

* ns/fsync-or-die-message-fix:
  object-file: pass filename to fsync_or_die

3 years agoMerge branch 'ns/core-fsyncmethod'
Junio C Hamano [Mon, 4 Apr 2022 17:56:22 +0000 (10:56 -0700)] 
Merge branch 'ns/core-fsyncmethod'

A couple of fix-up to a topic that is now in 'master'.

* ns/core-fsyncmethod:
  core.fsyncmethod: correctly camel-case warning message
  core.fsync: fix incorrect expression for default configuration

3 years agoMerge branch 'dp/worktree-repair-in-usage'
Junio C Hamano [Mon, 4 Apr 2022 17:56:22 +0000 (10:56 -0700)] 
Merge branch 'dp/worktree-repair-in-usage'

Usage string fix.

* dp/worktree-repair-in-usage:
  worktree: include repair cmd in usage

3 years agoMerge branch 'ab/reftable-aix-xlc-12'
Junio C Hamano [Mon, 4 Apr 2022 17:56:22 +0000 (10:56 -0700)] 
Merge branch 'ab/reftable-aix-xlc-12'

Work around AIX C compiler that does not seem to grok
initialization of a union member of a struct.

* ab/reftable-aix-xlc-12:
  reftable: make assignments portable to AIX xlc v12.01

3 years agoMerge branch 'gc/submodule-update-part2'
Junio C Hamano [Mon, 4 Apr 2022 17:56:21 +0000 (10:56 -0700)] 
Merge branch 'gc/submodule-update-part2'

Move more "git submodule update" to C.

* gc/submodule-update-part2:
  submodule--helper: remove forward declaration
  submodule: move core cmd_update() logic to C
  submodule--helper: reduce logic in run_update_procedure()
  submodule--helper: teach update_data more options
  builtin/submodule--helper.c: rename option struct to "opt"
  submodule update: use die_message()
  submodule--helper: run update using child process struct

3 years agoMerge branch 'ds/t7700-kept-pack-test'
Junio C Hamano [Mon, 4 Apr 2022 17:56:21 +0000 (10:56 -0700)] 
Merge branch 'ds/t7700-kept-pack-test'

Test clean-up.

* ds/t7700-kept-pack-test:
  test-lib-functions: remove test_subcommand_inexact
  t7700: check post-condition in kept-pack test

3 years agoMerge branch 'ds/partial-bundle-more'
Junio C Hamano [Mon, 4 Apr 2022 17:56:21 +0000 (10:56 -0700)] 
Merge branch 'ds/partial-bundle-more'

Code clean-up.

* ds/partial-bundle-more:
  pack-objects: lazily set up "struct rev_info", don't leak
  bundle: output hash information in 'verify'
  bundle: move capabilities to end of 'verify'
  pack-objects: parse --filter directly into revs.filter
  pack-objects: move revs out of get_object_list()
  list-objects-filter: remove CL_ARG__FILTER

3 years agoMerge branch 'tl/ls-tree-oid-only'
Junio C Hamano [Mon, 4 Apr 2022 17:56:21 +0000 (10:56 -0700)] 
Merge branch 'tl/ls-tree-oid-only'

"git ls-tree" learns "--oid-only" option, similar to "--name-only",
and more generalized "--format" option.

* tl/ls-tree-oid-only:
  ls-tree: split up "fast path" callbacks
  ls-tree: detect and error on --name-only --name-status
  ls-tree: support --object-only option for "git-ls-tree"
  ls-tree: introduce "--format" option
  cocci: allow padding with `strbuf_addf()`
  ls-tree: introduce struct "show_tree_data"
  ls-tree: slightly refactor `show_tree()`
  ls-tree: fix "--name-only" and "--long" combined use bug
  ls-tree: simplify nesting if/else logic in "show_tree()"
  ls-tree: rename "retval" to "recurse" in "show_tree()"
  ls-tree: use "size_t", not "int" for "struct strbuf"'s "len"
  ls-tree: use "enum object_type", not {blob,tree,commit}_type
  ls-tree: add missing braces to "else" arms
  ls-tree: remove commented-out code
  ls-tree tests: add tests for --name-status

3 years agoMerge branch 'ab/reflog-parse-options'
Junio C Hamano [Mon, 4 Apr 2022 17:56:21 +0000 (10:56 -0700)] 
Merge branch 'ab/reflog-parse-options'

"git reflog" command now uses parse-options API to parse its
command line options.

* ab/reflog-parse-options:
  reflog: fix 'show' subcommand's argv
  reflog [show]: display sensible -h output
  reflog: convert to parse_options() API
  reflog exists: use parse_options() API
  git reflog [expire|delete]: make -h output consistent with SYNOPSIS
  reflog: move "usage" variables and use macros
  reflog tests: add missing "git reflog exists" tests
  reflog: refactor cmd_reflog() to "if" branches
  reflog.c: indent argument lists

3 years agotracking branches: add advice to ambiguous refspec error
Tao Klerks [Fri, 1 Apr 2022 06:05:13 +0000 (06:05 +0000)] 
tracking branches: add advice to ambiguous refspec error

The error "not tracking: ambiguous information for ref" is raised
when we are evaluating what tracking information to set on a branch,
and find that the ref to be added as tracking branch is mapped
under multiple remotes' fetch refspecs.

This can easily happen when a user copy-pastes a remote definition
in their git config, and forgets to change the tracking path.

Add advice in this situation, explicitly highlighting which remotes
are involved and suggesting how to correct the situation. Also
update a test to explicitly expect that advice.

Signed-off-by: Tao Klerks <tao@klerks.biz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>