git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Documentation/git-merge.txt: weaken warning about uncommited changes

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Jun 18, 2013, 08:42 UTC
Message-ID
<1371544975-18703-1-git-send-email-Matthieu.Moy@imag.fr>

Commit 35d2fffd introduced 'git merge --abort' as a synonym to 'git reset --merge', and added some failing tests in t7611-merge-abort.sh (search '###' in this file) showing that 'git merge --abort' could not always recover the pre-merge state.

Still, in many cases, 'git merge --abort' just works, and it is usually considered that the ability to start a merge with uncommited changes is an important property of Git.

Weaken the warning by discouraging only merge with /non-trivial/ uncommited changes.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
This is a followup to an old discussion:
http://thread.gmane.org/gmane.comp.version-control.git/221069

I don't think documenting all the failure cases in the doc would be a good idea, so I've left the "in some cases" part.

 Documentation/git-merge.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 67ca99c..8c7f2f6 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -56,8 +56,8 @@ especially if those changes were further modified after the merge
 was started), 'git merge --abort' will in some cases be unable to
 reconstruct the original (pre-merge) changes. Therefore:
 
-*Warning*: Running 'git merge' with uncommitted changes is
-discouraged: while possible, it leaves you in a state that is hard to
+*Warning*: Running 'git merge' with non-trivial uncommitted changes is
+discouraged: while possible, it may leave you in a state that is hard to
 back out of in the case of a conflict.
 
 
-- 
1.8.3.1.495.g13f33cf.dirty
Next: Ramkumar Ramachandra
Message 1 of 4 in “Documentation/git-merge.txt: weaken warning about uncommited changes”
  1. Documentation/git-merge.txt: weaken warning about uncommited changesMatthieu Moy, Jun 18, 2013
  2. Ramkumar RamachandraJun 18, 2013
  3. Matthieu MoyJun 18, 2013
  4. Junio C HamanoJun 18, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.