commit 308ce28964ee726cc950ac9ae973cb286075581f from: Mark Jamsek via: Thomas Adam date: Tue Aug 08 11:34:19 2023 UTC fix 'got log -dPp' diffstat duplication bug Only collect changed paths once if both -d and -P are specified; we already checked for -d and -p. Reported by Lucas on IRC. Regress for this and the previous (got log -x keyword) commit still due. ok stsp@ and op@ commit - ef1538260f78376b6fb605ffb10d682f5877afc2 commit + 308ce28964ee726cc950ac9ae973cb286075581f blob - be4acc192b1d47a163f835688c0151e87c860101 blob + 881527d776040fc59c1fa690c545e87532dd42dd --- got/got.c +++ got/got.c @@ -4459,7 +4459,8 @@ print_commits(struct got_object_id *root_id, struct go if (err) break; - if ((show_changed_paths || (show_diffstat && !show_patch)) + if (((show_changed_paths && !show_diffstat) || + (show_diffstat && !show_patch)) && !reverse_display_order) { err = get_changed_paths(&changed_paths, commit, repo, show_diffstat ? &dsa : NULL); @@ -4525,7 +4526,7 @@ print_commits(struct got_object_id *root_id, struct go &qid->id); if (err) break; - if (show_changed_paths || + if ((show_changed_paths && !show_diffstat) || (show_diffstat && !show_patch)) { err = get_changed_paths(&changed_paths, commit, repo, show_diffstat ? &dsa : NULL);