{"thread":{"id":"60748","subject":"git-range-diff ignoring commit message changes","startedAt":"2024-01-15T19:46:03Z","lastAt":"2024-01-15T19:46:03Z","messageCount":1,"participants":["Gwyneth Morgan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"486817","messageId":"ZaWKNI5qLPf4P75A@tilde.club","threadId":"60748","inReplyTo":null,"subject":"git-range-diff ignoring commit message changes","fromName":"Gwyneth Morgan","fromEmail":"gwymor@tilde.club","sentAt":"2024-01-15T19:40:36Z","receivedAt":"2024-01-15T19:46:03Z","isPatch":false,"sender":{"key":"gwymor@tilde.club","avatar":"https://avatars.githubusercontent.com/u/87623694?v=4"},"body":"Is there a way to make git-range-diff to ignore commit messages when\nconsidering if commits are identical? When range-diffing long series\nthere are cases where I would like to check at a glance whether the code\nhas changed, and only when the code has changed do I want to see the\nchange in commit message too.\n\nIt seems I can approximate what I want by tweaking range-diff's source\nlike this but I couldn't tell if there was an actual option:\n\ndiff --git a/range-diff.c b/range-diff.c\nindex c45b6d849c..fd421b7b99 100644\n--- a/range-diff.c\n+++ b/range-diff.c\n@@ -59,7 +59,7 @@ static int read_patches(const char *range, struct string_list *list,\n \t\t     \"--output-indicator-old=<\",\n \t\t     \"--output-indicator-context=#\",\n \t\t     \"--no-abbrev-commit\",\n-\t\t     \"--pretty=medium\",\n+\t\t     \"--pretty=format:commit %H\",\n \t\t     \"--show-notes-by-default\",\n \t\t     NULL);\n \tstrvec_push(&cp.args, range);\n\nThis ignores commit message changes entirely, but it would be nice to\nhave an option to only see commit message changes when the code diff has\nchanged. It would also be convenient to have a way to only consider\nchanges in the title of commits but ignore the message body (equivalent\nto \"--pretty=short\" above).\n\nYou could get some of this information with git-cherry, but that is\nsuited for different uses (only cares about new commits on one side,\ndoesn't show diffs) and would take more effort than just ignoring the\ncommit messages in the current range-diff output.\n"}]}