Re: rebase --onto might "loose" commits

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

 



Hi,

On 2008.02.19 11:05:40 +0000, Johannes Schindelin wrote:
> On Tue, 19 Feb 2008, Björn Steinbrink wrote:
> 
> > when there's nothing to rebase (ie. upstream..branch is empty), rebase 
> > fails to find any commits to rebase and correctly says "Nothing to do", 
> > but when --onto is given, we already did a "reset --hard" to newbase, so 
> > it already _did_ something.
> 
> Yes, it did something.  But if you had that:
> 
> A - B - C - D - E
>   \
>     F
> 
> your HEAD was E, and you said "git rebase --onto F E" what exactly do you
> want it to do?  There is no commit between E and E, so it rebases
> _nothing_ onto F.  Which means that F should be your new state.

Strictly, it's correct, but the "Nothing to do" message is a bit
misleading (IMHO) and the error message made me think, that it actually
didn't want to do anything.

I'm a bit unsure about rebase being degraded to a "reset --hard" in this
case is a good idea. Might be a nice user-protection to make rebase
abort when there's nothing to rebase and --onto is given. But I don't
care that much.

Thanks,
Björn

> P.S.: I was being corrected some time ago on the same typo: "to lose" 
> means to get rid of something unintentionally, "to loose" does not exist, 
> and "to loosen" means to make something less tight.

Ah yeah, one of my preferred typos. There's about a 50% chance for me to
get that right. Although it already felt wrong when I read over the
mail, for some unknown reason I couldn't put my finger on the typo. ;-)
-
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]

  Powered by Linux