login
Header Space

 
 

Re: [PATCH] gitk: fix for "gitk <ambiguous-name> --"

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Paul Mackerras <paulus@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, Linus Torvalds <torvalds@...>, Uwe Kleine-K?nig <ukleinek@...>, <git@...>
Date: Wednesday, July 4, 2007 - 12:58 pm

Paul Mackerras <paulus@samba.org> writes:


	$ rev-parse --no-revs --no-flags gitk -- gitk
	$ rev-parse --no-revs --no-flags -- gitk

should give you the path "gitk", while

	$ rev-parse --revs-only --no-flags gitk -- gitk
	$ rev-parse --revs-only --no-flags gitk --

should give you the revision (i.e. branch name) "gitk", I think.

But it is not well defined what it should do upon

	$ rev-parse --no-flags gitk
	$ rev-parse gitk

Currently they treat "gitk" as a ref.  On the other hand, as you
said:

	$ rev-list gitk

would error out without leading or traiing -- to disambiguate.

So you are right that they behave differently.

It might be an improvement to make rev-parse require leading or
trailing -- in such a case, but I haven't thought through the
ramifications of such a change.  Quite a lot of existing users
expect "rev-parse foo" to favor a ref "foo" over a file "foo"
and give its object name.



-
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] gitk: fix for "gitk <ambiguous-name> --", Junio C Hamano, (Wed Jul 4, 12:58 pm)
speck-geostationary