From: Brendan Miller Date: Thu, 17 Sep 2009 00:48:32 GMT Subject: Re: obnoxious CLI complaints Message-ID: In-Reply-To: <7v3a6r5znq.fsf@alter.siamese.dyndns.org> On Sun, Sep 13, 2009 at 11:47 AM, Junio C Hamano wrote: > John Tapsell writes: > >> Ah, the manpage examples specifically give the --format=tar though. > > So what? That looks like a manpage bug. In the version I have 1.6.4 the format for archive is given like this: git archive --format= [--list] [--prefix=/] [] [--output=] [--worktree-attributes] [--remote= [--exec=]] [path...] So --format isn't marked as optional. Later in the manpage it mentions tar as the default, but that contradicts this, and the examples use --format=tar, so it's easy to miss. > >> Why not have  --format=tgz  then or something?  Or better yet, give >> the filename on the command line and detect the format from the file >> extension. > > That is an interesting enhancement and sounds like a useful feature. > I do like that idea. git archive --output=myarchive.tar.gz HEAD is a bit more straightforward, and still lets people pipe in the old way if they want to. I think someone mentioned we're already linking the requisite library? Otherwise, you can always open up a pipe programmatically within git. Don't you guys do something like that for ssh? I seem to recall it complaining that ssh couldn't be found on windows, but maybe it was just the library. Prefix could be myarchive. I guess some people have more specific requirements, but I usually just want it to be *sometime* so it doesn't spew out tons of files into the directory I decompress it into. Brendan