threads / bug / 46688

Bug report

Subject: Bug report

## tl;dr

6 messages between Aug 30, 2017 and Sep 2, 2017.

replies: 5people: 5as markdown or json

Aleksandar Pavic· Aug 30, 2017, 21:25 UTC · lore
  I have a file
  app/Controller/CustomerCardVerificationController.php

And when I take a look at changes log, I get this (no matter which tool I use):

2017-07-31 19:41 dule o membership renew payment email 2017-06-07 08:59 Dusan Tatic o cc refund clean 2017-04-15 00:16 Miodrag Dragić o refound admin payment 2017-03-20 12:02 Dusan Tatic o CardVerification card connect 2017-03-16 15:59 Aleksandar Pavic o paypal 2017-03-10 13:34 Aleksandar Pavic o Production branch 2017-03-10 13:01 Aleksandar Pavic I Migrating dev

However if I manually browse thru revisions and open revision from 03/27/2017 07:05 PM

I can see the change in that file which is unlisted above, at revision ff9f4946e109bd234d438e4db1d319b1f6cb6580

And I'm at master branch all the time...
We wouldn't have noticed that if it weren't one important feature...
Kevin Daudt· Aug 31, 2017, 06:36 UTC · re: Aleksandar Pavic · lore

Re: Bug report

On Wed, Aug 30, 2017 at 11:25:00PM +0200, Aleksandar Pavic wrote:
Show 25 quoted lines
>  I have a file
> 
>  app/Controller/CustomerCardVerificationController.php
> 
> And when I take a look at changes log, I get this (no matter which tool I
> use):
> 
> 2017-07-31 19:41 dule             o membership renew payment email
> 2017-06-07 08:59 Dusan Tatic      o cc refund clean
> 2017-04-15 00:16 Miodrag Dragić   o refound admin payment
> 2017-03-20 12:02 Dusan Tatic      o CardVerification card connect
> 2017-03-16 15:59 Aleksandar Pavic o paypal
> 2017-03-10 13:34 Aleksandar Pavic o Production branch
> 2017-03-10 13:01 Aleksandar Pavic I Migrating dev
> 
> However if I manually browse thru revisions and open revision from
> 03/27/2017 07:05 PM
> 
> I can see the change in that file which is unlisted above, at revision
> ff9f4946e109bd234d438e4db1d319b1f6cb6580
> 
> And I'm at master branch all the time...
> 
> We wouldn't have noticed that if it weren't one important feature...
> 

What does git branch --contains ff9f4946e109bd234d438e4db1d319b1f6cb6580 return?

Where did you find this commit?
Dov Grobgeld· Aug 31, 2017, 14:19 UTC · re: Kevin Daudt · lore

Re: Bug report

The following answer that I got back in 2015 from Jeff King might be relevant to your problem:

https://marc.info/?l=git&m=144178948506788&w=2

Regards, Dov

On Thu, Aug 31, 2017 at 9:36 AM, Kevin Daudt <me@ikke.info> wrote:
Show 31 quoted lines
> On Wed, Aug 30, 2017 at 11:25:00PM +0200, Aleksandar Pavic wrote:
>>  I have a file
>>
>>  app/Controller/CustomerCardVerificationController.php
>>
>> And when I take a look at changes log, I get this (no matter which tool I
>> use):
>>
>> 2017-07-31 19:41 dule             o membership renew payment email
>> 2017-06-07 08:59 Dusan Tatic      o cc refund clean
>> 2017-04-15 00:16 Miodrag Dragić   o refound admin payment
>> 2017-03-20 12:02 Dusan Tatic      o CardVerification card connect
>> 2017-03-16 15:59 Aleksandar Pavic o paypal
>> 2017-03-10 13:34 Aleksandar Pavic o Production branch
>> 2017-03-10 13:01 Aleksandar Pavic I Migrating dev
>>
>> However if I manually browse thru revisions and open revision from
>> 03/27/2017 07:05 PM
>>
>> I can see the change in that file which is unlisted above, at revision
>> ff9f4946e109bd234d438e4db1d319b1f6cb6580
>>
>> And I'm at master branch all the time...
>>
>> We wouldn't have noticed that if it weren't one important feature...
>>
>
> What does git branch --contains ff9f4946e109bd234d438e4db1d319b1f6cb6580
> return?
>
> Where did you find this commit?
Aleksandar Pavic· Aug 31, 2017, 14:55 UTC · re: Dov Grobgeld · lore

Re: Bug report

Hm, thanks, but the link was not helpful, there are no merge commits to master branch.

Those changes should have not been undone, that's how we caught it, because 1 line peace of code introduced new feature (+-10% tolerance on credit card verification amount).

So most likeley they were undone, but our tree is pretty simple, we have master and production branches.

