{"thread":{"id":"39265","subject":"Fwd: Fw: sort of a bug report - git rebase dropping empty commits","startedAt":"2015-05-07T00:19:42Z","lastAt":"2015-06-09T23:16:04Z","messageCount":3,"participants":["Hin-Tak Leung","Mikael Magnusson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"260697","messageId":"CAJMB+NhVapp+upsk2AQQmZndaNFjaOieom7=n6mY31v0QemaYA@mail.gmail.com","threadId":"39265","inReplyTo":"1430956735.75040.YahooMailBasic@web172301.mail.ir2.yahoo.com","subject":"Fwd: Fw: sort of a bug report - git rebase dropping empty commits","fromName":"Hin-Tak Leung","fromEmail":"hintak.leung@gmail.com","sentAt":"2015-05-07T00:19:42Z","receivedAt":"2015-05-07T00:19:42Z","isPatch":false,"sender":{"key":"hintak.leung@gmail.com","avatar":null},"body":"Repost from another account. vger.kernel.org seems not\nto like postings from my other alias (which goes through\nyahoo).\n\n> (please cc - I am not a subscriber)\n>\n> Recently I have started to keep some notes in git repo's\n> with --allow-empty - i.e. the meaningful content is\n> the commit message and the date itself, not the diff.\n>\n> One example I had yesterday was just committing dated\n> snapshot\n> of my phone contact list. (this obviously doesn't change all\n> the time).\n> I don't normally rebase such things, but I wanted to edit\n> one\n> of the commit message a moment ago. And was rather\n> surprised\n> that git rebase dropped a empty commit. Here is the reflog,\n>\n> f1c5e51 HEAD@{0}: commit: May 6 15:52\n> ../mobile-2015-05-06/getphonebook-ME-r\n> 828bc47 HEAD@{1}: rebase -i (finish): returning to\n> refs/heads/master\n> 828bc47 HEAD@{2}: rebase -i (pick): Mar 25 04:11\n> ../mobile-2015-03-25/getphonebook-ME-r\n> f78ccce HEAD@{3}: rebase -i (reword): Oct 17 2012\n> ../mobile-phone-2012-10-17/contacts\n> 978ae2c HEAD@{4}: cherry-pick: fast-forward\n> 4b5cee9 HEAD@{5}: rebase -i (start): checkout\n> 4b5cee9ad7d7338a368b1fdd0dd02fb9e5800b63\n> 4d10a7c HEAD@{6}: commit: May 6 15:52\n> ../mobile-2015-05-06/getphonebook-ME-r\n> ec97077 HEAD@{7}: commit: Mar 25 04:11\n> ../mobile-2015-03-25/getphonebook-ME-r\n> 978ae2c HEAD@{8}: commit:\n> ../mobile-phone-2012-10-17/contacts\n> 4b5cee9 HEAD@{9}: commit: May 22 2010\n> ../mobile-phone-2010-05-22\n>\n>\n> so 978ae2c is reworded to f78ccce, ec97077 to 828bc47, and\n> 4d10a7c was dropped\n> (and I re-commit with f1c5e51).\n>\n> It isn't too surprising that rebase drops empty commits, but\n> I would really rather\n> it doesn't do that. Should this behavior qualify as a bug?\n>\n> This is with git 2.1.0\n"},{"id":"260698","messageId":"CAHYJk3QOuo=p26OAnkKmrPS0SzpdJGvB=Fm=jiMMDDJo13zi9A@mail.gmail.com","threadId":"39265","inReplyTo":"CAJMB+NhVapp+upsk2AQQmZndaNFjaOieom7=n6mY31v0QemaYA@mail.gmail.com","subject":"Re: Fw: sort of a bug report - git rebase dropping empty commits","fromName":"Mikael Magnusson","fromEmail":"mikachu@gmail.com","sentAt":"2015-05-07T00:47:11Z","receivedAt":"2015-05-07T00:47:11Z","isPatch":false,"sender":{"key":"mikachu@gmail.com","avatar":null},"body":"On Thu, May 7, 2015 at 2:19 AM, Hin-Tak Leung <hintak.leung@gmail.com> wrote:\n> Repost from another account. vger.kernel.org seems not\n> to like postings from my other alias (which goes through\n> yahoo).\n>\n>> (please cc - I am not a subscriber)\n>>\n>> Recently I have started to keep some notes in git repo's\n>> with --allow-empty - i.e. the meaningful content is\n>> the commit message and the date itself, not the diff.\n\nUse the git rebase --keep-empty option?\n\n-- \nMikael Magnusson\n"},{"id":"263416","messageId":"CAJMB+NgqcydSzt--L+2kLmtNYp2kzhifEdYfgnEbcbwOovH_7A@mail.gmail.com","threadId":"39265","inReplyTo":"CAHYJk3QOuo=p26OAnkKmrPS0SzpdJGvB=Fm=jiMMDDJo13zi9A@mail.gmail.com","subject":"Re: Fw: sort of a bug report - git rebase dropping empty commits","fromName":"Hin-Tak Leung","fromEmail":"hintak.leung@gmail.com","sentAt":"2015-06-09T23:16:04Z","receivedAt":"2015-06-09T23:16:04Z","isPatch":false,"sender":{"key":"hintak.leung@gmail.com","avatar":null},"body":"Argh, thanks a lot!  Should have read the man page better. OTOH,\nI expect 'git commit --allow-empty' being needed, but 'git rebase --keep-empty'\ncomes somewhat as a surprise - I wasn't expecting git rebase to commit\neach in turn,\nbut of course that's what it does.\n\nOn 7 May 2015 at 01:47, Mikael Magnusson <mikachu@gmail.com> wrote:\n> On Thu, May 7, 2015 at 2:19 AM, Hin-Tak Leung <hintak.leung@gmail.com> wrote:\n>> Repost from another account. vger.kernel.org seems not\n>> to like postings from my other alias (which goes through\n>> yahoo).\n>>\n>>> (please cc - I am not a subscriber)\n>>>\n>>> Recently I have started to keep some notes in git repo's\n>>> with --allow-empty - i.e. the meaningful content is\n>>> the commit message and the date itself, not the diff.\n>\n> Use the git rebase --keep-empty option?\n>\n> --\n> Mikael Magnusson\n"}]}