path: root/archive.c
diff options
authorDmitry Potapov <>2009-09-13 12:05:52 (GMT)
committerJunio C Hamano <>2009-09-13 20:23:40 (GMT)
commit05d3951ec9c531d348fe0dbb9ae058d38728a550 (patch)
tree8c18a99101e7df2fa7c4342e27c071e3895a6027 /archive.c
parent98df233e2d7d815b1f2e2e253b9d6c6ce1bfe58f (diff)
git-archive: add '-o' as a alias for '--output'
The '-o' option is commonly used in many tools to specify the output file. Typing '--output' every time is a bit too long to be a practical alternative to redirecting output. But specifying the output name has the advantage of making possible to guess the desired output format by filename extension. Signed-off-by: Dmitry Potapov <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'archive.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index 0bca9ca..73b8e8a 100644
--- a/archive.c
+++ b/archive.c
@@ -283,7 +283,7 @@ static int parse_archive_args(int argc, const char **argv,
OPT_STRING(0, "format", &format, "fmt", "archive format"),
OPT_STRING(0, "prefix", &base, "prefix",
"prepend prefix to each pathname in the archive"),
- OPT_STRING(0, "output", &output, "file",
+ OPT_STRING('o', "output", &output, "file",
"write the archive to this file"),
OPT_BOOLEAN(0, "worktree-attributes", &worktree_attributes,
"read .gitattributes in working directory"),