Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Fix __git_is_treeish and add __git_is_committish



* Nikolai Weibull <now@xxxxxxxx> [2010-06-09 22:38]:
> On Wed, Jun 9, 2010 at 18:29, Holger Weiss <holger@xxxxxxxxxxxxxxxx> wrote:
> > The __git_is_treeish function is meant to check whether the provided
> > argument specifies a "tree-ish" Git object.  The function runs
> >
> > 	git rev-parse $1 --
> 
> > This patch simply removes the "--" argument from the "git rev-parse"
> > call.
> 
> Shouldn't that be
> 
> git rev-parse -- $1
> 
> as -- is used to separte options from arguments?

"git rev-parse" doesn't interpret "--" that way:

	% git rev-parse HEAD
	3b703ccc9862106dd5eba7ee7e01e291866e9d1f
	% git rev-parse HEAD --
	3b703ccc9862106dd5eba7ee7e01e291866e9d1f
	--
	% git rev-parse -- HEAD
	--
	HEAD

Holger



Messages sorted by: Reverse Date, Date, Thread, Author