diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-08-19 11:43:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-22 14:51:02 -0700 |
commit | 6e96cb5286105bbcf19d5c47e45334ef9a75d09d (patch) | |
tree | f9baa8d520f35b823146ff8947e7716ae843d665 /Documentation | |
parent | rerere: represent time duration in timestamp_t internally (diff) | |
download | tgif-6e96cb5286105bbcf19d5c47e45334ef9a75d09d.tar.xz |
rerere: allow approxidate in gc.rerereResolved/gc.rerereUnresolved
These two configuration variables are described in the documentation
to take an expiry period expressed in the number of days:
gc.rerereResolved::
Records of conflicted merge you resolved earlier are
kept for this many days when 'git rerere gc' is run.
The default is 60 days.
gc.rerereUnresolved::
Records of conflicted merge you have not resolved are
kept for this many days when 'git rerere gc' is run.
The default is 15 days.
There is no strong reason not to allow a more general "approxidate"
expiry specification, e.g. "5.days.ago", or "never".
Rename the config_get_expiry() helper introduced in the previous
step to git_config_get_expiry_in_days() and move it to a more
generic place, config.c, and use date.c::parse_expiry_date() to do
so. Give it an ability to allow the caller to tell among three
cases (i.e. there is no "gc.rerereResolved" config, there is and it
is correctly parsed into the *expiry variable, and there was an
error in parsing the given value). The current caller can work
correctly without using the return value, though.
In the future, we may find other variables that only allow an
integer that specifies "this many days" or other unit of time, and
when it happens we may need to drop "_days" suffix from the name of
the function and instead pass the "scale" value as another parameter.
But this will do for now.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index d5c9c4cab6..ac95f5f954 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1553,11 +1553,13 @@ gc.<pattern>.reflogExpireUnreachable:: gc.rerereResolved:: Records of conflicted merge you resolved earlier are kept for this many days when 'git rerere gc' is run. + You can also use more human-readable "1.month.ago", etc. The default is 60 days. See linkgit:git-rerere[1]. gc.rerereUnresolved:: Records of conflicted merge you have not resolved are kept for this many days when 'git rerere gc' is run. + You can also use more human-readable "1.month.ago", etc. The default is 15 days. See linkgit:git-rerere[1]. gitcvs.commitMsgAnnotation:: |