All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Stephan Beyer <s-beyer@gmx.net>,
	Jay Soffian <jaysoffian@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: Are these bugs?
Date: Thu, 28 Aug 2008 11:44:08 +0300	[thread overview]
Message-ID: <48B66558.8010607@gmail.com> (raw)
In-Reply-To: <7vwsi2j5q6.fsf@gitster.siamese.dyndns.org>

On Aug. 28, 2008, 4:20 +0300, Junio C Hamano <gitster@pobox.com> wrote:
> Stephan Beyer <s-beyer@gmx.net> writes:
> 
>> Junio C Hamano wrote:
>>
>>> "Jay Soffian" <jaysoffian@gmail.com> 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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-08-28  8:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 23:36 Are these bugs? Jay Soffian
2008-08-27 23:47 ` Junio C Hamano
2008-08-28  1:04   ` Stephan Beyer
2008-08-28  1:20     ` Junio C Hamano
2008-08-28  8:44       ` Benny Halevy [this message]
     [not found]   ` <76718490808271825j68ac6abch406a8e12b5849b1a@mail.gmail.com>
2008-08-28  1:26     ` Jay Soffian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B66558.8010607@gmail.com \
    --to=bhalevy@panasas.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=s-beyer@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.