Commit 89294d1
run_external_diff: clean up error handling
When the external diff reports an error, we try to clean up
and die. However, we can make this process a bit simpler:
1. We do not need to bother freeing memory, since we are
about to exit. Nor do we need to clean up our
tempfiles, since the atexit() handler will do it for
us. So we can die as soon as we see the error.
3. We can just call die() rather than fprintf/exit. This
does technically change our exit code, but the exit
code of "1" is not meaningful here. In fact, it is
probably wrong, since "1" from diff usually means
"completed successfully, but there were differences".
And while we're there, we can mark the error message for
translation, and drop the full stop at the end to make it
more like our other messages.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent ae049c9 commit 89294d1
2 files changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2909 | 2909 | | |
2910 | 2910 | | |
2911 | 2911 | | |
2912 | | - | |
2913 | 2912 | | |
2914 | 2913 | | |
2915 | 2914 | | |
| |||
2938 | 2937 | | |
2939 | 2938 | | |
2940 | 2939 | | |
2941 | | - | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
2942 | 2943 | | |
2943 | 2944 | | |
2944 | 2945 | | |
2945 | | - | |
2946 | | - | |
2947 | | - | |
2948 | | - | |
2949 | 2946 | | |
2950 | 2947 | | |
2951 | 2948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
0 commit comments