aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-config.txt
diff options
context:
space:
mode:
authorHaaris Mehmood <hsed@unimetic.com>2017-11-18 02:27:27 +0000
committerJunio C Hamano <gitster@pobox.com>2017-11-18 12:31:29 +0900
commit5f9674243d0341519e5031681c941b0e1ad7a9e3 (patch)
tree26e797cc693541bcd3eaaa83c610894bb2982ae5 /Documentation/git-config.txt
parent89ea799ffcc5c8a0547d3c9075eb979256ee95b8 (diff)
downloadgit-5f9674243d0341519e5031681c941b0e1ad7a9e3.tar.gz
config: add --expiry-date
Add --expiry-date as a data-type for config files when 'git config --get' is used. This will return any relative or fixed dates from config files as timestamps. This is useful for scripts (e.g. gc.reflogexpire) that work with timestamps so that '2.weeks' can be converted to a format acceptable by those scripts/functions. Following the convention of git_config_pathname(), move the helper function required for this feature from builtin/reflog.c to builtin/config.c where other similar functions exist (e.g. for --bool or --path), and match the order of parameters with other functions (i.e. output pointer as first parameter). Signed-off-by: Haaris Mehmood <hsed@unimetic.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-config.txt')
-rw-r--r--Documentation/git-config.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 4edd09fc6b..14da5fc157 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -180,6 +180,11 @@ See also <<FILES>>.
value (but you can use `git config section.variable ~/`
from the command line to let your shell do the expansion).
+--expiry-date::
+ `git config` will ensure that the output is converted from
+ a fixed or relative date-string to a timestamp. This option
+ has no effect when setting the value.
+
-z::
--null::
For all options that output values and/or keys, always