summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-04-08Merge branch 'tl/ls-tree-oid-only'Libravatar Junio C Hamano1-2/+2
Docfix. * tl/ls-tree-oid-only: ls-tree doc: document interaction with submodules
2022-04-08t9902: split test to run on appropriate systemsLibravatar Adam Dinwoodie1-9/+26
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>
2022-04-08ls-tree doc: document interaction with submodulesLibravatar Ævar Arnfjörð Bjarmason1-2/+2
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>
2022-04-08l10n: zh_CN v2.36.0 round 1Libravatar Fangyi Zhou1-3935/+4704
Reviewed-by: 依云 <lilydjwg@gmail.com> Signed-off-by: Fangyi Zhou <me@fangyi.io>
2022-04-08l10n: Update zh_CN repo linkLibravatar Fangyi Zhou2-2/+2
Signed-off-by: Fangyi Zhou <me@fangyi.io>
2022-04-07Merge branch 'jc/cat-file-batch-commands'Libravatar Junio C Hamano1-1/+1
Doc fix. * jc/cat-file-batch-commands: Documentation: add --batch-command to cat-file synopsis
2022-04-07Documentation: add --batch-command to cat-file synopsisLibravatar Ævar Arnfjörð Bjarmason1-1/+1
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>
2022-04-07Merge branch 'tz/doc-litdd-fixes'Libravatar Junio C Hamano4-11/+11
Documentation markup fix. * tz/doc-litdd-fixes: doc: replace "--" with {litdd} in credential-cache/fsmonitor
2022-04-07Merge branch 'js/apply-partial-clone-filters-recursively'Libravatar Junio C Hamano1-1/+1
Typofix * js/apply-partial-clone-filters-recursively: submodule-helper: fix usage string
2022-04-07Merge branch 'tl/ls-tree-oid-only'Libravatar Junio C Hamano1-1/+1
* tl/ls-tree-oid-only: git-ls-tree.txt: fix the name of "%(objectsize:padded)"
2022-04-07git-ls-tree.txt: fix the name of "%(objectsize:padded)"Libravatar Martin Ågren1-1/+1
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>
2022-04-07submodule-helper: fix usage stringLibravatar Fangyi Zhou1-1/+1
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>
2022-04-07l10n: po-id for 2.36 (round 1)Libravatar Bagas Sanjaya1-4206/+5075
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>
2022-04-06doc: replace "--" with {litdd} in credential-cache/fsmonitorLibravatar Todd Zullinger4-11/+11
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>
2022-04-06Merge branch 'tl/ls-tree-oid-only'Libravatar Junio C Hamano1-1/+1
"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
2022-04-06Merge branch 'bc/csprng-mktemps'Libravatar Junio C Hamano3-1/+6
Build fix. * bc/csprng-mktemps: git-compat-util: really support openssl as a source of entropy
2022-04-06Merge branch 'ns/core-fsyncmethod'Libravatar Junio C Hamano1-1/+1
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
2022-04-06Merge branch 'ab/make-optim-noop'Libravatar Junio C Hamano2-2/+2
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
2022-04-06contrib/scalar: fix 'all' target in MakefileLibravatar Victoria Dye1-1/+1
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>
2022-04-06Documentation/Makefile: fix "make info" regression in dad9cd7d518Libravatar Ævar Arnfjörð Bjarmason1-1/+1
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>
2022-04-06configure.ac: fix HAVE_SYNC_FILE_RANGE definitionLibravatar Adam Dinwoodie1-1/+1
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>
2022-04-06git-compat-util: really support openssl as a source of entropyLibravatar Carlo Marcelo Arenas Belón3-1/+6
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>
2022-04-06ls-tree: `-l` should not imply recursive listingLibravatar Josh Steadmon1-1/+1
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>
2022-04-06l10n: tr: v2.36.0 round 1Libravatar Emir SARI1-3958/+4479
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2022-04-06l10n: git.pot: v2.36.0 round 1 (192 new, 106 removed)Libravatar Jiang Xin1-3828/+4320
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>
2022-04-06Merge branch 'master' of github.com:git-l10n/git-poLibravatar Jiang Xin2-4268/+4152
* 'master' of github.com:git-l10n/git-po: l10n: pt_PT: update TEAMS file l10n: pt_PT: update Portuguese translation
2022-04-04Git 2.36-rc0Libravatar Junio C Hamano2-1/+33
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-04-04Merge branch 'pw/worktree-list-with-z'Libravatar Junio C Hamano3-20/+55
"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
2022-04-04Merge branch 'jc/coding-guidelines-decl-in-for-loop'Libravatar Junio C Hamano1-1/+4
Coding Guidelines clarification. * jc/coding-guidelines-decl-in-for-loop: CodingGuidelines: give deadline for "for (int i = 0; ..."
2022-04-04Merge branch 'vd/mv-refresh-stat'Libravatar Junio C Hamano2-2/+34
"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
2022-04-04Merge branch 'jh/builtin-fsmonitor-part2'Libravatar Junio C Hamano38-106/+4326
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 ...
2022-04-04Merge branch 'tk/ambiguous-fetch-refspec'Libravatar Junio C Hamano5-9/+78
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
2022-04-04Merge branch 'rc/fetch-refetch'Libravatar Junio C Hamano15-22/+197
"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
2022-04-04Merge branch 'jc/mailsplit-warn-on-tty'Libravatar Junio C Hamano1-0/+3
"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
2022-04-04Merge branch 'ns/trace2-fsync-stat'Libravatar Junio C Hamano4-0/+22
Trace2 code has been taught to report stats for fsync operations. * ns/trace2-fsync-stat: trace2: add stats for fsync operations
2022-04-04Merge branch 'gc/branch-recurse-submodules-fix'Libravatar Junio C Hamano3-16/+76
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
2022-04-04Merge branch 'ns/fsync-or-die-message-fix'Libravatar Junio C Hamano1-4/+4
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
2022-04-04Merge branch 'ns/core-fsyncmethod'Libravatar Junio C Hamano2-3/+3
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
2022-04-04Merge branch 'dp/worktree-repair-in-usage'Libravatar Junio C Hamano1-0/+1
Usage string fix. * dp/worktree-repair-in-usage: worktree: include repair cmd in usage
2022-04-04Merge branch 'ab/reftable-aix-xlc-12'Libravatar Junio C Hamano3-6/+18
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
2022-04-04Merge branch 'gc/submodule-update-part2'Libravatar Junio C Hamano2-435/+361
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
2022-04-04Merge branch 'ds/t7700-kept-pack-test'Libravatar Junio C Hamano2-37/+54
Test clean-up. * ds/t7700-kept-pack-test: test-lib-functions: remove test_subcommand_inexact t7700: check post-condition in kept-pack test
2022-04-04Merge branch 'ds/partial-bundle-more'Libravatar Junio C Hamano8-47/+94
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
2022-04-04Merge branch 'tl/ls-tree-oid-only'Libravatar Junio C Hamano6-94/+492
"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
2022-04-04Merge branch 'ab/reflog-parse-options'Libravatar Junio C Hamano6-67/+165
"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
2022-04-01tracking branches: add advice to ambiguous refspec errorLibravatar Tao Klerks5-9/+78
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>
2022-03-31branch.c: simplify advice-and-die sequenceLibravatar Glen Choo1-7/+4
In the dwim_branch_start(), when we cannot find an appropriate upstream, we will die with the same message anyway, whether we issue an advice message. Flip the code around a bit and simplify the flow using advise_if_enabled() function. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-31branch: rework comments for future developersLibravatar Glen Choo1-2/+2
For two cases in which we do not explicitly pass --track=<choice> option down to the submodule--helper subprocess, we have comments that say "we do not have to pass --track", but in fact we not just do not have to, but it would be incorrect to pass any --track option to the subprocess (instead, the correct behaviour is to let the subprocess figure out what is the appropriate tracking mode to use). Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-31Merge branch 'ab/usage-die-message' into gc/branch-recurse-submodules-fixLibravatar Junio C Hamano9-34/+71
* ab/usage-die-message: config API: use get_error_routine(), not vreportf() usage.c + gc: add and use a die_message_errno() gc: return from cmd_gc(), don't call exit() usage.c API users: use die_message() for error() + exit 128 usage.c API users: use die_message() for "fatal :" + exit 128 usage.c: add a die_message() routine
2022-03-31worktree: add -z option for list subcommandLibravatar Phillip Wood3-20/+55
Add a -z option to be used in conjunction with --porcelain that gives NUL-terminated output. As 'worktree list --porcelain' does not quote worktree paths this enables it to handle worktree paths that contain newlines. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>