summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 98df233)
raw | patch | inline | side by side (parent: 98df233)
author | Dmitry Potapov <dpotapov@gmail.com> | |
Sun, 13 Sep 2009 12:05:52 +0000 (16:05 +0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 13 Sep 2009 20:23:40 +0000 (13:23 -0700) |
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 <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-archive.txt | patch | blob | history | |
archive.c | patch | blob | history | |
builtin-archive.c | patch | blob | history |
index 92444ddf10081ee5faccd28491b47ef1cb45deee..1917f2e8a801e3495e3990eb4916bbc9806d3da7 100644 (file)
--------
[verse]
'git archive' [--format=<fmt>] [--list] [--prefix=<prefix>/] [<extra>]
- [--output=<file>] [--worktree-attributes]
+ [-o | --output=<file>] [--worktree-attributes]
[--remote=<repo> [--exec=<git-upload-archive>]] <tree-ish>
[path...]
--prefix=<prefix>/::
Prepend <prefix>/ to each filename in the archive.
+-o <file>::
--output=<file>::
Write the archive to <file> instead of stdout.
diff --git a/archive.c b/archive.c
index 0bca9ca4038ace99c32eff2e042290b03b2324b7..73b8e8a56db460dbbd2fb32ae2f4bf297c93dc67 100644 (file)
--- a/archive.c
+++ b/archive.c
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"),
diff --git a/builtin-archive.c b/builtin-archive.c
index f9a4bea41e95b9a34f190fc2b696c7394d0e0971..565314b04c1d53a851b4e158f6d6942cacbae50a 100644 (file)
--- a/builtin-archive.c
+++ b/builtin-archive.c
const char *output = NULL;
const char *remote = NULL;
struct option local_opts[] = {
- OPT_STRING(0, "output", &output, "file",
+ OPT_STRING('o', "output", &output, "file",
"write the archive to this file"),
OPT_STRING(0, "remote", &remote, "repo",
"retrieve the archive from remote repository <repo>"),