Skip to contentSkip to conversation

No way to resolve git am conflicts.

DISCUSSION Stephen Kelly 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw
kde-devel@bishop:~/dev/src/git{master}$ curl -o the.patch 
http://download.gmane.org/gmane.comp.version-control.git/164809/164810 && 
git am the.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  
Current
                                 Dload  Upload   Total   Spent    Left  
Speed
100 10438    0 10438    0     0  12046      0 --:--:-- --:--:-- --:--:-- 
13451
Applying: Introduce new configuation option to override committer 
information
error: patch failed: builtin/commit.c:1352
error: builtin/commit.c: patch does not apply
Patch failed at 0001 Introduce new configuation option to override committer 
information
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Qt( 4.7 ) KDE ( 4.6 ) 
kde-devel@bishop:~/dev/src/git{master}$ git diff
Qt( 4.7 ) KDE ( 4.6 ) 
kde-devel@bishop:~/dev/src/git{master}$ git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       p.patch
#       the.patch
nothing added to commit but untracked files present (use "git add" to track)
Qt( 4.7 ) KDE ( 4.6 ) 
kde-devel@bishop:~/dev/src/git{master}$ 

As git status doesn't tell me what the conflict is, I can't resolve it.

#1 lore raw
Quoted 1 line · Stephen Kelly

git am the.patch

[...]

Quoted 10 lines

Applying: Introduce new configuation option to override committer information
error: patch failed: builtin/commit.c:1352
error: builtin/commit.c: patch does not apply
Patch failed at 0001 Introduce new configuation option to override committer information
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort".

$ git diff

[...]

Quoted 1 line

As git status doesn't tell me what the conflict is, I can't resolve it.

Have you tried "git am -3" or "git am --reject" (after "git am --abort")?

I agree that the hints printed are suboptimal in this case. Please feel free to make them better if you have time for it. :)

#2 lore raw
Quoted 14 lines · Jonathan Nieder
Quoted 1 line · Stephen Kelly

git am the.patch

[...]

Quoted 10 lines

Applying: Introduce new configuation option to override committer information
error: patch failed: builtin/commit.c:1352
error: builtin/commit.c: patch does not apply
Patch failed at 0001 Introduce new configuation option to override committer information
When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort".

$ git diff
Quoted 5 lines

[...]

Quoted 1 line

As git status doesn't tell me what the conflict is, I can't resolve it.

Have you tried "git am -3" or "git am --reject" (after "git am --abort")?

git am -3 worked, thanks.

Quoted 3 lines

I agree that the hints printed are suboptimal in this case. Please feel free to make them better if you have time for it. :)