Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Julian Phillips <julian@quantumfyre.co.uk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-symbolic-ref: fix error message when ref doesn't exist
Date: Mon, 19 Mar 2007 01:47:08 -0700	[thread overview]
Message-ID: <7vslc1iprn.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070318020645.2444.75365.julian@quantumfyre.co.uk> (Julian Phillips's message of "Sun, 18 Mar 2007 01:53:02 +0000")

Julian Phillips <julian@quantumfyre.co.uk> writes:

> When calling resolve_ref from check_symref set reading to 1, since we
> do want to know if the given ref doesn't exist.  This means that
> "git symbolic-ref foo" will now print "fatal: No such ref: foo" as
> expected.

Hmmmm.  That would break:

	$ rm -fr a; mkdir a; cd a
	$ git init-db
        $ git symbolic-ref HEAD
        refs/heads/master

wouldn't it?  We do want it not to fail and tell us that the
commit we are going to create will be on refs/heads/master
(i.e. "the master branch").

And  the command errors out as expected when given a
non-existent symbolic ref:

	$ git symbolic-ref no-such; echo $?
	fatal: ref no-such is not a symbolic ref
	128

  reply	other threads:[~2007-03-19  8:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18  1:53 [PATCH] git-symbolic-ref: fix error message when ref doesn't exist Julian Phillips
2007-03-19  8:47 ` Junio C Hamano [this message]
2007-03-19  9:03   ` Julian Phillips

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=7vslc1iprn.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=julian@quantumfyre.co.uk \
    /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