summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-10-18 14:15:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-10-18 22:01:35 (GMT)
commitf3f47a1e8ddbecb0865be3d4c5dfef609cb58867 (patch)
tree898c2516a752999a29ee040ccf00f67609538578 /Documentation
parent87a5461fa7b30f7b7baf27204f10219d61500fbf (diff)
downloadgit-f3f47a1e8ddbecb0865be3d4c5dfef609cb58867.zip
git-f3f47a1e8ddbecb0865be3d4c5dfef609cb58867.tar.gz
git-f3f47a1e8ddbecb0865be3d4c5dfef609cb58867.tar.bz2
status: add --long output format option
You can currently set the output format to --short or --porcelain. There is no --long, because we default to it already. However, you may want to override an alias that uses "--short" to get back to the default. This requires a little bit of refactoring, because currently we use STATUS_FORMAT_LONG internally to mean the same as "the user did not specify anything". By expanding the enum to include STATUS_FORMAT_NONE, we can distinguish between the implicit and explicit cases. This effects these conditions: 1. The user has asked for NUL termination. With NONE, we currently default to turning on the porcelain mode. With an explicit --long, we would in theory use NUL termination with the long mode, but it does not support it. So we can just complain and die. 2. When an output format is given to "git commit", we default to "--dry-run". This behavior would now kick in when "--long" is given, too. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-commit.txt4
-rw-r--r--Documentation/git-status.txt3
2 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 9594ac8..3acf2e7 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -109,6 +109,10 @@ OPTIONS
format. See linkgit:git-status[1] for details. Implies
`--dry-run`.
+--long::
+ When doing a dry-run, give the output in a the long-format.
+ Implies `--dry-run`.
+
-z::
--null::
When showing `short` or `porcelain` status output, terminate
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 67e5f53..9f1ef9a 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -38,6 +38,9 @@ OPTIONS
across git versions and regardless of user configuration. See
below for details.
+--long::
+ Give the output in the long-format. This is the default.
+
-u[<mode>]::
--untracked-files[=<mode>]::
Show untracked files.