git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[Bug report] git diff stat shows unrelated diff

From
Viresh Kumar <viresh.kumar@linaro.org>
Date
Feb 14, 2019, 08:22 UTC
Message-ID
<20190214082258.3mh3hcr2l6dl3wuf@vireshk-i7>
Hello,

I am not sure if it is a bug or not, but the output I got wasn't what I was looking for. And so looking for some help. I was looking to send pull request [1] to PM maintainer and was generating the request against his tree [2], which already has kernel upto v5.0-rc6 merged in it.

These are my local branches:
Branch A:

55538fbc79e9 cpufreq: qcom: Read voltage LUT and populate OPP f896d06665ec cpufreq: qcom-hw: Move to device_initcall 1c7fc5cbc339 (tag: v5.0-rc2) Linux 5.0-rc2

Branch B:

a4f342b9607d PM / OPP: Introduce a power estimation helper 285881b51eb5 PM / OPP: Remove unused parameter of _generic_set_opp_clk_only() bfeffd155283 (tag: v5.0-rc1) Linux 5.0-rc1

pm/linux-next branch already has Branch B merged in it (with an earlier pull request).

Branch C (7c139d3f0f99) is a merge of Branch A and Branch B. When I try to generate diff-stat with:

git diff -M --stat pm/linux-next..7c139d3f0f99
It shows me the diffstat between v5.0-rc1..v5.0-rc2 as well.
If I do
git diff -M --stat v5.0-rc2..7c139d3f0f99

it shows only the files that have changed in patches in branch A and B.

Since pm/linux-next already has Branch B and all the rcs upto rc6, I was expecting the output of first diffstat to be similar to second one (without branch B stuff). Is the expectation incorrect ?

-- 
viresh

[1] My tree: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git
[2] PM tree: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git

Top commit in PM tree at the time I was trying it:

d26ff2405272 (pm/testing, pm/linux-next) Merge branch 'pm-opp' into linux-next
Next: Johannes Sixt
Message 1 of 17 in “[Bug report] git diff stat shows unrelated diff”
  1. Viresh KumarFeb 14, 2019
  2. Johannes SixtFeb 14, 2019
  3. Elijah NewrenFeb 14, 2019
  4. Junio C HamanoFeb 14, 2019
  5. Denton LiuFeb 15, 2019
  6. Elijah NewrenFeb 15, 2019
  7. Junio C HamanoFeb 15, 2019
  8. Philip OakleyFeb 15, 2019
  9. Junio C HamanoFeb 15, 2019
  10. Philip OakleyFeb 16, 2019
  11. Junio C HamanoFeb 17, 2019
  12. Philip OakleyFeb 17, 2019
  13. Junio C HamanoFeb 18, 2019
  14. Junio C HamanoFeb 15, 2019
  15. Viresh KumarFeb 15, 2019
  16. Elijah NewrenFeb 15, 2019
  17. Viresh KumarFeb 18, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.