diff options
Diffstat (limited to 'builtin/diff-files.c')
| -rw-r--r-- | builtin/diff-files.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/builtin/diff-files.c b/builtin/diff-files.c index 70103c4095..096ea2fedb 100644 --- a/builtin/diff-files.c +++ b/builtin/diff-files.c @@ -15,6 +15,7 @@ static const char diff_files_usage[] = "git diff-files [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...]" +"\n" COMMON_DIFF_OPTIONS_HELP; int cmd_diff_files(int argc, const char **argv, const char *prefix) @@ -77,8 +78,12 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix) if (read_cache_preload(&rev.diffopt.pathspec) < 0) { perror("read_cache_preload"); - return -1; + result = -1; + goto cleanup; } result = run_diff_files(&rev, options); - return diff_result_code(&rev.diffopt, result); + result = diff_result_code(&rev.diffopt, result); +cleanup: + release_revisions(&rev); + return result; } |
