Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 15dc5b5

Browse files
committed
Revert "git-am: add am.threeWay config variable"
This reverts commit d96a275. It used to be possible to apply a patch series with "git am mbox" and then only after seeing a failure, switch to three-way mode via "git am -3" (no other options or arguments). The commit being reverted broke this workflow. Signed-off-by: Junio C Hamano <[email protected]>
1 parent f99a38c commit 15dc5b5

File tree

4 files changed

+2
-41
lines changed

4 files changed

+2
-41
lines changed

Documentation/config.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -769,14 +769,6 @@ am.keepcr::
769769
by giving '--no-keep-cr' from the command line.
770770
See linkgit:git-am[1], linkgit:git-mailsplit[1].
771771

772-
am.threeWay::
773-
By default, `git am` will fail if the patch does not apply cleanly. When
774-
set to true, this setting tells `git am` to fall back on 3-way merge if
775-
the patch records the identity of blobs it is supposed to apply to and
776-
we have those blobs available locally (equivalent to giving the `--3way`
777-
option from the command line). Defaults to `false`.
778-
See linkgit:git-am[1].
779-
780772
apply.ignoreWhitespace::
781773
When set to 'change', tells 'git apply' to ignore changes in
782774
whitespace, in the same way as the '--ignore-space-change'

Documentation/git-am.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SYNOPSIS
1010
--------
1111
[verse]
1212
'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8]
13-
[--[no-]3way] [--interactive] [--committer-date-is-author-date]
13+
[--3way] [--interactive] [--committer-date-is-author-date]
1414
[--ignore-date] [--ignore-space-change | --ignore-whitespace]
1515
[--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
1616
[--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet]
@@ -90,13 +90,10 @@ default. You can use `--no-utf8` to override this.
9090

9191
-3::
9292
--3way::
93-
--no-3way::
9493
When the patch does not apply cleanly, fall back on
9594
3-way merge if the patch records the identity of blobs
9695
it is supposed to apply to and we have those blobs
97-
available locally. `--no-3way` can be used to override
98-
am.threeWay configuration variable. For more information,
99-
see am.threeWay in linkgit:git-config[1].
96+
available locally.
10097

10198
--ignore-space-change::
10299
--ignore-whitespace::

git-am.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,6 @@ then
393393
keepcr=t
394394
fi
395395

396-
if test "$(git config --bool --get am.threeWay)" = true
397-
then
398-
threeway=t
399-
fi
400-
401396
while test $# != 0
402397
do
403398
case "$1" in
@@ -409,8 +404,6 @@ it will be removed. Please do not use it anymore."
409404
;;
410405
-3|--3way)
411406
threeway=t ;;
412-
--no-3way)
413-
threeway=f ;;
414407
-s|--signoff)
415408
sign=t ;;
416409
-u|--utf8)
@@ -680,8 +673,6 @@ fi
680673
if test "$(cat "$dotest/threeway")" = t
681674
then
682675
threeway=t
683-
else
684-
threeway=f
685676
fi
686677
git_apply_opt=$(cat "$dotest/apply-opt")
687678
if test "$(cat "$dotest/sign")" = t

t/t4150-am.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -303,25 +303,6 @@ test_expect_success 'am -3 -p0 can read --no-prefix patch' '
303303
git diff --exit-code lorem
304304
'
305305

306-
test_expect_success 'am with config am.threeWay falls back to 3-way merge' '
307-
rm -fr .git/rebase-apply &&
308-
git reset --hard &&
309-
git checkout -b lorem4 base3way &&
310-
test_config am.threeWay 1 &&
311-
git am lorem-move.patch &&
312-
test_path_is_missing .git/rebase-apply &&
313-
git diff --exit-code lorem
314-
'
315-
316-
test_expect_success 'am with config am.threeWay overridden by --no-3way' '
317-
rm -fr .git/rebase-apply &&
318-
git reset --hard &&
319-
git checkout -b lorem5 base3way &&
320-
test_config am.threeWay 1 &&
321-
test_must_fail git am --no-3way lorem-move.patch &&
322-
test_path_is_dir .git/rebase-apply
323-
'
324-
325306
test_expect_success 'am can rename a file' '
326307
grep "^rename from" rename.patch &&
327308
rm -fr .git/rebase-apply &&

0 commit comments

Comments
 (0)