Re: git log --follow doesn't follow a rename over a merge

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

 



On Thu, Jun 16, 2011 at 10:59:23AM -0700, Junio C Hamano wrote:

> > Doesn't:
> >
> >   git log -- plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBreakpoints.java
> >
> > do that?
> 
> If the file emerged in one branch (either the primary or a side branch) in
> the past as a failed experiment and then got removed before merging back,
> i.e.
> 
>    past ---o----o-----o-----o-----o-----o-----o-----o--- now
>             \                          /
>              o----*----o----o----*----o
>                   ^added         ^removed
> 
> then the merges are simplified away and you would not see it.

Ah, right. The default simplification so often does what I want that I
forget there are cases it can miss.

> Perhaps simplify-merges option may help.

This test case shows full-history helping:

-- >8 --
commit() {
  echo $1 >$1 && git add $1 && git commit -m $1
}

git init repo &&
cd repo &&
commit one &&
commit two &&
commit three &&
git checkout -b side HEAD^ &&
commit four &&
commit five &&
git rm five && git commit -m "remove five" &&
commit six &&
git checkout master &&
git merge side &&
echo "==> default log (shows nothing)" &&
git --no-pager log -- five
echo "==> full-history" &&
git --no-pager log --full-history -- five
--
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]