commit - 30f8fd5e95741399cdda93c414d5e67ef8aeb263
commit + 30db809c8a78b73916532d9a3f1c244ffd1c44df
blob - b380ff4c1a044ac0fb002ae4eaf00007c9c05a24
blob + 96fece4634c0766c9a3aaef60f3df693fc56fc11
--- got/got.c
+++ got/got.c
} else if (argc == 2) {
id_str1 = argv[0];
id_str2 = argv[1];
+ if (worktree && repo_path == NULL) {
+ repo_path =
+ strdup(got_worktree_get_repo_path(worktree));
+ if (repo_path == NULL) {
+ error = got_error_from_errno("strdup");
+ goto done;
+ }
+ }
} else
usage_diff();
if (error)
goto done;
- if (worktree) {
+ if (argc <= 1) {
struct print_diff_arg arg;
char *id_str;
error = got_object_id_str(&id_str,