builtin-log: typefix for recent format-patch changes.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jul 14, 2006 at 22:47 UTC
76af073457320ffcba937a8c7ed4e8b37150cca8
1 file changed
+6
-3
builtin-log.c
+6
-3
@@ -10,6 +10,8 @@
10
#include "revision.h"
11
#include "log-tree.h"
12
#include "builtin.h"
13
+#include <time.h>
14
+#include <sys/time.h>
15
16
/* this is in builtin-diff.c */
17
void add_head(struct rev_info *revs);
@@ -233,8 +235,9 @@ static void gen_message_id(char *dest, unsigned int length, char *base)
235
const char *email_end = strrchr(committer, '>');
236
if(!email_start || !email_end || email_start > email_end - 1)
237
die("Could not extract email from committer identity.");
236
- snprintf(dest, length, "%s.%u.git.%.*s", base, time(NULL),
237
- email_end - email_start - 1, email_start + 1);
238
+ snprintf(dest, length, "%s.%lu.git.%.*s", base,
239
+ (unsigned long) time(NULL),
240
+ (int)(email_end - email_start - 1), email_start + 1);
241
}
242
243
int cmd_format_patch(int argc, const char **argv, char **envp)
@@ -249,7 +252,7 @@ int cmd_format_patch(int argc, const char **argv, char **envp)
252
int keep_subject = 0;
253
int ignore_if_in_upstream = 0;
254
int thread = 0;
252
- char *in_reply_to = NULL;
255
+ const char *in_reply_to = NULL;
256
struct diff_options patch_id_opts;
257
char *add_signoff = NULL;
258
char message_id[1024];