progit / progit2

Pro Git 2nd Edition
Other
5.83k stars 1.92k forks source link

`git am` doesn't put conflict markers #1811

Open x-yuri opened 1 year ago

x-yuri commented 1 year ago

There's no existing/similar bug report.

This report is about a single actionable bug.

This report is about the ProGit book, version 2, English language.

Bug covers book website/pdf

Problem is present in the Pro Git book on the website?

Which version of the book is affected?

Source files

Describe the bug:

This command puts conflict markers in any files it has issues with, much like a conflicted merge or rebase operation. You solve this issue much the same way — edit the file to resolve the conflict, stage the new file, and then run git am --resolved to continue to the next patch:

https://github.com/progit/progit2/blob/eb83166/book/05-distributed-git/sections/maintaining.asc

git am doesn't put conflict markers, git am -3 does.

Steps to reproduce:

Here you can find a script that demonstrates my point. Try running it as is (./a.sh) and with -3 (./a.sh -3).

Expected behavior:

I expect the text to be corrected. Along the lines of, "if it doesn't apply, the file is not changed."

Screenshots:

Additional context:

No response

Device

No response

Operating system

No response

Browser/application + version

No response