aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Git 2.33v2.33.0Gravatar Junio C Hamano 2021-08-162-5/+1
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'rs/oidtree-alignment-fix'Gravatar Junio C Hamano 2021-08-163-7/+17
|\ | | | | | | | | | | | | | | Codepath to access recently added oidtree data structure had to make unaligned accesses to oids, which has been corrected. * rs/oidtree-alignment-fix: oidtree: avoid unaligned access to crit-bit tree
| * oidtree: avoid unaligned access to crit-bit treeGravatar René Scharfe 2021-08-153-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flexible array member "k" of struct cb_node is used to store the key of the crit-bit tree node. It offers no alignment guarantees -- in fact the current struct layout puts it one byte after a 4-byte aligned address, i.e. guaranteed to be misaligned. oidtree uses a struct object_id as cb_node key. Since cf0983213c (hash: add an algo member to struct object_id, 2021-04-26) it requires 4-byte alignment. The mismatch is reported by UndefinedBehaviorSanitizer at runtime like this: hash.h:277:2: runtime error: member access within misaligned address 0x00015000802d for type 'struct object_id', which requires 4 byte alignment 0x00015000802d: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior hash.h:277:2 in We can fix that by: 1. eliminating the alignment requirement of struct object_id, 2. providing the alignment in struct cb_node, or 3. avoiding the issue by only using memcpy to access "k". Currently we only store one of two values in "algo" in struct object_id. We could use a uint8_t for that instead and widen it only once we add support for our twohundredth algorithm or so. That would not only avoid alignment issues, but also reduce the memory requirements for each instance of struct object_id by ca. 9%. Supporting keys with alignment requirements might be useful to spread the use of crit-bit trees. It can be achieved by using a wider type for "k" (e.g. uintmax_t), using different types for the members "byte" and "otherbits" (e.g. uint16_t or uint32_t for each), or by avoiding the use of flexible arrays like khash.h does. This patch implements the third option, though, because it has the least potential for causing side-effects and we're close to the next release. If one of the other options is implemented later as well to get their additional benefits we can get rid of the extra copies introduced here. Reported-by: Andrzej Hunt <andrzej@ahunt.org> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge tag 'l10n-2.33.0-rnd2' of git://github.com/git-l10n/git-poGravatar Junio C Hamano 2021-08-1617-35596/+37473
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l10n-2.33.0-rnd2 * tag 'l10n-2.33.0-rnd2' of git://github.com/git-l10n/git-po: (46 commits) l10n: sv.po: Update Swedish translation (5230t0f0u) l10n: TEAMS: change Simplified Chinese team leader l10n: tr: v2.33 (round 2) l10n: es: 2.33.0 round 2 l10n: zh_CN: for git v2.33.0 l10n round 2 l10n: zh_CN: Revision for git v2.32.0 l10n round 1 l10n: README: refactor to use GFM syntax l10n: update German translation for Git v2.33.0 (rnd2) l10n: pt_PT: v2.33.0 round 2 l10n: pt_PT: git-po-helper update l10n: pt_PT: update translation table l10n: zh_TW.po: remove the obsolete glossary l10n: vi.po(5230t): Updated translation for v2.32.0 round 2 l10n: fr.po v2.33 rnd 2 l10n: id: po-id for 2.33.0 round 2 l10n: zh_TW.po: update for v2.33.0 rnd 2 l10n: git.pot: v2.33.0 round 2 (11 new, 8 removed) l10n: de.po: fix typos l10n: update German translation for Git v2.33.0 l10n: fr.po fix typos in commands and variables ...
| * l10n: sv.po: Update Swedish translation (5230t0f0u)Gravatar Peter Krefting 2021-08-161-508/+530
| | | | | | | | | | | | | | Also fixed some typos reported by "git-po-helper". Signed-off-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * l10n: TEAMS: change Simplified Chinese team leaderGravatar Jiang Xin 2021-08-161-3/+3
| | | | | | | | Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * Merge branch 'next' of github.com:ChrisADR/git-poGravatar Jiang Xin 2021-08-151-4302/+3504
| |\ | | | | | | | | | | | | * 'next' of github.com:ChrisADR/git-po: l10n: es: 2.33.0 round 2
| | * l10n: es: 2.33.0 round 2Gravatar Christopher Diaz Riveros 2021-08-141-4302/+3504
| | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christopher Diaz Riveros <christopher.diaz.riv@gmail.com> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Javier Spagnoletti phansys@gmail.com Signed-off-by: Cleydyr Albuquerque <cleydyr@gmail.com> Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com> Signed-off-by: Guillermo Ramos <gramosg>
| * | l10n: tr: v2.33 (round 2)Gravatar Emir Sarı 2021-08-151-514/+538
| | | | | | | | | | | | Signed-off-by: Emir Sarı <bitigchi@me.com>
| * | l10n: zh_CN: for git v2.33.0 l10n round 2Gravatar Jiang Xin 2021-08-151-2202/+2345
| | | | | | | | | | | | | | | | | | | | | | | | Translate 48 new messages (5230t0f0u) for git 2.33.0, and also fixed typos found by "git-po-helper". Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Fangyi Zhou <me@fangyi.io>
| * | l10n: zh_CN: Revision for git v2.32.0 l10n round 1Gravatar Fangyi Zhou 2021-08-151-4/+4
| | | | | | | | | | | | Signed-off-by: Fangyi Zhou <me@fangyi.io>
| * | l10n: README: refactor to use GFM syntaxGravatar Jiang Xin 2021-08-151-172/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Format README.md using GFM (GitHub Flavored Markdown) syntax. - In order to use more than 3 level headings, use ATX style headings instead of setext style headings. - In order to add highlights for code blocks, use fenced code blocks instead of indented code blocks. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | Merge branch 'l10n-2.33-rnd2' of github.com:ralfth/gitGravatar Jiang Xin 2021-08-151-501/+522
| |\ \ | | | | | | | | | | | | | | | | * 'l10n-2.33-rnd2' of github.com:ralfth/git: l10n: update German translation for Git v2.33.0 (rnd2)
| | * | l10n: update German translation for Git v2.33.0 (rnd2)Gravatar Ralf Thielow 2021-08-141-501/+522
| | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
| * | | Merge branch 'pt-PT' of github.com:git-l10n-pt-PT/git-poGravatar Jiang Xin 2021-08-151-752/+679
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | * 'pt-PT' of github.com:git-l10n-pt-PT/git-po: l10n: pt_PT: v2.33.0 round 2 l10n: pt_PT: git-po-helper update l10n: pt_PT: update translation table
| | * | l10n: pt_PT: v2.33.0 round 2Gravatar Daniel Santos 2021-08-141-26/+25
| | | | | | | | | | | | | | | | | | | | | | | | * translation of new entries Signed-off-by: Daniel Santos <hello@brighterdan.com>
| | * | l10n: pt_PT: git-po-helper updateGravatar Daniel Santos 2021-08-141-741/+617
| | | | | | | | | | | | | | | | | | | | | | | | * run git-po-helper update pt_PT.po Signed-off-by: Daniel Santos <hello@brighterdan.com>
| | * | l10n: pt_PT: update translation tableGravatar Daniel Santos 2021-08-141-11/+63
| | | | | | | | | | | | | | | | | | | | | | | | * updated translation table Signed-off-by: Daniel Santos <hello@brighterdan.com>
| * | | Merge branch 'loc/zh_TW/210814' of github.com:l10n-tw/git-poGravatar Jiang Xin 2021-08-141-2613/+2478
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | * 'loc/zh_TW/210814' of github.com:l10n-tw/git-po: l10n: zh_TW.po: remove the obsolete glossary l10n: zh_TW.po: update for v2.33.0 rnd 2
| | * | l10n: zh_TW.po: remove the obsolete glossaryGravatar Yi-Jyun Pan 2021-08-141-275/+3
| | | | | | | | | | | | | | | | Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
| | * | l10n: zh_TW.po: update for v2.33.0 rnd 2Gravatar Yi-Jyun Pan 2021-08-141-2341/+2478
| | | | | | | | | | | | | | | | Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
| * | | Merge branch 'master' of github.com:vnwildman/gitGravatar Jiang Xin 2021-08-141-497/+517
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * 'master' of github.com:vnwildman/git: l10n: vi.po(5230t): Updated translation for v2.32.0 round 2
| | * | | l10n: vi.po(5230t): Updated translation for v2.32.0 round 2Gravatar Tran Ngoc Quan 2021-08-141-497/+517
| | |/ / | | | | | | | | | | | | Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
| * | | Merge branch 'po-id' of github.com:bagasme/git-poGravatar Jiang Xin 2021-08-141-531/+569
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * 'po-id' of github.com:bagasme/git-po: l10n: id: po-id for 2.33.0 round 2
| | * | | l10n: id: po-id for 2.33.0 round 2Gravatar Bagas Sanjaya 2021-08-141-531/+569
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update translation for following component: * builtin/submodule--helper.c Translate following new component: * builtin/revert.c Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
| * | | l10n: fr.po v2.33 rnd 2Gravatar Jean-Noël Avila 2021-08-141-507/+543
| | |/ | |/| | | | | | | Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
| * | Merge branch 'master' of github.com:vnwildman/gitGravatar Jiang Xin 2021-08-141-15/+17
| |\ \ | | |/ | |/| | | | | | | * 'master' of github.com:vnwildman/git: l10n: vi.po(5227t): Fixed typo after run git-po-helper
| | * l10n: vi.po(5227t): Fixed typo after run git-po-helperGravatar Tran Ngoc Quan 2021-08-121-15/+17
| | | | | | | | | | | | Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
| * | l10n: git.pot: v2.33.0 round 2 (11 new, 8 removed)Gravatar Jiang Xin 2021-08-141-484/+504
| | | | | | | | | | | | | | | | | | Generate po/git.pot from v2.33.0-rc2 for git v2.33.0 l10n round 2. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | Merge branch 'master' of github.com:git/gitGravatar Jiang Xin 2021-08-1450-419/+1248
| |\ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of github.com:git/git: (51 commits) Git 2.33-rc2 object-file: use unsigned arithmetic with bit mask Revert 'diff-merges: let "-m" imply "-p"' object-store: avoid extra ';' from KHASH_INIT oidtree: avoid nested struct oidtree_node Git 2.33-rc1 test: fix for COLUMNS and bash 5 The eighth batch diff: --pickaxe-all typofix mingw: align symlinks-related rmdir() behavior with Linux t7508: avoid non POSIX BRE use fspathhash() everywhere t0001: fix broken not-quite getcwd(3) test in bed67874e2 Documentation: render special characters correctly reset: clear_unpack_trees_porcelain to plug leak builtin/rebase: fix options.strategy memory lifecycle builtin/merge: free found_ref when done builtin/mv: free or UNLEAK multiple pointers at end of cmd_mv convert: release strbuf to avoid leak read-cache: call diff_setup_done to avoid leak ...
* | | Git 2.33-rc2v2.33.0-rc2Gravatar Junio C Hamano 2021-08-112-13/+1
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jn/log-m-does-not-imply-p'Gravatar Junio C Hamano 2021-08-113-7/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier "git log -m" was changed to always produce patch output, which would break existing scripts, which has been reverted. * jn/log-m-does-not-imply-p: Revert 'diff-merges: let "-m" imply "-p"'
| * | | Revert 'diff-merges: let "-m" imply "-p"'Gravatar Jonathan Nieder 2021-08-093-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f5bfcc823ba242a46e20fb6f71c9fbf7ebb222fe, which made "git log -m" imply "--patch" by default. The logic was that "-m", which makes diff generation for merges perform a diff against each parent, has no use unless I am viewing the diff, so we could save the user some typing by turning on display of the resulting diff automatically. That wasn't expected to adversely affect scripts because scripts would either be using a command like "git diff-tree" that already emits diffs by default or would be combining -m with a diff generation option such as --name-status. By saving typing for interactive use without adversely affecting scripts in the wild, it would be a pure improvement. The problem is that although diff generation options are only relevant for the displayed diff, a script author can imagine them affecting path limiting. For example, I might run git log -w --format=%H -- README hoping to list commits that edited README, excluding whitespace-only changes. In fact, a whitespace-only change is not TREESAME so the use of -w here has no effect (since we don't apply these diff generation flags to the diff_options struct rev_info::pruning used for this purpose), but the documentation suggests that it should work Suppose you specified foo as the <paths>. We shall call commits that modify foo !TREESAME, and the rest TREESAME. (In a diff filtered for foo, they look different and equal, respectively.) and a script author who has not tested whitespace-only changes wouldn't notice. Similarly, a script author could include git log -m --first-parent --format=%H -- README to filter the first-parent history for commits that modified README. The -m is a no-op but it reflects the script author's intent. For example, until 1e20a407fe2 (stash list: stop passing "-m" to "git log", 2021-05-21), "git stash list" did this. As a result, we can't safely change "-m" to imply "-p" without fear of breaking such scripts. Restore the previous behavior. Noticed because Rust's src/bootstrap/bootstrap.py made use of this same construct: https://github.com/rust-lang/rust/pull/87513. That script has been updated to omit the unnecessary "-m" option, but we can expect other scripts in the wild to have similar expectations. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'cb/many-alternate-optim-fixup'Gravatar Junio C Hamano 2021-08-113-10/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build fix. * cb/many-alternate-optim-fixup: object-file: use unsigned arithmetic with bit mask object-store: avoid extra ';' from KHASH_INIT oidtree: avoid nested struct oidtree_node
| * | | | object-file: use unsigned arithmetic with bit maskGravatar René Scharfe 2021-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 33f379eee6 (make object_directory.loose_objects_subdir_seen a bitmap, 2021-07-07) replaced a wasteful 256-byte array with a 32-byte array and bit operations. The mask calculation shifts a literal 1 of type int left by anything between 0 and 31. UndefinedBehaviorSanitizer doesn't like that and reports: object-file.c:2477:18: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Make sure to use an unsigned 1 instead to avoid the issue. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | object-store: avoid extra ';' from KHASH_INITGravatar Carlo Marcelo Arenas Belón 2021-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cf2dc1c238 (speed up alt_odb_usable() with many alternates, 2021-07-07) introduces a KHASH_INIT invocation with a trailing ';', which while commonly expected will trigger warnings with pedantic on both clang[-Wextra-semi] and gcc[-Wpedantic], because that macro has already a semicolon and is meant to be invoked without one. while fixing the macro would be a worthy solution (specially considering this is a common recurring problem), remove the extra ';' for now to minimize churn. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | oidtree: avoid nested struct oidtree_nodeGravatar Carlo Marcelo Arenas Belón 2021-08-091-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 92d8ed8ac1 (oidtree: a crit-bit tree for odb_loose_cache, 2021-07-07) adds a struct oidtree_node that contains only an n field with a struct cb_node. unfortunately, while building in pedantic mode witch clang 12 (as well as a similar error from gcc 11) it will show: oidtree.c:11:17: error: 'n' may not be nested in a struct due to flexible array member [-Werror,-Wflexible-array-extensions] struct cb_node n; ^ because of a constrain coded in ISO C 11 6.7.2.1¶3 that forbids using structs that contain a flexible array as part of another struct. use a strict cb_node directly instead. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Git 2.33-rc1v2.33.0-rc1Gravatar Junio C Hamano 2021-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'cb/t7508-regexp-fix'Gravatar Junio C Hamano 2021-08-061-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * cb/t7508-regexp-fix: t7508: avoid non POSIX BRE
| * | | | | t7508: avoid non POSIX BREGravatar Carlo Marcelo Arenas Belón 2021-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 24c30e0b6 (wt-status: tolerate dangling marks, 2020-09-01) adds a test that uses a BRE which breaks at least with OpenBSD's grep. switch to an ERE as it is done for similar checks and while at it, remove the now obsolete test_i18ngrep call. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'ab/pickaxe-pcre2'Gravatar Junio C Hamano 2021-08-061-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ab/pickaxe-pcre2: diff: --pickaxe-all typofix
| * | | | | | diff: --pickaxe-all typofixGravatar Bagas Sanjaya 2021-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I was fixing fuzzies as I updating po/id.po for 2.33.0 l10n round, I noticed a triple-dash typo (--pickaxe-all) at diff.c, which according to git-diff(1) manpage, the correct option name should be --pickaxe-all. Fix the typo. Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'fc/disable-checkwinsize'Gravatar Junio C Hamano 2021-08-061-0/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fc/disable-checkwinsize: test: fix for COLUMNS and bash 5
| * | | | | | | test: fix for COLUMNS and bash 5Gravatar Felipe Contreras 2021-08-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since c49a177bec (test-lib.sh: set COLUMNS=80 for --verbose repeatability, 2021-06-29) multiple tests have been failing when using bash 5 because checkwinsize is enabled by default, therefore COLUMNS is reset using TIOCGWINSZ even for non-interactive shells. It's debatable whether or not bash should even be doing that, but for now we can avoid this undesirable behavior by disabling this option. Reported-by: Fabian Stelzer <fabian.stelzer@campoint.net> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> [jc: with SZEDER Gábor's suggestion to do this before setting COLUMNS] Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | The eighth batchGravatar Junio C Hamano 2021-08-041-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'tb/mingw-rmdir-symlink-to-directory'Gravatar Junio C Hamano 2021-08-043-0/+37
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows rmdir() equivalent behaves differently from POSIX ones in that when used on a symbolic link that points at a directory, the target directory gets removed, which has been corrected. * tb/mingw-rmdir-symlink-to-directory: mingw: align symlinks-related rmdir() behavior with Linux
| * | | | | | | | mingw: align symlinks-related rmdir() behavior with LinuxGravatar Thomas Bétous 2021-08-023-0/+37
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing a rebase, rmdir() is called on the folder .git/logs. On Unix rmdir() exits without deleting anything in case .git/logs is a symbolic link but the equivalent functions on Windows (_rmdir, _wrmdir and RemoveDirectoryW) do not behave the same and remove the folder if it is symlinked even if it is not empty. This creates issues when folders in .git/ are symlinks which is especially the case when git-repo[1] is used: It replaces `.git/logs/` with a symlink. One such issue is that the _target_ of that symlink is removed e.g. during a `git rebase`, where `delete_reflog("REBASE_HEAD")` will not only try to remove `.git/logs/REBASE_HEAD` but then recursively try to remove the parent directories until an error occurs, a technique that obviously relies on `rmdir()` refusing to remove a symlink. This was reported in https://github.com/git-for-windows/git/issues/2967. This commit updates mingw_rmdir() so that its behavior is the same as Linux rmdir() in case of symbolic links. To verify that Git does not regress on the reported issue, this patch adds a regression test for the `git rebase` symptom, even if the same `rmdir()` behavior is quite likely to cause potential problems in other Git commands as well. [1]: git-repo is a python tool built on top of Git which helps manage many Git repositories. It stores all the .git/ folders in a central place by taking advantage of symbolic links. More information: https://gerrit.googlesource.com/git-repo/ Signed-off-by: Thomas Bétous <tomspycell@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'ar/doc-markup-fix'Gravatar Junio C Hamano 2021-08-042-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc mark-up fix. * ar/doc-markup-fix: Documentation: render special characters correctly
| * | | | | | | | Documentation: render special characters correctlyGravatar Andrei Rybak 2021-07-302-2/+2
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three hyphens are rendered verbatim, so "--" has to be used to produce a dash. There is no double arrow ("<->" is rendered as "<→"), so a left and right arrow "<-->" have to be combined for that. So fix asciidoc output for special characters. This is similar to fixes in commit de82095a95 (doc hash-function-transition: fix asciidoc output, 2021-02-05). Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'ab/getcwd-test'Gravatar Junio C Hamano 2021-08-045-1/+33
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Portability test update. * ab/getcwd-test: t0001: fix broken not-quite getcwd(3) test in bed67874e2