Re: obnoxious CLI complaints
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 10, 2009, 18:53 UTC
- Message-ID
- <7vbpliaaxo.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <200909101850.26109.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 5 quoted lines
> First, it would be consistent with how ordinary archivers such as tar > or zip are used, where you have to specify list of files to archive > (in our case this list is HEAD). Second, I'd rather not accidentally > dump binary to terminal: "git archive [HEAD]" dumps archive to standard > output.
So does "cat". I do not agree with your second point.
While I somewhat see the similarity argument, your first point, I am not sure if it is relevant. It is not like "tar or zip allows us to say what files to archive, but git-archive doesn't and it always archives HEAD"; you are saying "they require us to specify, so should we".
But I do not see a strong reason not to default to HEAD. The case that would make difference would be to differentiate among
$ git archive HEAD TAIL
$ git archive HEAD -- TAIL
$ git archive -- HEAD TAILi.e. what if you happen to have a tracked content called HEAD. I didn't check the current command line parser in git-archive understands the "--" convention for that, but it is not a rocket science to add it if it doesn't.