All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: Fw: sort of a bug report - git rebase dropping empty commits
       [not found] <1430956735.75040.YahooMailBasic@web172301.mail.ir2.yahoo.com>
@ 2015-05-07  0:19 ` Hin-Tak Leung
  2015-05-07  0:47   ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Hin-Tak Leung @ 2015-05-07  0:19 UTC (permalink / raw)
  To: git

Repost from another account. vger.kernel.org seems not
to like postings from my other alias (which goes through
yahoo).

> (please cc - I am not a subscriber)
>
> Recently I have started to keep some notes in git repo's
> with --allow-empty - i.e. the meaningful content is
> the commit message and the date itself, not the diff.
>
> One example I had yesterday was just committing dated
> snapshot
> of my phone contact list. (this obviously doesn't change all
> the time).
> I don't normally rebase such things, but I wanted to edit
> one
> of the commit message a moment ago. And was rather
> surprised
> that git rebase dropped a empty commit. Here is the reflog,
>
> f1c5e51 HEAD@{0}: commit: May 6 15:52
> ../mobile-2015-05-06/getphonebook-ME-r
> 828bc47 HEAD@{1}: rebase -i (finish): returning to
> refs/heads/master
> 828bc47 HEAD@{2}: rebase -i (pick): Mar 25 04:11
> ../mobile-2015-03-25/getphonebook-ME-r
> f78ccce HEAD@{3}: rebase -i (reword): Oct 17 2012
> ../mobile-phone-2012-10-17/contacts
> 978ae2c HEAD@{4}: cherry-pick: fast-forward
> 4b5cee9 HEAD@{5}: rebase -i (start): checkout
> 4b5cee9ad7d7338a368b1fdd0dd02fb9e5800b63
> 4d10a7c HEAD@{6}: commit: May 6 15:52
> ../mobile-2015-05-06/getphonebook-ME-r
> ec97077 HEAD@{7}: commit: Mar 25 04:11
> ../mobile-2015-03-25/getphonebook-ME-r
> 978ae2c HEAD@{8}: commit:
> ../mobile-phone-2012-10-17/contacts
> 4b5cee9 HEAD@{9}: commit: May 22 2010
> ../mobile-phone-2010-05-22
>
>
> so 978ae2c is reworded to f78ccce, ec97077 to 828bc47, and
> 4d10a7c was dropped
> (and I re-commit with f1c5e51).
>
> It isn't too surprising that rebase drops empty commits, but
> I would really rather
> it doesn't do that. Should this behavior qualify as a bug?
>
> This is with git 2.1.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fw: sort of a bug report - git rebase dropping empty commits
  2015-05-07  0:19 ` Fwd: Fw: sort of a bug report - git rebase dropping empty commits Hin-Tak Leung
@ 2015-05-07  0:47   ` Mikael Magnusson
  2015-06-09 23:16     ` Hin-Tak Leung
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2015-05-07  0:47 UTC (permalink / raw)
  To: Hin-Tak Leung; +Cc: git

On Thu, May 7, 2015 at 2:19 AM, Hin-Tak Leung <hintak.leung@gmail.com> wrote:
> Repost from another account. vger.kernel.org seems not
> to like postings from my other alias (which goes through
> yahoo).
>
>> (please cc - I am not a subscriber)
>>
>> Recently I have started to keep some notes in git repo's
>> with --allow-empty - i.e. the meaningful content is
>> the commit message and the date itself, not the diff.

Use the git rebase --keep-empty option?

-- 
Mikael Magnusson

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fw: sort of a bug report - git rebase dropping empty commits
  2015-05-07  0:47   ` Mikael Magnusson
@ 2015-06-09 23:16     ` Hin-Tak Leung
  0 siblings, 0 replies; 3+ messages in thread
From: Hin-Tak Leung @ 2015-06-09 23:16 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: git

Argh, thanks a lot!  Should have read the man page better. OTOH,
I expect 'git commit --allow-empty' being needed, but 'git rebase --keep-empty'
comes somewhat as a surprise - I wasn't expecting git rebase to commit
each in turn,
but of course that's what it does.

On 7 May 2015 at 01:47, Mikael Magnusson <mikachu@gmail.com> wrote:
> On Thu, May 7, 2015 at 2:19 AM, Hin-Tak Leung <hintak.leung@gmail.com> wrote:
>> Repost from another account. vger.kernel.org seems not
>> to like postings from my other alias (which goes through
>> yahoo).
>>
>>> (please cc - I am not a subscriber)
>>>
>>> Recently I have started to keep some notes in git repo's
>>> with --allow-empty - i.e. the meaningful content is
>>> the commit message and the date itself, not the diff.
>
> Use the git rebase --keep-empty option?
>
> --
> Mikael Magnusson

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-09 23:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1430956735.75040.YahooMailBasic@web172301.mail.ir2.yahoo.com>
2015-05-07  0:19 ` Fwd: Fw: sort of a bug report - git rebase dropping empty commits Hin-Tak Leung
2015-05-07  0:47   ` Mikael Magnusson
2015-06-09 23:16     ` Hin-Tak Leung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.