From 238050ce7b9ba6527d21b357cea92a51d94d39cc Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Sat, 9 Oct 2021 10:09:50 +0000 Subject: [PATCH] remove code which was setting up repo_path redundantly from cmd_diff() --- got/got.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/got/got.c b/got/got.c index ad7b8862..99ed4254 100644 --- a/got/got.c +++ b/got/got.c @@ -4570,22 +4570,6 @@ cmd_diff(int argc, char *argv[]) } } - if (worktree) { - repo_path = strdup(got_worktree_get_repo_path(worktree)); - if (repo_path == NULL) { - error = got_error_from_errno("strdup"); - goto done; - } - } else { - if (repo_path == NULL) { - repo_path = strdup(cwd); - if (repo_path == NULL) { - error = got_error_from_errno("strdup"); - goto done; - } - } - } - if (force_path && (rflag || worktree == NULL)) errx(1, "-P option can only be used when diffing a work tree"); -- 2.11.4.GIT