summaryrefslogtreecommitdiffstats
path: root/convert-cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-24 01:48:32 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-24 01:48:32 +0200
commit93256315b2444601a35484f4fb76cd5723284201 (patch)
tree30290c79f4914d7575c87d1c06f441d8a3bc5115 /convert-cache.c
parentMake "convert-cache" able to handle the really old archive formats (diff)
downloadgit-93256315b2444601a35484f4fb76cd5723284201.tar.xz
git-93256315b2444601a35484f4fb76cd5723284201.zip
Make a hack to convert-cache for missing author dates in old
archives (notably the old sparse one). Very hacky. But hopefully we can do the conversion once, and never worry about this ever again.
Diffstat (limited to 'convert-cache.c')
-rw-r--r--convert-cache.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/convert-cache.c b/convert-cache.c
index 35191dffa7..312fb61c81 100644
--- a/convert-cache.c
+++ b/convert-cache.c
@@ -233,6 +233,13 @@ static int convert_date_line(char *dst, void **buf, unsigned long *sp)
return len + datelen;
}
+ /*
+ * Hacky hacky: one of the sparse old-style commits does not have
+ * any date at all, but we can fake it by using the committer date.
+ */
+ if (*date == '\n' && strchr(next, '>'))
+ date = strchr(next, '>')+2;
+
return len + sprintf(dst, "%lu -0700\n", parse_oldstyle_date(date));
}