File tree Expand file tree Collapse file tree 4 files changed +36
-1
lines changed Expand file tree Collapse file tree 4 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ SYNOPSIS
12
12
'git am' [--signoff] [--keep] [--utf8 | --no-utf8]
13
13
[--3way] [--interactive]
14
14
[--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
15
+ [--reject]
15
16
[<mbox> | <Maildir>...]
16
17
'git am' (--skip | --resolved | --abort)
17
18
@@ -63,6 +64,7 @@ default. You could use `--no-utf8` to override this.
63
64
-C<n>::
64
65
-p<n>::
65
66
--directory=<dir>::
67
+ --reject::
66
68
These flags are passed to the 'git-apply' (see linkgit:git-apply[1])
67
69
program that applies
68
70
the patch.
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ whitespace= pass it through git-apply
19
19
directory= pass it through git-apply
20
20
C= pass it through git-apply
21
21
p= pass it through git-apply
22
+ reject pass it through git-apply
22
23
resolvemsg= override error message when patch failure occurs
23
24
r,resolved to be used after a patch failure
24
25
skip skip the current patch
168
169
git_apply_opt=" $git_apply_opt $( sq " $1 =$2 " ) " ; shift ;;
169
170
-C|-p)
170
171
git_apply_opt=" $git_apply_opt $( sq " $1$2 " ) " ; shift ;;
172
+ --reject)
173
+ git_apply_opt=" $git_apply_opt $1 " ;;
171
174
--)
172
175
shift ; break ;;
173
176
* )
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- test_description=' git am not losing options '
3
+ test_description=' git am with options and not losing them '
4
4
. ./test-lib.sh
5
5
6
6
tm=" $TEST_DIRECTORY /t4252"
@@ -66,4 +66,13 @@ test_expect_success 'apply to a funny path' '
66
66
test -f "$with_sq/file-5"
67
67
'
68
68
69
+ test_expect_success ' am --reject' '
70
+ rm -rf .git/rebase-apply &&
71
+ git reset --hard initial &&
72
+ test_must_fail git am --reject "$tm"/am-test-6-1 &&
73
+ grep "@@ -1,3 +1,3 @@" file-2.rej &&
74
+ test_must_fail git diff-files --exit-code --quiet file-2 &&
75
+ grep "[-]-reject" .git/rebase-apply/apply-opt
76
+ '
77
+
69
78
test_done
Original file line number Diff line number Diff line change
1
+ From: A U Thor <
[email protected] >
2
+ Date: Thu Dec 4 16:00:00 2008 -0800
3
+ Subject: Huh
4
+
5
+ Should fail and leave rejects
6
+
7
+ diff --git i/file-2 w/file-2
8
+ index 06e567b..b6f3a16 100644
9
+ --- i/file-2
10
+ +++ w/file-2
11
+ @@ -1,3 +1,3 @@
12
+ -0
13
+ +One
14
+ 2
15
+ 3
16
+ @@ -4,4 +4,4 @@
17
+ 4
18
+ 5
19
+ -6
20
+ +Six
21
+ 7
You can’t perform that action at this time.
0 commit comments