Re: [PATCH] git-symbolic-ref: fix error message when ref doesn't exist

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

 



Julian Phillips <julian@xxxxxxxxxxxxxxxxx> 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


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