Re: [git-users] git log "double dot" showing a false positive?

2017-08-07 Thread Chris Murphy
Unfortunately not -- that's also why I included the --contains result.

± % git log --pretty="%H" branchA | grep 
9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


± % git log --pretty="%H" branchB | grep 
9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
9ba8f06829b2d2170f23254ed3fe8f3727fe56dc



Here's the result for merge-base:

± % git merge-base -a branchA branchB
03dd551f031f48e8702f9154b23f53af8cc4799b


Thanks!

On Monday, August 7, 2017 at 1:52:26 PM UTC-4, G. Sylvie Davies 
[bit-booster.com] wrote:
>
> > 
>>> >  % git log branchA..branchB | grep 
>>> 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>>> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>>> > 
>>> > ą % git log branchA | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>>> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>>> > 
>>> > ą % git log branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>>> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>>> >
>>
>>
> These three commands resulting in output like this make no sense!
>
> The only thing I can think is that a commit message has the words "commit 
> 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc" in it, and your grep is picking 
> that up.   Sometimes "git merge --squash" puts together commit messages 
> that contain text like that.
>
> Can you try running your "git log" commands with --pretty="%H" to prevent 
> commit messages from possibly interfering with the grep?
>
> git log --pretty="%H"
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git log "double dot" showing a false positive?

2017-08-07 Thread G. Sylvie Davies [bit-booster.com]

>
> > 
>> >  % git log branchA..branchB | grep 
>> 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>> > 
>> > ą % git log branchA | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>> > 
>> > ą % git log branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
>> >
>
>
These three commands resulting in output like this make no sense!

The only thing I can think is that a commit message has the words "commit 
9ba8f06829b2d2170f23254ed3fe8f3727fe56dc" in it, and your grep is picking 
that up.   Sometimes "git merge --squash" puts together commit messages 
that contain text like that.

Can you try running your "git log" commands with --pretty="%H" to prevent 
commit messages from possibly interfering with the grep?

git log --pretty="%H"


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git log "double dot" showing a false positive?

2017-08-07 Thread Philip Oakley
Have you checked how many merge bases there are for the two branches?

It is possible in complex criss-cross merge scenarios to have multiple merge 
bases. IIUC this may give different results for the double dot case depending 
on which of the merge-bases was used. I could well be wrong. But it is worth 
checking so that you can see the history.

Also try 'gitk' but passing in the ref limits so as to limit the display tree.

Philip
  - Original Message - 
  From: Chris Murphy 
  To: Git for human beings 
  Sent: Monday, August 07, 2017 4:28 PM
  Subject: [git-users] git log "double dot" showing a false positive?


  Hi,


  My understanding is that the command
  git log branchA..branchB


  should return the commits reachable via branchB that are not reachable via 
branchA


  I use this command a lot and have never noticed an issue, until now. 


  I have the following example:


  ± % git --version
  git version 2.13.0


   % git log branchA..branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
  commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


  ± % git log branchA | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
  commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


  ± % git log branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
  commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


  ± % git branch --contains 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc | grep 
"branchA\|branchB"
  * branchA
branchB


  ± % git log --left-right branchA...branchB | grep 
9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
  commit > 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


  I believe that is an incorrect result for the double dot syntax.


  The history of the repo is quite tangled with many merges, but I uploaded it 
here (with sensitive info removed, sorry, it's a repo for my work) in case it 
helps:
  https://gist.github.com/cmurphycode/a75d7c4616a93be2bb4fd1096d162714





  Any hints are appreciated.


  Thanks!



  -- 
  You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git log "double dot" showing a false positive?

2017-08-07 Thread Chris Murphy
Thanks Konstantin,


You are right - I would expect that triple-dot shows this commit (but not 
double-dot). I included the triple-dot command to show what git thinks for 
the --left-right value, in case that was helpful.

On Monday, August 7, 2017 at 11:54:11 AM UTC-4, Konstantin Khomoutov wrote:
>
> On Mon, Aug 07, 2017 at 08:28:15AM -0700, Chris Murphy wrote: 
>
> [...] 
> > ą % git --version 
> > git version 2.13.0 
> > 
> >  % git log branchA..branchB | grep 
> 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
> > 
> > ą % git log branchA | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
> > 
> > ą % git log branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
> > commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
> > 
> > ą % git branch --contains 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc | 
> grep 
> > "branchA\|branchB" 
> > * branchA 
> >   branchB 
> > 
> > ą % git log --left-right branchA...branchB | grep 
> > 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
> > commit > 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc 
> > 
> > I believe that is an incorrect result for the double dot syntax. 
>
> Just a quick reality check: the latter command uses the triple-dot, 
> which is different from double-dot in its semantics. 
> Is it intentional or an oversight? 
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] git log "double dot" showing a false positive?

2017-08-07 Thread Konstantin Khomoutov
On Mon, Aug 07, 2017 at 08:28:15AM -0700, Chris Murphy wrote:

[...]
> ą % git --version
> git version 2.13.0
> 
>  % git log branchA..branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
> commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
> 
> ą % git log branchA | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
> commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
> 
> ą % git log branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
> commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
> 
> ą % git branch --contains 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc | grep 
> "branchA\|branchB"
> * branchA
>   branchB
> 
> ą % git log --left-right branchA...branchB | grep 
> 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
> commit > 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
> 
> I believe that is an incorrect result for the double dot syntax.

Just a quick reality check: the latter command uses the triple-dot,
which is different from double-dot in its semantics.
Is it intentional or an oversight?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.