Commit d6549f3
refs.c: avoid repeated git_path calls in rename_tmp_log
Because it's not safe to store the static-buffer results of
git_path for a long time, we end up formatting the same
filename over and over. We can fix this by using a
function-local strbuf to store the formatted pathname and
avoid repeating ourselves.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 54b418f commit d6549f3
1 file changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2930 | 2930 | | |
2931 | 2931 | | |
2932 | 2932 | | |
| 2933 | + | |
| 2934 | + | |
2933 | 2935 | | |
2934 | 2936 | | |
2935 | | - | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
2936 | 2940 | | |
2937 | 2941 | | |
2938 | 2942 | | |
| |||
2941 | 2945 | | |
2942 | 2946 | | |
2943 | 2947 | | |
2944 | | - | |
| 2948 | + | |
2945 | 2949 | | |
2946 | 2950 | | |
2947 | | - | |
| 2951 | + | |
2948 | 2952 | | |
2949 | 2953 | | |
2950 | 2954 | | |
2951 | 2955 | | |
2952 | 2956 | | |
2953 | 2957 | | |
2954 | | - | |
| 2958 | + | |
2955 | 2959 | | |
2956 | | - | |
| 2960 | + | |
2957 | 2961 | | |
2958 | 2962 | | |
2959 | 2963 | | |
| |||
2966 | 2970 | | |
2967 | 2971 | | |
2968 | 2972 | | |
2969 | | - | |
| 2973 | + | |
2970 | 2974 | | |
2971 | 2975 | | |
2972 | | - | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
2973 | 2980 | | |
2974 | 2981 | | |
2975 | 2982 | | |
| |||
0 commit comments