{"thread":{"id":"4693","subject":"Re: [PATCH 1/2] rebase: check for errors from git-commit","startedAt":"2006-06-28T09:33:22Z","lastAt":"2006-06-28T09:56:46Z","messageCount":4,"participants":["Junio C Hamano","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"22785","messageId":"20060628093322.GA29036@hand.yhbt.net","threadId":"4693","inReplyTo":"7v1wt94oom.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/2] rebase: check for errors from git-commit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-06-28T09:33:22Z","receivedAt":"2006-06-28T09:33:22Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> Eric Wong <normalperson@yhbt.net> writes:\n> \n> >  I've grown used to having 'set -e' at the beginning of my shell\n> >  scripts.  IMHO it'd be a good idea to start moving towards this\n> >  eventually (even though shell scripts seem to be getting phased-out\n> >  somewhat).\n> >\n> >  git-rebase.sh |    2 +-\n> >  1 files changed, 1 insertions(+), 1 deletions(-)\n> >\n> > diff --git a/git-rebase.sh b/git-rebase.sh\n> > index 9ad1c44..47c8e8f 100755\n> > --- a/git-rebase.sh\n> > +++ b/git-rebase.sh\n> > @@ -59,8 +59,8 @@ continue_merge () {\n> >  \n> >  \tif test -n \"`git-diff-index HEAD`\"\n> >  \tthen\n> > +\t\tgit-commit -C \"`cat $dotest/current`\" || die 'Commit failed'\n> >  \t\tprintf \"Committed: %0${prec}d\" $msgnum\n> > -\t\tgit-commit -C \"`cat $dotest/current`\"\n> \n> Anticipating failure from \"git-commit\" is the right thing to do,\n> but this is a \"Now what?\" situation.  What is the expected\n> course of action to recover from this for the end user, and how\n> can we phrase the error message to help that process?\n\nI would expect git-commit to show the correct error message (or the\npre-commit hook), die \"$RESOLVEMSG\" might be a better option, though.\n\n-- \nEric Wong\n"},{"id":"22724","messageId":"7vveql38zr.fsf@assigned-by-dhcp.cox.net","threadId":"4693","inReplyTo":"20060628093322.GA29036@hand.yhbt.net","subject":"Re: [PATCH 1/2] rebase: check for errors from git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-28T09:49:44Z","receivedAt":"2006-06-28T09:49:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Junio C Hamano <junkio@cox.net> wrote:\n>\n>> Anticipating failure from \"git-commit\" is the right thing to do,\n>> but this is a \"Now what?\" situation.  What is the expected\n>> course of action to recover from this for the end user, and how\n>> can we phrase the error message to help that process?\n>\n> I would expect git-commit to show the correct error message (or the\n> pre-commit hook), die \"$RESOLVEMSG\" might be a better option, though.\n\nIt would say 'resolve conflicts, mark them with update-index as\nnecessary, and say git-commit' or somesuch.  I am not sure you\nwould want the user to make a commit like suggested -- instead\nyou would want him to say 'git rebase --continue' wouldn't you?\n"},{"id":"22726","messageId":"20060628095454.GA23948@soma","threadId":"4693","inReplyTo":"7vveql38zr.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/2] rebase: check for errors from git-commit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-06-28T09:54:54Z","receivedAt":"2006-06-28T09:54:54Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> Eric Wong <normalperson@yhbt.net> writes:\n> \n> > Junio C Hamano <junkio@cox.net> wrote:\n> >\n> >> Anticipating failure from \"git-commit\" is the right thing to do,\n> >> but this is a \"Now what?\" situation.  What is the expected\n> >> course of action to recover from this for the end user, and how\n> >> can we phrase the error message to help that process?\n> >\n> > I would expect git-commit to show the correct error message (or the\n> > pre-commit hook), die \"$RESOLVEMSG\" might be a better option, though.\n> \n> It would say 'resolve conflicts, mark them with update-index as\n> necessary, and say git-commit' or somesuch.  I am not sure you\n> would want the user to make a commit like suggested -- instead\n> you would want him to say 'git rebase --continue' wouldn't you?\n\nActually RESOLVEMSG in git-rebase just tells the user about the\n--continue, --skip, --abort options.\n\n-- \nEric Wong\n"},{"id":"22727","messageId":"7vmzbx38o1.fsf@assigned-by-dhcp.cox.net","threadId":"4693","inReplyTo":"20060628095454.GA23948@soma","subject":"Re: [PATCH 1/2] rebase: check for errors from git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-28T09:56:46Z","receivedAt":"2006-06-28T09:56:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Junio C Hamano <junkio@cox.net> wrote:\n>> Eric Wong <normalperson@yhbt.net> writes:\n>> \n>> > Junio C Hamano <junkio@cox.net> wrote:\n>> >\n>> >> Anticipating failure from \"git-commit\" is the right thing to do,\n>> >> but this is a \"Now what?\" situation.  What is the expected\n>> >> course of action to recover from this for the end user, and how\n>> >> can we phrase the error message to help that process?\n>> >\n>> > I would expect git-commit to show the correct error message (or the\n>> > pre-commit hook), die \"$RESOLVEMSG\" might be a better option, though.\n>> \n>> It would say 'resolve conflicts, mark them with update-index as\n>> necessary, and say git-commit' or somesuch.  I am not sure you\n>> would want the user to make a commit like suggested -- instead\n>> you would want him to say 'git rebase --continue' wouldn't you?\n>\n> Actually RESOLVEMSG in git-rebase just tells the user about the\n> --continue, --skip, --abort options.\n\nYup, so telling the user to disregard what commit might say (but\ndo not hide it by redirecting 2>/dev/null, please) and dying\nwith \"$RESOLVEMSG\" might be a better way.\n"}]}