summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b47dfe9)
raw | patch | inline | side by side (parent: b47dfe9)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 15 Jan 2009 00:29:59 +0000 (16:29 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 15 Jan 2009 00:29:59 +0000 (16:29 -0800) |
Noticed by Stephan Beyer; the new test is mine.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh | patch | blob | history | |
t/t4252-am-options.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 7e6329b14c1b7b1b05a76461dc2336ada5df6396..4beb12dcf5e94c0bc0decf8720f4a622b8b2d325 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
for sqarg
do
printf "%s" "$sqarg" |
- sed -e 's/'\''/'\''\'\'''\''/g' -e 's/.*/ '\''&'\''/'
+ sed -e 's/'\''/'\''\\'\'''\''/g' -e 's/.*/ '\''&'\''/'
done
}
diff --git a/t/t4252-am-options.sh b/t/t4252-am-options.sh
index e91a6da0d50e432ea964b73285923f63f9965f48..5fdd1885820927f32822019ccde52e6b783e31eb 100755 (executable)
--- a/t/t4252-am-options.sh
+++ b/t/t4252-am-options.sh
grep One "frotz nitfol/file-5"
'
+test_expect_success 'apply to a funny path' '
+ with_sq="with'\''sq"
+ rm -fr .git/rebase-apply &&
+ git reset --hard initial &&
+ git am --directory="$with_sq" "$tm"/am-test-5-2 &&
+ test -f "$with_sq/file-5"
+'
+
test_done