{"thread":{"id":"31259","subject":"Is there a way to find out which commit \"git rebase --skip\" skipped?","startedAt":"2012-08-16T06:59:39Z","lastAt":"2012-08-17T17:48:27Z","messageCount":4,"participants":["Luke Diamand","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"197080","messageId":"CAE5ih78tYrX0F3AZ3vrE2p=_h24njhU_rTGEqbBHfJGkGuHmpw@mail.gmail.com","threadId":"31259","inReplyTo":null,"subject":"Is there a way to find out which commit \"git rebase --skip\" skipped?","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-08-16T06:59:39Z","receivedAt":"2012-08-16T06:59:39Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"If I do \"git rebase --skip\", is there a way to find out the commit SHA\nthat was skipped (other than just parsing the output of the command) ?\n\nI'd like to modify git-p4 so that it can automatically skip past\nconflicting changes, but I'd like it to keep a log of which commits\nwere skipped.\n\nThanks,\nLuke\n"},{"id":"197101","messageId":"7va9xu3kr5.fsf@alter.siamese.dyndns.org","threadId":"31259","inReplyTo":"CAE5ih78tYrX0F3AZ3vrE2p=_h24njhU_rTGEqbBHfJGkGuHmpw@mail.gmail.com","subject":"Re: Is there a way to find out which commit \"git rebase --skip\" skipped?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-16T15:43:42Z","receivedAt":"2012-08-16T15:43:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luke Diamand <luke@diamand.org> writes:\n\n> If I do \"git rebase --skip\", is there a way to find out the commit SHA\n> that was skipped (other than just parsing the output of the command) ?\n\nThere currently isn't, and I do not think it is doable in general\nwhen the command ever gives control back to the user to futz with\nthe history, expecting the user only to fix up the conflict and make\na single commit (in which case you would want to say \"that old\ncommit was replayed as this commit with different patch id) or say\n\"rebase --skip\" (in which case you could record \"that old commit was\nmanually skipped), but the user can do other things like resetting\nthe head to lose commits that have been rebased already, adding new\ncommits manually before continuing, etc., all of which will be done\noutside of your control.\n"},{"id":"197173","messageId":"502E0F9C.5010303@diamand.org","threadId":"31259","inReplyTo":"7va9xu3kr5.fsf@alter.siamese.dyndns.org","subject":"Re: Is there a way to find out which commit \"git rebase --skip\" skipped?","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-08-17T09:32:12Z","receivedAt":"2012-08-17T09:32:12Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 16/08/12 16:43, Junio C Hamano wrote:\n> Luke Diamand<luke@diamand.org>  writes:\n>\n>> If I do \"git rebase --skip\", is there a way to find out the commit SHA\n>> that was skipped (other than just parsing the output of the command) ?\n>\n> There currently isn't, and I do not think it is doable in general\n> when the command ever gives control back to the user to futz with\n> the history, expecting the user only to fix up the conflict and make\n> a single commit (in which case you would want to say \"that old\n> commit was replayed as this commit with different patch id) or say\n> \"rebase --skip\" (in which case you could record \"that old commit was\n> manually skipped), but the user can do other things like resetting\n> the head to lose commits that have been rebased already, adding new\n> commits manually before continuing, etc., all of which will be done\n> outside of your control.\n\nAll I need is to be able to get the commit *immediately* after the \nfailed 'git rebase'. It looks like .git/ORIG_HEAD has exactly what I need.\n\nThanks,\nLuke\n"},{"id":"197199","messageId":"7vfw7lv28k.fsf@alter.siamese.dyndns.org","threadId":"31259","inReplyTo":"502E0F9C.5010303@diamand.org","subject":"Re: Is there a way to find out which commit \"git rebase --skip\" skipped?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-17T17:48:27Z","receivedAt":"2012-08-17T17:48:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luke Diamand <luke@diamand.org> writes:\n\n> All I need is to be able to get the commit *immediately* after the\n> failed 'git rebase'. It looks like .git/ORIG_HEAD has exactly what I\n> need.\n\nDepends on what you meant by \"commit that was skipped\", but the\nabove makes me nervous.  ORIG_HEAD is set to the tip of the branch\nbeing rebased at the very beginning, and updated to the current HEAD\n(i.e. the result of the last successful step) before --skip is given.\nI do not think it ever points into the commits in the original history\nthat is being replayed.\n"}]}