Re: obnoxious CLI complaints
- From
John Tapsell <johnflux@gmail.com>
- Date
- Sep 12, 2009, 23:08 UTC
- Message-ID
- <43d8ce650909121608t2b9c4b9bw44104acceea26e12@mail.gmail.com>
- In-Reply-To
- <20090912224335.GC30385@dpotapov.dyndns.org>
2009/9/13 Dmitry Potapov <dpotapov@gmail.com>:
Show 21 quoted lines
> On Sun, Sep 13, 2009 at 01:21:43AM +0300, John Tapsell wrote: >> >> Because I wouldn't call this just a few keystrokes to do the common case: >> >> git archive --format=tar --prefix=HEAD/ HEAD | gzip > head.tar.gz >> >> I honestly don't understand the backlash against Brenden's point that >> this could be made a bit simpler. > > You do not have to specify '--format=tar', because it is default. The > prefix name is a matter of one's preferences. Brenden wanted it to be > $myproject, while I have used three different versions. Now, you suggest > some other. IMHO, having it empty by default makes much more sense when > there is no obvious value on what most would agree. Finally, 'HEAD' is > required, because we do not want 'git archive' being run without any > parameter to write a binary file to the terminal. (Yes, it is foolish to > run command that you do not know to see what it does, but some people do > that, and we want all commands to be safe). BTW, I wonder whether use of > HEAD is really common with git-archive. Normally, you would archive a > tagged release, and then it is better to use the tag name to be sure > that you have archived the right thing.
Ah, the manpage examples specifically give the --format=tar though.
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.