summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2946ccc)
raw | patch | inline | side by side (parent: 2946ccc)
author | Stephan Beyer <s-beyer@gmx.net> | |
Fri, 8 Aug 2008 23:28:54 +0000 (01:28 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Aug 2008 09:32:36 +0000 (02:32 -0700) |
The git-apply documentation says that --binary is a historical option.
This patch lets git-am ignore --binary and removes advertisements of this
option.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch lets git-am ignore --binary and removes advertisements of this
option.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-am.txt | patch | blob | history | |
git-am.sh | patch | blob | history | |
t/t0023-crlf-am.sh | patch | blob | history |
index c45c53ec2404725394563a9fba40f31cd314adb2..b9c6fac7483dbefba0afb60a76ac0362aa390a6d 100644 (file)
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
--------
[verse]
'git am' [--signoff] [--keep] [--utf8 | --no-utf8]
- [--3way] [--interactive] [--binary]
+ [--3way] [--interactive]
[--whitespace=<option>] [-C<n>] [-p<n>]
[<mbox> | <Maildir>...]
'git am' (--skip | --resolved | --abort)
it is supposed to apply to, and we have those blobs
available locally.
--b::
---binary::
- Pass `--allow-binary-replacement` flag to 'git-apply'
- (see linkgit:git-apply[1]).
-
--whitespace=<option>::
This flag is passed to the 'git-apply' (see linkgit:git-apply[1])
program that applies
diff --git a/git-am.sh b/git-am.sh
index 8f91a97eb3a07908b35de086d555822c928fd2e9..aa602618e6caedbfdd2d54ad4bb8375356cc55f6 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
--
d,dotest= (removed -- do not use)
i,interactive run interactively
-b,binary pass --allow-binary-replacement to git-apply
+b,binary (historical option -- no-op)
3,3way allow fall back on 3way merging if needed
s,signoff add a Signed-off-by line to the commit message
u,utf8 recode into utf8 (default)
echo Using index info to reconstruct a base tree...
if GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
- git apply $binary --cached <"$dotest/patch"
+ git apply --cached <"$dotest/patch"
then
mv "$dotest/patch-merge-base+" "$dotest/patch-merge-base"
mv "$dotest/patch-merge-tmp-index" "$dotest/patch-merge-index"
prec=4
dotest="$GIT_DIR/rebase-apply"
-sign= utf8=t keep= skip= interactive= resolved= binary= rebasing= abort=
+sign= utf8=t keep= skip= interactive= resolved= rebasing= abort=
resolvemsg= resume=
git_apply_opt=
-i|--interactive)
interactive=t ;;
-b|--binary)
- binary=t ;;
+ : ;;
-3|--3way)
threeway=t ;;
-s|--signoff)
--abort)
abort=t ;;
--rebasing)
- rebasing=t threeway=t keep=t binary=t ;;
+ rebasing=t threeway=t keep=t ;;
-d|--dotest)
die "-d option is no longer supported. Do not use."
;;
exit 1
}
- # -b, -s, -u, -k and --whitespace flags are kept for the
+ # -s, -u, -k and --whitespace flags are kept for the
# resuming session after a patch failure.
# -3 and -i can and must be given when resuming.
- echo "$binary" >"$dotest/binary"
echo " $ws" >"$dotest/whitespace"
echo "$sign" >"$dotest/sign"
echo "$utf8" >"$dotest/utf8"
fi
esac
-if test "$(cat "$dotest/binary")" = t
-then
- binary=--allow-binary-replacement
-fi
if test "$(cat "$dotest/utf8")" = t
then
utf8=-u
case "$resolved" in
'')
- git apply $git_apply_opt $binary --index "$dotest/patch"
+ git apply $git_apply_opt --index "$dotest/patch"
apply_status=$?
;;
t)
diff --git a/t/t0023-crlf-am.sh b/t/t0023-crlf-am.sh
index 6f8a4347d5397b8b396db800c12c6e045a0d2b7c..aaed7254023b86a30c499db7c4b069c9d08b1085 100755 (executable)
--- a/t/t0023-crlf-am.sh
+++ b/t/t0023-crlf-am.sh
test_expect_success 'am' '
- git am --binary -3 <patchfile &&
+ git am -3 <patchfile &&
git diff-files --name-status --exit-code
'