summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ea4c7f9)
raw | patch | inline | side by side (parent: ea4c7f9)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 5 Mar 2006 22:46:36 +0000 (14:46 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 6 Mar 2006 00:02:44 +0000 (16:02 -0800) |
... as suggested on the list.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history | |
blame.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index eb1887d7718a631fb72fddc1f42f94318d68e9aa..b6d8804d4b0cac60d1dd4943c5b9a791f26e006f 100644 (file)
--- a/Makefile
+++ b/Makefile
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(OPENSSL_LIBSSL)
-git-blame$X: blame.o $(LIB_FILE)
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
- $(LIBS) -lm
-
init-db.o: init-db.c
$(CC) -c $(ALL_CFLAGS) \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $*.c
index 168b1f5fe5555b9e0697f211fb10859dbef327a3..b551dd5aa3b2af1ef4d5c2870f18ba4900d50d22 100644 (file)
--- a/blame.c
+++ b/blame.c
usage(blame_usage);
else if(!strcmp(argv[i], "-l") ||
!strcmp(argv[i], "--long")) {
- sha1_len = 20;
+ sha1_len = 40;
continue;
} else if(!strcmp(argv[i], "-c") ||
!strcmp(argv[i], "--compability")) {
process_commits(&rev, filename, &initial);
buf = blame_contents;
- max_digits = 1 + log(num_blame_lines+1)/log(10);
+ for (max_digits = 1, i = 10; i <= num_blame_lines + 1; max_digits++)
+ i *= 10;
+
for (i = 0; i < num_blame_lines; i++) {
struct commit *c = blame_lines[i];
if (!c)