Re: Confusing error message in rebase when commit becomes empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phil Hord:

Did you have a series of three commits being squashed in your to-do
list?  I mean, did you have a list like this:

  pick ...  do foo
  squash ...  revert "do foo"
  squash ...  What I really meant to do.

Yes, that is exactly what I had. Plus an extra commit that I moved to the end, which was originally placed between the "do foo" and "revert do foo" commits (which is why I wasn't 110% sure the combination of the two would produce an empty commit).

Yes, but empty commits are discouraged on some projects. If you want your "change + revert = empty" commit to appear after the squash, I would expect you would want to use --keep-empty on your inital rebase command. But I'm not sure that will do what you expected either; it may only keep previously-empty commits during the rebase.

The thing is that I wasn't expecting it to come out empty, as I had another commit to squash into it. That the interim throw-away squashed commit was empty should have been an internal matter to rebase, IMHO.

--
\\// Peter - http://www.softwolves.pp.se/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]