From d616fbf256ef3102669d450ddadd8469fefcf95c Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Mon, 21 Mar 2016 00:35:57 -0400 Subject: git-compat-util: st_add4: work around gcc 4.2.x compiler crash Although changes by 5b442c4 (tree-diff: catch integer overflow in combine_diff_path allocation, 2016-02-19) are perfectly valid, they unfortunately trigger an internal compiler error in gcc 4.2.x: combine-diff.c: In function 'diff_tree_combined': combine-diff.c:1391: internal compiler error: Segmentation fault: 11 Experimentation reveals that changing st_add4()'s argument evaluation order is sufficient to sidestep this problem. Although st_add3() does not trigger the compiler bug, for style consistency, change its argument evaluation order to match. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- git-compat-util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 061e33c774..6d304613ff 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -713,8 +713,8 @@ static inline size_t st_add(size_t a, size_t b) (uintmax_t)a, (uintmax_t)b); return a + b; } -#define st_add3(a,b,c) st_add((a),st_add((b),(c))) -#define st_add4(a,b,c,d) st_add((a),st_add3((b),(c),(d))) +#define st_add3(a,b,c) st_add(st_add((a),(b)),(c)) +#define st_add4(a,b,c,d) st_add(st_add3((a),(b),(c)),(d)) static inline size_t st_mult(size_t a, size_t b) { -- cgit v1.2.3 From ad52148a7d09152e8aa888f783e4878f6548b3a0 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Mon, 21 Mar 2016 19:38:34 +0100 Subject: Documentation: fix broken linkgit to git-config Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- Documentation/githooks.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index 7ba0ac965d..a2f59b194c 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -397,7 +397,7 @@ preceding SP is also omitted. Currently, no commands pass any 'extra-info'. The hook always runs after the automatic note copying (see -"notes.rewrite." in linkgit:git-config.txt[1]) has happened, and +"notes.rewrite." in linkgit:git-config[1]) has happened, and thus has access to these notes. The following command-specific comments apply: -- cgit v1.2.3