Re: Effectively navigating branch history

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stephen Bash <bash@xxxxxxxxxxx> writes:

>> Yeah, I think it was 1f9a980636 which was a merge between fb674d7 and
>> 73546c0. I just compared the output between these two:
>> 
>> $ git diff fb674d7...73546c0 -- config.c ;# what the topic did
>> $ git diff fb674d7 1f9a980 -- config.c ;# what was merged
>
> I often find myself wanting to do the "what the topic did" operation but
> once the branch is merged and deleted, I have difficulty finding useful
> SHAs to diff.
>
> So in an attempt to educate myself, I tried to track down fb674d7 and
> 1f9a980 (and failed miserably).

I just did

    $ git log --first-parent master -- config.c

which was sufficient for my workflow as most of the commits on master are
merges from topics and I can see what each topic did from the merge commit
summary message.  


If I were doing this on a codebase I am not very familiar with, I probably
I would have first narrowed things down a bit by

    $ git grep -n -e NOGLOBAL -- config.c ;# to learn the line number 830
    $ git blame -L825,835 -- config.c

to learn where the offending NOGLOBAL came from (it is from ab88c363) so
that I can say

    $ git log -m -p -GNOGLOBAL ab88c363.. -- config.c

to find that 1f9a980 reintroduced it by mistake.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]