Re: obnoxious CLI complaints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 13, 2009 at 11:47 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> John Tapsell <johnflux@xxxxxxxxx> 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.

>
>> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]