git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Anatol Pomozov <anatol.pomozov@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	sverre@rabbelier.nl, Git Mailing List <git@vger.kernel.org>
Subject: Re: Re* [RFC/PATCH] extend meaning of "--root" option to index comparisons
Date: Mon, 22 Sep 2008 09:15:57 -0400	[thread overview]
Message-ID: <20080922131556.GA7133@sigill.intra.peff.net> (raw)
In-Reply-To: <3665a1a00809210858r1c494d22p77b5e9964c06424e@mail.gmail.com>

On Sun, Sep 21, 2008 at 08:58:30AM -0700, Anatol Pomozov wrote:

> revision is broken (like we have a junk in the HEAD file) from the
> case when "branch is not created yet" (which is part of normal
> workflow).
> 
> What about following algorithm. HEAD points to ref and ref is not
> created yet. Additional check could be
>  a) there are no other refs
>  or/and b) object database is empty

I don't think those things have to do with "branch not created yet".
They are about "repository has no branches".

The only thing that indicates you a branch has not been created is the
absence of that ref. So you really have two situations there:

  1. a symref like HEAD points to a branch that does not exist

  2. the user inputs a ref-name that does not exist

In the former, that means we are on a branch that hasn't been created
yet (which generally does mean a new repo, but it's possible to reach
this state in other ways). Or it means somebody made a mistake when they
updated the symref.

In the latter, it _could_ mean that we are interested in a branch yet to
be born, but in general we consider it to mean the user made a typo.

-Peff

  parent reply	other threads:[~2008-09-22 13:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15 20:01 Diff-tree does not work for initial commit Anatol Pomozov
2008-09-15 20:49 ` Michael J Gruber
2008-09-15 20:54   ` Junio C Hamano
2008-09-15 21:48     ` Anatol Pomozov
2008-09-15 21:09   ` Michael J Gruber
2008-09-15 21:11   ` Sverre Rabbelier
2008-09-15 22:34     ` Jeff King
2008-09-16  6:19       ` Sverre Rabbelier
2008-09-16  6:21         ` Jeff King
2008-09-18  9:21           ` [RFC/PATCH] extend meaning of "--root" option to index comparisons Jeff King
2008-09-18 16:31             ` Anatol Pomozov
2008-09-18 16:51               ` Sverre Rabbelier
2008-09-19 14:25               ` Jeff King
2008-09-19 16:54                 ` Anatol Pomozov
2008-09-19 17:39                   ` Jeff King
2008-09-19 20:27                 ` Re* " Junio C Hamano
2008-09-21 13:56                   ` Jeff King
2008-09-21 15:58                     ` Anatol Pomozov
2008-09-21 17:04                       ` Jakub Narebski
2008-09-22 13:15                       ` Jeff King [this message]
2008-09-21 18:48                     ` Junio C Hamano
2008-09-22 13:32                       ` Jeff King

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=20080922131556.GA7133@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=anatol.pomozov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sverre@rabbelier.nl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).