Commit Diff


commit - d259e49165acf62d0ffddd9f1cd35a3608783ccf
commit + 9e1ed038df33a34e2252ef41388131de3e09f6eb
blob - 933902ef1a76ca0c564195254e69901b590b58e4
blob + abcfc5dd33db845bc6ce62b1b7609712d620630c
--- lib/worktree.c
+++ lib/worktree.c
@@ -6220,7 +6220,8 @@ got_worktree_commit(struct got_object_id **new_commit_
 	}
 
 	err = commit_worktree(new_commit_id, &commitable_paths,
-	    head_commit_id, NULL, worktree, author, committer, diff_path,
+	    head_commit_id, NULL, worktree, author, committer,
+	    (diff_path && cc_arg.diff_header_shown) ? diff_path : NULL,
 	    commit_msg_cb, commit_arg, status_cb, status_arg, repo);
 	if (err)
 		goto done;