aboutsummaryrefslogtreecommitdiff
path: root/Documentation/gitcli.adoc
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-14 12:56:09 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-14 12:56:09 -0700
commit44dee53a303ad91305158bb1e2d9a8704b300c15 (patch)
treede50ca1587e3919b39a676dea702c88ac89608a9 /Documentation/gitcli.adoc
parent1003719fb700df37557d6d161e757fabb952e78a (diff)
parentccfcaf399ffcc91553395a8de8e833e7685e7cc2 (diff)
downloadgit-44dee53a303ad91305158bb1e2d9a8704b300c15.tar.xz
Merge branch 'jc/optional-path'
Configuration variables that take a pathname as a value (e.g. blame.ignorerevsfile) can be marked as optional by prefixing ":(optoinal)" before its value. * jc/optional-path: parseopt: values of pathname type can be prefixed with :(optional) config: values of pathname type can be prefixed with :(optional) t7500: fix GIT_EDITOR shell snippet t7500: make each piece more independent
Diffstat (limited to 'Documentation/gitcli.adoc')
-rw-r--r--Documentation/gitcli.adoc14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/gitcli.adoc b/Documentation/gitcli.adoc
index 1ea681b59d..ef2a0a399d 100644
--- a/Documentation/gitcli.adoc
+++ b/Documentation/gitcli.adoc
@@ -216,6 +216,20 @@ $ git describe --abbrev=10 HEAD # correct
$ git describe --abbrev 10 HEAD # NOT WHAT YOU MEANT
----------------------------
+
+Magic filename options
+~~~~~~~~~~~~~~~~~~~~~~
+Options that take a filename allow a prefix `:(optional)`. For example:
+
+----------------------------
+git commit -F :(optional)COMMIT_EDITMSG
+# if COMMIT_EDITMSG does not exist, equivalent to
+git commit
+----------------------------
+
+Like with configuration values, if the named file is missing Git behaves as if
+the option was not given at all. See "Values" in linkgit:git-config[1].
+
NOTES ON FREQUENTLY CONFUSED OPTIONS
------------------------------------