Re: [PATCH] git-archive: document CWD effect

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: <rene.scharfe@...>, Junio C Hamano <junkio@...>, Nick Williams <njw@...>
Date: Monday, April 9, 2007 - 4:37 pm

On Monday 2007, April 09, René Scharfe wrote:


I don't agree with the supposition that git-archive is a fancy 
git-ls-tree.  If it were, then you'd be right.  It's not though.  It's 
more like a git-read-tree or git-checkout-index; those both don't care 
where you are in the working tree.

Argument 1)
git-archive should have nothing to do with a working tree in fact; it's 
perfectly reasonable to expect that it would work in a bare repository 
in fact - that's almost the definition of a command that shouldn't be 
working directory aware.

Argument 2)
Consider the --remote option.  What "working path" should be relevant 
when "--remote" is passed?  For consistency, git-archive should always 
refer to the repository root.

Argument 3)
git-archive is similar to other VCS's "export" command; and for those 
the export command in it's default form will work without a local 
checkout and they export from the repository root.

Argument 4)
What if the repository has multiple root commits, similar to git's html 
and todo branches.  Now, use git-archive and reference one of those 
commits.  The working directory you're in now has no relevance at all 
to the commit your targeting - it need not even exist.  The same 
problem exists of course if you are now in a directory that didn't 
exist in the past.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
-
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:
bug in git-archive?, Nick Williams, (Sat Mar 3, 12:07 pm)
Re: [PATCH] git-archive: document CWD effect, Junio C Hamano, (Sun Apr 8, 7:21 pm)
Re: [PATCH] git-archive: document CWD effect, Andy Parkins, (Mon Apr 9, 4:37 pm)
Re: [PATCH] git-archive: document CWD effect, Junio C Hamano, (Tue Apr 10, 5:49 pm)
Re: bug in git-archive?, Johannes Schindelin, (Sat Mar 3, 12:09 pm)