Teach approxidate() to understand "never"
If you want to keep the reflogs around for a really long time, you should be able to say so: $ git config gc.reflogExpire never Now it works, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 24, 2007 at 19:18 UTC
af66366a9feb0194ed04b1f538998021ece268a8
1 file changed
+9
date.c
+9
@@ -660,6 +660,14 @@ static void date_am(struct tm *tm, int *num)
660
tm->tm_hour = (hour % 12);
661
}
662
663
+static void date_never(struct tm *tm, int *num)
664
+{
665
+ tm->tm_mon = tm->tm_wday = tm->tm_yday
666
+ = tm->tm_hour = tm->tm_min = tm->tm_sec = 0;
667
+ tm->tm_year = 70;
668
+ tm->tm_mday = 1;
669
+}
670
+
671
static const struct special {
672
const char *name;
673
void (*fn)(struct tm *, int *);
@@ -670,6 +678,7 @@ static const struct special {
678
{ "tea", date_tea },
679
{ "PM", date_pm },
680
{ "AM", date_am },
681
+ { "never", date_never },
682
{ NULL }
683
};
684