Paul, you cannot pass as argument if you do not use the $(..) for 
encapsulate the function. It must be used, otherwise git would think that 
they're parameters to be used WITH the archive command, even though the 
result of the diff is the intention.

I used the set -x to check the logs, and I found where the error occurs. 
It's in a JS file, but Git says nothing usefull, except a bunch of weird 
commands that results in the same error: Bad File Number. As I mentioned, 
both commands must be used together, as I was using before, in order to 
package the correct files.

Thanks for helping! Is there any other idea? :D

On Thursday, September 19, 2013 4:21:31 PM UTC-3, Paul Smith wrote:
>
> On Thu, 2013-09-19 at 20:09 +0100, Andy Hardy wrote: 
> > On 19/09/2013 19:25, Armando Freire wrote: 
> > > git archive -o ./TAGver.zip TAGver $(git diff --name-only startTAGver 
> > > endTAGver --diff-filter [AMCRT]) 
> > 
> > I'm not really uptodate on Bash scripting, but what does the $(git 
> > diff...) do? 
>
> $(cmd ...) is the new-fangled way of writing `cmd ...` and does the same 
> thing. 
>
> So, the above command runs the "git diff ..." command then runs the "git 
> archive ..." command with the results of the git diff command passed as 
> arguments. 
>
> Because git diff is run with the --name-only flag, it's just printing 
> filenames not the actual diff output, so those files are passed as 
> arguments to git archive. 
>
>
> Tip: if you want to see what the shell is doing you can use "set -x" to 
> enable a debug mode, then run the command above from the prompt.  Run 
> "set +x" to turn it off again. 
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to