{"thread":{"id":"34190","subject":"[PATCH] Documentation/git-merge.txt: weaken warning about uncommited changes","startedAt":"2013-06-18T08:42:55Z","lastAt":"2013-06-18T14:57:23Z","messageCount":4,"participants":["Matthieu Moy","Ramkumar Ramachandra","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"221162","messageId":"1371544975-18703-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"34190","inReplyTo":null,"subject":"[PATCH] Documentation/git-merge.txt: weaken warning about uncommited changes","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-06-18T08:42:55Z","receivedAt":"2013-06-18T08:42:55Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Commit 35d2fffd introduced 'git merge --abort' as a synonym to 'git reset\n--merge', and added some failing tests in t7611-merge-abort.sh (search\n'###' in this file) showing that 'git merge --abort' could not always\nrecover the pre-merge state.\n\nStill, in many cases, 'git merge --abort' just works, and it is usually\nconsidered that the ability to start a merge with uncommited changes is\nan important property of Git.\n\nWeaken the warning by discouraging only merge with /non-trivial/\nuncommited changes.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\nThis is a followup to an old discussion:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/221069\n\nI don't think documenting all the failure cases in the doc would be a\ngood idea, so I've left the \"in some cases\" part.\n\n Documentation/git-merge.txt | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt\nindex 67ca99c..8c7f2f6 100644\n--- a/Documentation/git-merge.txt\n+++ b/Documentation/git-merge.txt\n@@ -56,8 +56,8 @@ especially if those changes were further modified after the merge\n was started), 'git merge --abort' will in some cases be unable to\n reconstruct the original (pre-merge) changes. Therefore:\n \n-*Warning*: Running 'git merge' with uncommitted changes is\n-discouraged: while possible, it leaves you in a state that is hard to\n+*Warning*: Running 'git merge' with non-trivial uncommitted changes is\n+discouraged: while possible, it may leave you in a state that is hard to\n back out of in the case of a conflict.\n \n \n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"221164","messageId":"CALkWK0=USVa2htHSTyj4C7FrKEko-e_UGAnu-3UNvx_ue1vwig@mail.gmail.com","threadId":"34190","inReplyTo":"1371544975-18703-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH] Documentation/git-merge.txt: weaken warning about uncommited changes","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-18T08:49:28Z","receivedAt":"2013-06-18T08:49:28Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Matthieu Moy wrote:\n> Weaken the warning by discouraging only merge with /non-trivial/\n> uncommited changes.\n>\n> I don't think documenting all the failure cases in the doc would be a\n> good idea, so I've left the \"in some cases\" part.\n\nIt's already documented in the pre-merge checks section, as Jonathan\npointed out [1].  We should update the documentation to point to it: I\ndo not think \"non-trivial\" is much of an improvement.\n\n[1]: http://thread.gmane.org/gmane.comp.version-control.git/221069/focus=221366\n"},{"id":"221166","messageId":"vpqppvju794.fsf@anie.imag.fr","threadId":"34190","inReplyTo":"CALkWK0=USVa2htHSTyj4C7FrKEko-e_UGAnu-3UNvx_ue1vwig@mail.gmail.com","subject":"Re: [PATCH] Documentation/git-merge.txt: weaken warning about uncommited changes","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-06-18T08:56:39Z","receivedAt":"2013-06-18T08:56:39Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Matthieu Moy wrote:\n>> Weaken the warning by discouraging only merge with /non-trivial/\n>> uncommited changes.\n>>\n>> I don't think documenting all the failure cases in the doc would be a\n>> good idea, so I've left the \"in some cases\" part.\n>\n> It's already documented in the pre-merge checks section, as Jonathan\n> pointed out [1]. \n\nI had missed this one. But that's not the only case, you may also have\nproblems with renames. The complete list would be really long to have\nhere, and won't bring much to the user.\n\n> We should update the documentation to point to it: I do not think\n> \"non-trivial\" is much of an improvement.\n\nActually, I think it essentially says it all. If your changes are\nimportant enough to deserve a real backup, you should stash or commit.\nIf you're ready to take the risk of losing it (the risk is small, but\ndoes exist), it's OK to run \"git merge\" blindly.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"221233","messageId":"7vmwqn8o18.fsf@alter.siamese.dyndns.org","threadId":"34190","inReplyTo":"vpqppvju794.fsf@anie.imag.fr","subject":"Re: [PATCH] Documentation/git-merge.txt: weaken warning about uncommited changes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-18T14:57:23Z","receivedAt":"2013-06-18T14:57:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>\n>> Matthieu Moy wrote:\n>>> Weaken the warning by discouraging only merge with /non-trivial/\n>>> uncommited changes.\n>>>\n>>> I don't think documenting all the failure cases in the doc would be a\n>>> good idea, so I've left the \"in some cases\" part.\n>>\n>> It's already documented in the pre-merge checks section, as Jonathan\n>> pointed out [1]. \n>\n> I had missed this one. But that's not the only case, you may also have\n> problems with renames. The complete list would be really long to have\n> here, and won't bring much to the user.\n\nTrue.\n\nAfter having re-read the thread up to the message from Jonathan, I\nsuspect that a \"merge\" half of \"pull --autosquash\" series (which had\nto be dropped) was based on a misunderstanding and we didn't have to\nhave that discussion if the documentation were a little less\ndiscouraging about merging in a dirty working tree?\n\n>> We should update the documentation to point to it: I do not think\n>> \"non-trivial\" is much of an improvement.\n>\n> Actually, I think it essentially says it all. If your changes are\n> important enough to deserve a real backup, you should stash or commit.\n> If you're ready to take the risk of losing it (the risk is small, but\n> does exist), it's OK to run \"git merge\" blindly.\n\nYour documentation update makes sure that we are less discouraging,\nI think.  It does not have to be the only phrasing (hinting others\nto try to come up with a beeter version if they are so inclined),\nbut it is going in the right direction.\n"}]}