git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: git@vger.kernel.org, vincent.guittot@linaro.org
Subject: Re: [Bug report] git diff stat shows unrelated diff
Date: Thu, 14 Feb 2019 19:42:09 +0100
Message-ID: <d421fd13-5771-d103-5f77-d38a24afaef6@kdbg.org> (raw)
In-Reply-To: <20190214082258.3mh3hcr2l6dl3wuf@vireshk-i7>

Am 14.02.19 um 09:22 schrieb Viresh Kumar:
> 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 ?

Yes, I think your expectation is incorrect.

The meaning of .. is different between diff and the log commands. For
diff it is mostly just noise, that is your first diff command is
actually equivalent to

  git diff -M --stat pm/linux-next 7c139d3f0f99

It is quite obvious IMO that this is the diff between two end points.
What you most likely wanted to see is

  git diff -M --stat pm/linux-next...7c139d3f0f99

It shows the diff between a merge base of the two revisions and the
second one, i.e. between a where Branch C branched off of pm/linux-next
and its tip.

-- Hannes

  reply index

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14  8:22 Viresh Kumar
2019-02-14 18:42 ` Johannes Sixt [this message]
2019-02-14 21:23 ` Elijah Newren
2019-02-14 22:10   ` Junio C Hamano
2019-02-15 18:52     ` Denton Liu
2019-02-15 19:25       ` Elijah Newren
2019-02-15 20:12         ` Junio C Hamano
2019-02-15 22:48           ` Philip Oakley
2019-02-15 23:32             ` Junio C Hamano
2019-02-16 12:47               ` Philip Oakley
2019-02-17  3:34                 ` Junio C Hamano
2019-02-17 23:34                   ` Philip Oakley
2019-02-18  0:21                     ` Junio C Hamano
2019-02-15 19:28       ` Junio C Hamano
2019-02-15  6:40   ` Viresh Kumar
2019-02-15 16:09     ` Elijah Newren
2019-02-18  4:34       ` Viresh Kumar

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d421fd13-5771-d103-5f77-d38a24afaef6@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox