Re: Are these bugs?

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

 



On Aug. 28, 2008, 4:20 +0300, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Stephan Beyer <s-beyer@xxxxxxx> writes:
> 
>> Junio C Hamano wrote:
>>
>>> "Jay Soffian" <jaysoffian@xxxxxxxxx> writes:
>>>
>>>> I understand why "git reset" failed, but at best the error message is
>>>> confusing to a new user.
>>> This is in "patches welcome" category.
>> <noise>
>> But I still think it's stupid.
>> </noise>
> 
> Yes I think it is stupid.  The dummy commit does not change the fact that
> you need to special case it anyway, and special casing you can do without
> the dummy commit that will contaminate the history.  We already have such
> special case for "log -p" (--root used to be optional).  If rebasing onto
> emptiness is problematic, the command should be taught how.
> 
>> So, for a patch, is it sane to just remove/clear the index
>> if get_sha1("HEAD", sha1) fails?
> 
> As a general idea, yes, but details matter.
> 
> If the user says "git reset [--hard/--soft/--mixed] HEAD" from the command
> line, we should say "You do not even have HEAD commit".  If "git reset"
> deduced (incorrectly) that the user meant HEAD, and only in that case, we
> should clear the index.

I'm really not sure about the details, but providing a way to refer
to the empty state of the tree is needed.  For example, I don't know
how to do an interactive rebase of all commits in my tree, or to rebase
a sub-series starting at "INIT" (or "NIL" or whatever :) onto some
other base (say some remote branch).

Benny

> 
> --
> 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

--
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