Re: obnoxious CLI complaints
- From
Brendan Miller <catphive@catphive.net>
- Date
- Sep 17, 2009, 00:48 UTC
- Message-ID
- <ef38762f0909161748u32ad56bcya3314fe28fd06ffe@mail.gmail.com>
- In-Reply-To
- <7v3a6r5znq.fsf@alter.siamese.dyndns.org>
On Sun, Sep 13, 2009 at 11:47 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> John Tapsell <johnflux@gmail.com> 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=<fmt> [--list] [--prefix=<prefix>/] [<extra>]
[--output=<file>] [--worktree-attributes]
[--remote=<repo> [--exec=<git-upload-archive>]] <tree-i
sh>
[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.
Show 7 quoted lines
> >> 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