|
| 1 | +From 5415cf267c1b5a4ef9591e11106085bc24b7131b Mon Sep 17 00:00:00 2001 |
| 2 | +From: archana25-ms < [email protected]> |
| 3 | +Date: Thu, 17 Jul 2025 17:21:37 +0000 |
| 4 | +Subject: [PATCH] Fix git config syntax |
| 5 | +Upstream Patch reference: https://lkml.org/lkml/2025/7/8/1608 |
| 6 | + |
| 7 | +--- |
| 8 | + t/t1300-config.sh | 4 ++-- |
| 9 | + t/t7450-bad-git-dotfiles.sh | 4 ++-- |
| 10 | + 2 files changed, 4 insertions(+), 4 deletions(-) |
| 11 | + |
| 12 | +diff --git a/t/t1300-config.sh b/t/t1300-config.sh |
| 13 | +index 00f34c5..3ed4a0b 100755 |
| 14 | +--- a/t/t1300-config.sh |
| 15 | ++++ b/t/t1300-config.sh |
| 16 | +@@ -2743,8 +2743,8 @@ test_expect_success 'writing value with trailing CR not stripped on read' ' |
| 17 | + |
| 18 | + printf "bar\r\n" >expect && |
| 19 | + git init cr-test && |
| 20 | +- git -C cr-test config set core.foo $(printf "bar\r") && |
| 21 | +- git -C cr-test config get core.foo >actual && |
| 22 | ++ git -C cr-test config core.foo $(printf "bar\r") && |
| 23 | ++ git -C cr-test config --get core.foo >actual && |
| 24 | + |
| 25 | + test_cmp expect actual |
| 26 | + ' |
| 27 | +diff --git a/t/t7450-bad-git-dotfiles.sh b/t/t7450-bad-git-dotfiles.sh |
| 28 | +index ff63c05..38b9db8 100755 |
| 29 | +--- a/t/t7450-bad-git-dotfiles.sh |
| 30 | ++++ b/t/t7450-bad-git-dotfiles.sh |
| 31 | +@@ -388,10 +388,10 @@ test_expect_success SYMLINKS,!WINDOWS,!MINGW 'submodule must not checkout into d |
| 32 | + git -C repo mv sub $(printf "sub\r") && |
| 33 | + |
| 34 | + # Ensure config values containing CR are wrapped in quotes. |
| 35 | +- git config unset -f repo/.gitmodules submodule.sub.path && |
| 36 | ++ git config --unset -f repo/.gitmodules submodule.sub.path && |
| 37 | + printf "\tpath = \"sub\r\"\n" >>repo/.gitmodules && |
| 38 | + |
| 39 | +- git config unset -f repo/.git/modules/sub/config core.worktree && |
| 40 | ++ git config --unset -f repo/.git/modules/sub/config core.worktree && |
| 41 | + { |
| 42 | + printf "[core]\n" && |
| 43 | + printf "\tworktree = \"../../../sub\r\"\n" |
| 44 | +-- |
| 45 | +2.45.3 |
| 46 | + |
0 commit comments