Re: [RFC] Loosening path argument check a little bit in revision.c

From: Linus Torvalds <torvalds@osdl.org>
Date: 2006-04-23 02:30:29
On Sat, 22 Apr 2006, Junio C Hamano wrote:
> 
> This patch allows non-existing paths to be given without the
> double-dash marker as long as they exist in the index, or they
> are leading paths of blobs that exist in the index.

The only objection I have to this (and it's not a very strong one) is that 
it can cause the index to be populated for processes that really don't 
care.

We could work around that with a flag in "struct rev_info", so that 
programs that call "setup_revisions()" can specify before-hand if they are 
interested in the index or not.

The reason I somewhat care was that I was actually going to make the 
checks a bit _stronger_: I was going to say that if you have a pathspec, 
but don't have a "--" marker, then we'd additionally check:

 - none of the arguments we parsed as revisions could be interpreted as a 
   filename.

 - none of the paths are "--" 

so that there really isn't any possibility of accidental confusion in case 
somebody does have a revision that looks like a pathname too.

But I don't actually care _that_ deeply.

		Linus
-
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
Received on Sun Apr 23 03:24:02 2006

This archive was generated by hypermail 2.1.8 : 2006-04-23 03:24:28 EST