On 31.08.2017. 16:19, Dov Grobgeld wrote:
Show 39 quoted lines
> The following answer that I got back in 2015 from Jeff King might be
> relevant to your problem:
>
> https://marc.info/?l=git&m=144178948506788&w=2
>
> Regards,
> Dov
>
> On Thu, Aug 31, 2017 at 9:36 AM, Kevin Daudt <me@ikke.info> wrote:
>> On Wed, Aug 30, 2017 at 11:25:00PM +0200, Aleksandar Pavic wrote:
>>>   I have a file
>>>
>>>   app/Controller/CustomerCardVerificationController.php
>>>
>>> And when I take a look at changes log, I get this (no matter which tool I
>>> use):
>>>
>>> 2017-07-31 19:41 dule             o membership renew payment email
>>> 2017-06-07 08:59 Dusan Tatic      o cc refund clean
>>> 2017-04-15 00:16 Miodrag Dragić   o refound admin payment
>>> 2017-03-20 12:02 Dusan Tatic      o CardVerification card connect
>>> 2017-03-16 15:59 Aleksandar Pavic o paypal
>>> 2017-03-10 13:34 Aleksandar Pavic o Production branch
>>> 2017-03-10 13:01 Aleksandar Pavic I Migrating dev
>>>
>>> However if I manually browse thru revisions and open revision from
>>> 03/27/2017 07:05 PM
>>>
>>> I can see the change in that file which is unlisted above, at revision
>>> ff9f4946e109bd234d438e4db1d319b1f6cb6580
>>>
>>> And I'm at master branch all the time...
>>>
>>> We wouldn't have noticed that if it weren't one important feature...
>>>
>> What does git branch --contains ff9f4946e109bd234d438e4db1d319b1f6cb6580
>> return?
>>
>> Where did you find this commit?
Stephan Beyer· Aug 31, 2017, 16:23 UTC · re: Kevin Daudt · lore

Re: Bug report

On 08/31/2017 08:36 AM, Kevin Daudt wrote:
Show 21 quoted lines
> On Wed, Aug 30, 2017 at 11:25:00PM +0200, Aleksandar Pavic wrote:
>>  I have a file
>>
>>  app/Controller/CustomerCardVerificationController.php
>>
>> And when I take a look at changes log, I get this (no matter which tool I
>> use):
>>
>> 2017-07-31 19:41 dule             o membership renew payment email
>> 2017-06-07 08:59 Dusan Tatic      o cc refund clean
>> 2017-04-15 00:16 Miodrag Dragić   o refound admin payment
>> 2017-03-20 12:02 Dusan Tatic      o CardVerification card connect
>> 2017-03-16 15:59 Aleksandar Pavic o paypal
>> 2017-03-10 13:34 Aleksandar Pavic o Production branch
>> 2017-03-10 13:01 Aleksandar Pavic I Migrating dev
>>
>> However if I manually browse thru revisions and open revision from
>> 03/27/2017 07:05 PM
>>
>> I can see the change in that file which is unlisted above, at revision
>> ff9f4946e109bd234d438e4db1d319b1f6cb6580

I am not sure if I fully understand but I guess your commit ff9f4946e1 has been commited at detached HEAD.

You could do
	git log --oneline --graph master ff9f4946e1
to see where the "missing" commit lies.
And probably a
	git cherry-pick ff9f4946e1
might pick your missing feature.
Stephan
Jeff King· Sep 2, 2017, 08:49 UTC · re: Aleksandar Pavic · lore

Re: Bug report

On Wed, Aug 30, 2017 at 11:25:00PM +0200, Aleksandar Pavic wrote:
Show 20 quoted lines
>  I have a file
> 
>  app/Controller/CustomerCardVerificationController.php
> 
> And when I take a look at changes log, I get this (no matter which tool I
> use):
> 
> 2017-07-31 19:41 dule             o membership renew payment email
> 2017-06-07 08:59 Dusan Tatic      o cc refund clean
> 2017-04-15 00:16 Miodrag Dragić   o refound admin payment
> 2017-03-20 12:02 Dusan Tatic      o CardVerification card connect
> 2017-03-16 15:59 Aleksandar Pavic o paypal
> 2017-03-10 13:34 Aleksandar Pavic o Production branch
> 2017-03-10 13:01 Aleksandar Pavic I Migrating dev
>
> However if I manually browse thru revisions and open revision from
> 03/27/2017 07:05 PM
> 
> I can see the change in that file which is unlisted above, at revision
> ff9f4946e109bd234d438e4db1d319b1f6cb6580
How are you invoking the log? Are you doing:
  git log app/Controller/CustomerCardVerificationController.php

or similar? If that is the case, then history simplification may be causing the results you see. And even you don't _see_ any merges in the output, that is because they were simplified away. And the commit you are looking for may have been on a side branch that was simplified away.

If you do:
  git log --full-history app/...

does the commit you are interested in show up? If so, then it was removed due to history simplification. And if you are surprised that a side branch was simplified away, that is most likely because there is a mis-merge in your history (some merge which threw away the changes on a side branch).

Try:
  git log --graph --oneline --name-status --full-history app/...

to see the whole shape of history, including which commits touched the file.

You can read more about it in the "History Simplification" section of "git help log".

-Peff

← back to recent threads