{"thread":{"id":"9581","subject":"[PATCH] A more sensible error message why 'git rebase --continue' failed","startedAt":"2007-08-20T01:13:38Z","lastAt":"2007-08-20T13:59:02Z","messageCount":5,"participants":["Evan Phoenix","Junio C Hamano","Johannes Sixt","Steven Grimm"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"51033","messageId":"11875724181583-git-send-email-evan@fallingsnow.net","threadId":"9581","inReplyTo":null,"subject":"[PATCH] A more sensible error message why 'git rebase --continue' failed","fromName":"Evan Phoenix","fromEmail":"evan@fallingsnow.net","sentAt":"2007-08-20T01:13:38Z","receivedAt":"2007-08-20T01:13:38Z","isPatch":true,"sender":{"key":"evan@fallingsnow.net","avatar":null},"body":"The current message is a bit cryptic, indicating that only changes which contained\nmerge conflicts should be added to the index, but in fact, all outstanding\nchanges must be.\n\nThe change could also incorporate a -i that prompts the user and performs\n'git add -u' if they wish, allowing the rebase to properly continue.\n\nSigned-off-by: Evan Phoenix <evan@fallingsnow.net>\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex cbafa14..c67f29a 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -135,8 +135,12 @@ do\n \tcase \"$1\" in\n \t--continue)\n \t\tgit diff-files --quiet || {\n-\t\t\techo \"You must edit all merge conflicts and then\"\n-\t\t\techo \"mark them as resolved using git add\"\n+                        echo \"Unable to continue rebase:\"\n+                        echo \"  All modified files must be added to index first.\"\n+                        echo \"  Use 'git add' to resolve them and add them to the index.\"\n+                        echo\n+                        echo \"Outstanding files:\"\n+                        git diff-files --name-status\n \t\t\texit 1\n \t\t}\n \t\tif test -d \"$dotest\"\n-- \n1.5.3.rc5.41.gc1c22\n"},{"id":"51047","messageId":"7vzm0m90ye.fsf@gitster.siamese.dyndns.org","threadId":"9581","inReplyTo":"11875724181583-git-send-email-evan@fallingsnow.net","subject":"Re: [PATCH] A more sensible error message why 'git rebase --continue' failed","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-20T06:25:45Z","receivedAt":"2007-08-20T06:25:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Evan Phoenix <evan@fallingsnow.net> writes:\n\n> The current message is a bit cryptic, indicating that only\n> changes which contained merge conflicts should be added to the\n> index, but in fact, all outstanding changes must be.\n\nThat might be true, and we might want a better yet still concise\nwording for the suggestion.\n\n\nYour wording, however, would lead a new user to run \"git add\"\neven before resolving the conflicts, and then make him complain\n\"why doesn't git do that for me\", and then again complain \"gaah,\nI followed the suggestion and ended up committing garbage with\nfunny <<< === >>> lines in it\".\n\nSo in that sense, I do not necessarily see _your_ new wording an\nimprovement.\n\n> @@ -135,8 +135,12 @@ do\n>  \tcase \"$1\" in\n>  \t--continue)\n>  \t\tgit diff-files --quiet || {\n> -\t\t\techo \"You must edit all merge conflicts and then\"\n> -\t\t\techo \"mark them as resolved using git add\"\n> +                        echo \"Unable to continue rebase:\"\n> +                        echo \"  All modified files must be added to index first.\"\n\nAlso I see whitespace breackages here --- did you intend to\nreplace tabs with spaces, and if so why?\n"},{"id":"51056","messageId":"2D8BF484-7990-4DDC-9E52-69143D4BA413@fallingsnow.net","threadId":"9581","inReplyTo":"7vzm0m90ye.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] A more sensible error message why 'git rebase --continue' failed","fromName":"Evan Phoenix","fromEmail":"evan@fallingsnow.net","sentAt":"2007-08-20T07:10:10Z","receivedAt":"2007-08-20T07:10:10Z","isPatch":true,"sender":{"key":"evan@fallingsnow.net","avatar":null},"body":"\nOn Aug 19, 2007, at 11:25 PM, Junio C Hamano wrote:\n\n> Evan Phoenix <evan@fallingsnow.net> writes:\n>\n>> The current message is a bit cryptic, indicating that only\n>> changes which contained merge conflicts should be added to the\n>> index, but in fact, all outstanding changes must be.\n>\n> That might be true, and we might want a better yet still concise\n> wording for the suggestion.\n>\n>\n> Your wording, however, would lead a new user to run \"git add\"\n> even before resolving the conflicts, and then make him complain\n> \"why doesn't git do that for me\", and then again complain \"gaah,\n> I followed the suggestion and ended up committing garbage with\n> funny <<< === >>> lines in it\".\n\nHm, a good point.\n\nHow about something like\n\n\"Please verify all merge conflicts in all modified files, then run\n'git add' to resolve them.\"\n\nOr perhaps the behavior of rebase needs to be altered a bit\nhere. 'git ls-files -u' can detect there exists outstanding, unmerged\nfiles. If those still exist, it should certainly stop outright. But,\nit seems to me that if there are no unmerged files and still just\nnormal modified ones (git ls-files -m), 'git rebase --continue' should\nbe able to run 'git add -u' for the user.\n\nOutside that, I do agree that the wording should be more stern about\nchecking all modified files before running 'git add'.\n\n>\n> So in that sense, I do not necessarily see _your_ new wording an\n> improvement.\n>\n>> @@ -135,8 +135,12 @@ do\n>>  \tcase \"$1\" in\n>>  \t--continue)\n>>  \t\tgit diff-files --quiet || {\n>> -\t\t\techo \"You must edit all merge conflicts and then\"\n>> -\t\t\techo \"mark them as resolved using git add\"\n>> +                        echo \"Unable to continue rebase:\"\n>> +                        echo \"  All modified files must be added  \n>> to index first.\"\n>\n> Also I see whitespace breackages here --- did you intend to\n> replace tabs with spaces, and if so why?\n\nA mistake on my part. I sent in a new patch eariler but ended up having\nmail server troubles. I've already got a new version that keeps the\ntabs as they should be. The next version will be proper.\n\n  - Evan Phoenix / evan@fallingsnow.net\n"},{"id":"51073","messageId":"46C96060.7AC79FAD@eudaptics.com","threadId":"9581","inReplyTo":"11875724181583-git-send-email-evan@fallingsnow.net","subject":"Re: [PATCH] A more sensible error message why 'git rebase --continue' failed","fromName":"Johannes Sixt","fromEmail":"j.sixt@eudaptics.com","sentAt":"2007-08-20T09:35:28Z","receivedAt":"2007-08-20T09:35:28Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Evan Phoenix wrote:\n> \n> The current message is a bit cryptic, indicating that only changes which contained\n> merge conflicts should be added to the index, but in fact, all outstanding\n> changes must be.\n\nI don't think that all files must be added if rebase -m was used: in\nthis case, non-conflicting changes are already in the index.\n\n-- Hannes\n"},{"id":"51089","messageId":"46C99E26.2020009@midwinter.com","threadId":"9581","inReplyTo":"2D8BF484-7990-4DDC-9E52-69143D4BA413@fallingsnow.net","subject":"Re: [PATCH] A more sensible error message why 'git rebase --continue' failed","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2007-08-20T13:59:02Z","receivedAt":"2007-08-20T13:59:02Z","isPatch":true,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"Evan Phoenix wrote:\n> How about something like\n>\n> \"Please verify all merge conflicts in all modified files, then run\n> 'git add' to resolve them.\"\n\nSince we're nitpicking language here... \"git add\" doesn't resolve \nanything. *You* resolve the conflicts (by editing the file and removing \nthe conflict markers and editing the code, by running git mergetool, \netc.) then you run \"git add\" to tell git that you're done resolving.\n\nIf I literally followed the above, I would run \"less\" on a file, say, \n\"Yep, git flagged all the merge conflicts correctly,\" then run \"git add\" \nfiguring it would pop me into some kind of conflict resolution UI. \nActually it's worse than that -- the above implies that all modified \nfiles will have merge conflicts, which is certainly not true in many cases.\n\nHow about:\n\n\"Please resolve all merge conflicts, then run 'git add' to tell git you've\nfinished resolving each file.\"\n\n-Steve\n"}]}