summaryrefslogtreecommitdiffstats
path: root/t/t9133-git-svn-nested-git-repo.sh (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2024-02-19Git 2.44-rc2v2.44.0-rc2Junio C Hamano2-1/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-19trailer: fix comment/cut-line regression with opts->no_dividerJeff King3-8/+44
Commit 97e9d0b78a (trailer: find the end of the log message, 2023-10-20) combined two code paths for finding the end of the log message. For the "no_divider" case, we used to use find_trailer_end(), and that has now been rolled into find_end_of_log_message(). But there's a regression; that function returns early when no_divider is set, returning the whole string. That's not how find_trailer_end() behaved. Although it did skip the "---" processing (which is what "no_divider" is meant to do), we should still respect ignored_log_message_bytes(), which covers things like comments, "commit -v" cut lines, and so on. The bug is actually in the interpret-trailers command, but the obvious way to experience it is by running "commit -v" with a "--trailer" option. The new trailer will be added at the end of the verbose diff, rather than before it (and consequently will be ignored entirely, since everything after the diff's intro scissors line is thrown away). I've added two tests here: one for interpret-trailers directly, which shows the bug via the parsing routines, and one for "commit -v". The fix itself is pretty simple: instead of returning early, no_divider just skips the "---" handling but still calls ignored_log_message_bytes(). Reported-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-18l10n: zh_TW: Git 2.44Yi-Jyun Pan1-168/+363
Co-Authored-By: lumynou5 <lumynou5.tw@gmail.com> Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2024-02-18l10n: zh_CN: for git 2.44 roundsTeng Long1-198/+340
In addition to the localized translation in 2.44, for zh_CN, we have uniformly modified the translation of the word "commit-graph" to make it more consistent with language usage habits. Signed-off-by: Teng Long <dyroneteng@gmail.com>
2024-02-17RelNotes: minor typo fixes in 2.44.0 draftTodd Zullinger1-2/+2
Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-17l10n: Update German translationRalf Thielow1-140/+252
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2024-02-16l10n: tr: Update Turkish translations for 2.44Emir SARI1-129/+251
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2024-02-16l10n: fr.po: v2.44.0 round 3Jean-Noël Avila1-122/+305
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2024-02-16l10n: bg.po: Updated Bulgarian translation (5610t)Alexander Shopov1-125/+266
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2024-02-16l10n: sv.po: Update Swedish translationPeter Krefting1-120/+238
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2024-02-16l10n: Update Catalan translationJordi Mas1-183/+283
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2024-02-16l10n: po-id for 2.44 (round 1)Bagas Sanjaya1-166/+319
Update following components: * builtin/replay.c * command-list.h * commit-graph.c * pack-bitmap.c * sequencer.c Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2024-02-16l10n: ci: disable cache for setup-go to suppress warningsJiang Xin1-0/+1
After we upgraded actions/setup-go to v5, the following warning message was reported every time we ran the CI. Restore cache failed: Dependencies file is not found ... Disable cache to suppress warning messages as described in the solution below. https://github.com/actions/setup-go/issues/427 Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2024-02-16l10n: ci: remove unused param for add-pr-comment@v2Jiang Xin1-1/+0
When we upgraded GitHub Actions "mshick/add-pr-comment" to v2, the following warning message was reported every time we ran the CI. Unexpected input(s) 'repo-token-user-login', valid inputs ... Removed the obsolete parameter "repo-token-user-login" to suppress warning messages. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2024-02-15l10n: uk: v2.44 update (round 3)Arkadii Yakovets1-4/+4
Signed-off-by: Arkadii Yakovets <ark@cho.red>
2024-02-15l10n: uk: v2.44 update (round 2)Arkadii Yakovets1-5/+9
Signed-off-by: Arkadii Yakovets <ark@cho.red>
2024-02-15l10n: uk: v2.44 localization updateArkadii Yakovets1-147/+262
Co-authored-by: Kate Golovanova <kate@kgthreads.com> Signed-off-by: Arkadii Yakovets <ark@cho.red> Signed-off-by: Kate Golovanova <kate@kgthreads.com>
2024-02-14Hopefully the last batch of fixes before 2.44 finalJunio C Hamano1-0/+19
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-14diff: mark param1 and param2 as placeholdersJiang Xin1-3/+3
Some l10n translators translated the parameters "files", "param1" and "param2" in the following message: "synonym for --dirstat=files,param1,param2..." Translating "param1" and "param2" is OK, but changing the parameter "files" is wrong. The parameters that are not meant to be used verbatim should be marked as placeholders, but the verbatim parameter not marked as a placeholder should be left as is. This change is a complement for commit 51e846e673 (doc: enforce placeholders in documentation, 2023-12-25). With the help of Jean-Noël,some parameter combinations in one placeholder (e.g. "<param1,param2>...") are splited into seperate placeholders. Helped-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-13Git 2.43.2v2.43.2Junio C Hamano3-2/+39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-13A few more fixes before -rc1Junio C Hamano1-0/+14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-13write-or-die: fix the polarity of GIT_FLUSH environment variableJunio C Hamano1-8/+8
When GIT_FLUSH is set to 1, true, on, yes, then we should disable skip_stdout_flush, but the conversion somehow did the opposite. With the understanding of the original motivation behind "skip" in 06f59e9f (Don't fflush(stdout) when it's not helpful, 2007-06-29), we can sympathize with the current naming (we wanted to avoid useless flushing of stdout by default, with an escape hatch to always flush), but it is still not a good excuse. Retire the "skip_stdout_flush" variable and replace it with "flush_stdout" that tells if we do or do not want to run fflush(). Reported-by: Xiaoguang WANG <wxiaoguang@gmail.com> Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12A few more topics before -rc1Junio C Hamano1-0/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12completion: add and use __git_compute_second_level_config_vars_for_sectionPhilippe Blain2-51/+22
In a previous commit we removed some hardcoded config variable names from function __git_complete_config_variable_name in the completion script by introducing a new function, __git_compute_first_level_config_vars_for_section. The remaining hardcoded config variables are "second level" configuration variables, meaning 'branch.<name>.upstream', 'remote.<name>.url', etc. where <name> is a user-defined name. Making use of the new existing --config flag to 'git help', add a new function, __git_compute_second_level_config_vars_for_section. This function takes as argument a config section name and computes the corresponding second-level config variables, i.e. those that contain a '<' which indicates the start of a placeholder. Note that as in __git_compute_first_level_config_vars_for_section added previsouly, we use indirect expansion instead of associative arrays to stay compatible with Bash 3 on which macOS is stuck for licensing reasons. As explained in the previous commit, we use the existing pattern in the completion script of using global variables to cache the list of variables for each section. Use this new function and the variables it defines in __git_complete_config_variable_name to remove hardcoded config variables, and add a test to verify the new function. Use a single 'case' for all sections with second-level variables names, since the code for each of them is now exactly the same. Adjust the name of a test added in a previous commit to reflect that it now tests the added function. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12completion: add and use __git_compute_first_level_config_vars_for_sectionPhilippe Blain2-4/+22
The function __git_complete_config_variable_name in the Bash completion script hardcodes several config variable names. These variables are those in config sections where user-defined names can appear, such as "branch.<name>". These sections are treated first by the case statement, and the two last "catch all" cases are used for other sections, making use of the __git_compute_config_vars and __git_compute_config_sections function, which omit listing any variables containing wildcards or placeholders. Having hardcoded config variables introduces the risk of the completion code becoming out of sync with the actual config variables accepted by Git. To avoid these hardcoded config variables, introduce a new function, __git_compute_first_level_config_vars_for_section, making use of the existing __git_config_vars variable. This function takes as argument a config section name and computes the matching "first level" config variables for that section, i.e. those _not_ containing any placeholder, like 'branch.autoSetupMerge, 'remote.pushDefault', etc. Use this function and the variables it defines in the 'branch.*', 'remote.*' and 'submodule.*' switches of the case statement instead of hardcoding the corresponding config variables. Note that we use indirect expansion to create a variable for each section, instead of using a single associative array indexed by section names, because associative arrays are not supported in Bash 3, on which macOS is stuck for licensing reasons. Use the existing pattern in the completion script of using global variables to cache the list of config variables for each section. The rationale for such caching is explained in eaa4e6ee2a (Speed up bash completion loading, 2009-11-17), and the current approach to using and defining them via 'test -n' is explained in cf0ff02a38 (completion: work around zsh option propagation bug, 2012-02-02). Adjust the name of one of the tests added in the previous commit, reflecting that it now also tests the new function. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12completion: complete 'submodule.*' config variablesPhilippe Blain2-0/+42
In the Bash completion script, function __git_complete_config_variable_name completes config variables and has special logic to deal with config variables involving user-defined names, like branch.<name>.* and remote.<name>.*. This special logic is missing for submodule-related config variables. Add the appropriate branches to the case statement, making use of the in-tree '.gitmodules' to list relevant submodules. Add corresponding tests in t9902-completion.sh, making sure we complete both first level submodule config variables as well as second level variables involving submodule names. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12completion: add space after config variable names also in Bash 3Philippe Blain1-3/+3
In be6444d1ca (completion: bash: add correct suffix in variables, 2021-08-16), __git_complete_config_variable_name was changed to use "${sfx- }" instead of "$sfx" as the fourth argument of _gitcomp_nl and _gitcomp_nl_append, such that this argument evaluates to a space if sfx is unset. This was to ensure that e.g. git config branch.autoSetupMe[TAB] correctly completes to 'branch.autoSetupMerge ' with the trailing space. This commits notes that the fix only works in Bash 4 because in Bash 3 the 'local sfx' construct at the beginning of __git_complete_config_variable_name creates an empty string. Make the fix also work for Bash 3 by using the "unset or null' parameter expansion syntax ("${sfx:- }"), such that the parameter is also expanded to a space if it is set but null, as is the behaviour of 'local sfx' in Bash 3. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12receive-pack: use find_commit_header() in check_nonce()René Scharfe1-23/+7
Use the public function find_commit_header() and remove find_header(), as it becomes unused. This is safe and appropriate because we pass the NUL-terminated payload buffer to check_nonce() instead of its start and length. The underlying strbuf push_cert cannot contain NULs, as it is built using strbuf_addstr(), only. We no longer need to call strlen(), as find_commit_header() returns the length of nonce already. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12ci(linux32): add a note about Actions that must not be updatedJohannes Schindelin1-2/+2
The Docker container used by the `linux32` job comes without Node.js, and therefore the `actions/checkout` and `actions/upload-artifact` Actions cannot be upgraded to the latest versions (because they use Node.js). One time too many, I accidentally tried to update them, where `actions/checkout` at least fails immediately, but the `actions/upload-artifact` step is only used when any test fails, and therefore the CI run usually passes even though that Action was updated to a version that is incompatible with the Docker container in which this job runs. So let's add a big fat warning, mainly for my own benefit, to avoid running into the very same issue over and over again. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12ci: bump remaining outdated Actions versionsJohannes Schindelin2-10/+10
After activating automatic Dependabot updates in the git-for-windows/git repository, Dependabot noticed a couple of yet-unaddressed updates. They avoid "Node.js 16 Actions" deprecation messages by bumping the following Actions' versions: - actions/upload-artifact from 3 to 4 - actions/download-artifact from 3 to 4 - actions/cache from 3 to 4 Helped-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-12unit-tests: do show relative file paths on non-Windows, tooJunio C Hamano1-14/+47
There are compilers other than Visual C that want to show absolute paths. Generalize the helper introduced by a2c5e294 (unit-tests: do show relative file paths, 2023-09-25) so that it can also work with a path that uses slash as the directory separator, and becomes almost no-op once one-time preparation finds out that we are using a compiler that already gives relative paths. Incidentally, this also should do the right thing on Windows with a compiler that shows relative paths but with backslash as the directory separator (if such a thing exists and is used to build git). Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-11l10n: bump Actions versions in l10n.ymlJohannes Schindelin1-2/+2
This avoids the "Node.js 16 Actions are deprecated" warnings. Original-commits-by: dependabot[bot] <support@github.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2024-02-09receive-pack: use find_commit_header() in check_cert_push_options()René Scharfe1-15/+9
Use the public function find_commit_header() instead of find_header() to simplify the code. This is possible and safe because we're operating on a strbuf, which is always NUL-terminated, so there is no risk of running over the end of the buffer. It cannot contain NUL within the buffer, as it is built using strbuf_addstr(), only. The string comparison becomes more complicated because we need to check for NUL explicitly after comparing the length-limited option, but on the flip side we don't need to clean up allocations or track the remaining buffer length. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-09prune: mark rebase autostash and orig-head as reachablePhillip Wood3-1/+76
Rebase records the oid of HEAD before rebasing and the commit created by "--autostash" in files in the rebase state directory. This means that the autostash commit is never reachable from any ref or reflog and when rebasing a detached HEAD the original HEAD can become unreachable if the user expires HEAD's the reflog while the rebase is running. Fix this by reading the relevant files when marking reachable commits. Note that it is possible for the commit recorded in .git/rebase-merge/amend to be unreachable but pruning that object does not affect the operation of "git rebase --continue" as we're only interested in the object id, not in the object itself. Reported-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-08Git 2.44-rc0v2.44.0-rc0Junio C Hamano2-50/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-08Git 2.43.1v2.43.1Junio C Hamano3-2/+84
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-08The fifteenth batchJunio C Hamano1-0/+14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-08sequencer: unset GIT_CHERRY_PICK_HELP for 'exec' commandsVegard Nossum2-0/+13
Running "git cherry-pick" as an x-command in the rebase plan loses the original authorship information. To fix this, unset GIT_CHERRY_PICK_HELP for 'exec' commands. Helped-by: Phillip Wood <phillip.wood123@gmail.com> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-07ref-filter.c: sort formatted dates by byte valueVictoria Dye3-3/+57
Update the ref sorting functions of 'ref-filter.c' so that when date fields are specified with a format string (such as in 'git for-each-ref --sort=creatordate:<something>'), they are sorted by their formatted string value rather than by the underlying numeric timestamp. Currently, date fields are always sorted by timestamp, regardless of whether formatting information is included in the '--sort' key. Leaving the default (unformatted) date sorting unchanged, sorting by the formatted date string adds some flexibility to 'for-each-ref' by allowing for behavior like "sort by year, then by refname within each year" or "sort by time of day". Because the inclusion of a format string previously had no effect on sort behavior, this change likely will not affect existing usage of 'for-each-ref' or other ref listing commands. Additionally, update documentation & tests to document the new sorting mechanism. Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-07ssh signing: signal an error with a negative return valueJunio C Hamano1-1/+1
The other backend for the sign_buffer() function followed our usual "an error is signalled with a negative return" convention, but the SSH signer did not. Even though we already fixed the caller that assumed only a negative return value is an error, tighten the callee to signal an error with a negative return as well. This way, the callees will be strict on what they produce, while the callers will be lenient in what they accept. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-07bisect: document command line arguments for "bisect start"Junio C Hamano1-1/+1
The syntax commonly used for alternatives is --opt-(a|b), not --opt-{a,b}. List bad/new and good/old consistently in this order, to be consistent with the description for "git bisect terms". Clarify <term> to either <term-old> or <term-new> to make them consistent with the description of "git bisect (good|bad)" subcommands. Suggested-by: Matthieu Moy <git@matthieu-moy.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-07bisect: document "terms" subcommand more fullyJunio C Hamano1-3/+5
The documentation for "git bisect terms", although it did not hide any information, was a bit incomplete and forced readers to fill in the blanks to get the complete picture. Acked-by: Matthieu Moy <git@matthieu-moy.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-07tag: fix sign_buffer() call to create a signed tagJunio C Hamano2-2/+2
The command "git tag -s" internally calls sign_buffer() to make a cryptographic signature using the chosen backend like GPG and SSH. The internal helper functions used by "git tag" implementation seem to use a "negative return values are errors, zero or positive return values are not" convention, and there are places (e.g., verify_tag() that calls gpg_verify_tag()) that these internal helper functions translate return values that signal errors to conform to this convention, but do_sign() that calls sign_buffer() forgets to do so. Fix it, so that a failed call to sign_buffer() that can return the exit status from pipe_command() will not be overlooked. Reported-by: Sergey Kosukhin <skosukhin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-07t1400: use show-ref to check pseudorefsPhillip Wood1-9/+9
Now that "git show-ref --verify" accepts pseudorefs use that in preference to "git rev-parse" when checking pseudorefs as we do when checking branches etc. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-07show-ref --verify: accept pseudorefsPhillip Wood2-1/+9
"git show-ref --verify" is useful for scripts that want to look up a fully qualified refname without falling back to the DWIM rules used by "git rev-parse" rules when the ref does not exist. Currently it will only accept "HEAD" or a refname beginning with "refs/". Running git show-ref --verify CHERRY_PICK_HEAD will always result in fatal: 'CHERRY_PICK_HEAD' - not a valid ref even when CHERRY_PICK_HEAD exists. By calling refname_is_safe() instead of comparing the refname to "HEAD" we can accept all one-level refs that contain only uppercase ascii letters and underscores. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-06completion: bisect: recognize but do not complete view subcommandBritton Leo Kerin2-4/+35
The "view" alias for the visualize subcommand is neither completed nor recognized. It's undesirable to complete it because it's first letters are the same as for visualize, making completion less rather than more efficient without adding much in the way of interface discovery. However, it needs to be recognized in order to enable log option completion for it. Recognize but do not complete the view command by creating and using separate lists of completable_subcommands and all_subcommands. Add tests. Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-06completion: bisect: complete log opts for visualize subcommandBritton Leo Kerin2-0/+19
Arguments passed to the "visualize" subcommand of git-bisect(1) get forwarded to git-log(1). It thus supports the same options as git-log(1) would, but our Bash completion script does not know to handle this. Make completion of porcelain git-log options and option arguments to the visualize subcommand work by calling __git_complete_log_opts when the start of an option to the subcommand is seen (visualize doesn't support any options besides the git-log options). Add test. Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-06completion: new function __git_complete_log_optsBritton Leo Kerin1-3/+15
The options accepted by git-log are also accepted by at least one other command (git-bisect). Factor the common option completion code into a new function and use it from _git_log. The new function leaves COMPREPLY empty if no option candidates are found, so that callers can safely check it to determine if completion for other arguments should be attempted. Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-06completion: bisect: complete missing --first-parent and - -no-checkout optionsBritton Leo Kerin2-1/+12
The --first-parent and --no-checkout options to the start subcommand of git-bisect(1) are not completed. Enable completion of the --first-parent and --no-checkout options to the start subcommand. Add test. Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-06completion: bisect: complete custom terms and related optionsBritton Leo Kerin2-2/+45
git bisect supports the use of custom terms via the --term-(new|bad) and --term-(old|good) options, but the completion code doesn't know about these options or the new subcommands they define. Add support for these options and the custom subcommands by checking for BISECT_TERMS and adding them to the list of subcommands. Add tests. Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>