commit a7245e84638203d5ac6335048a939f4a3436d392 from: Stefan Sperling via: Thomas Adam date: Sat Oct 21 12:37:56 2023 UTC make 'tog diff' release the work tree lock earlier Avoids 'work tree is already locked' errors from got commands while the 'tog diff' command remains running. commit - efba105ab196c6eb41746c1bf4e45164573715f0 commit + a7245e84638203d5ac6335048a939f4a3436d392 blob - 8254a3de951c3f481513de8eaada4bbca428bcbf blob + 96788ac2b7e787799fb8590028e389896022e65c --- tog/tog.c +++ tog/tog.c @@ -6189,6 +6189,10 @@ cmd_diff(int argc, char *argv[]) error = set_tog_base_commit(repo, worktree); if (error != NULL) goto done; + + /* Release work tree lock. */ + got_worktree_close(worktree); + worktree = NULL; } error = view_loop(view);