# Splitting files merge with branches

2 messages from 2013-11-05 to 2013-11-05. Participants: Javier Domingo, Junio C Hamano.
Thread: https://gitlist.dev/t/35282

## Javier Domingo, 2013-11-05 09:38

Subject: Splitting files merge with branches
Message-ID: <CALZVapmJDEWyUcgdJ0C0V0bKpSyukHZ=ei9GgVh-Z0yfb8x8tQ@mail.gmail.com>
URL: https://gitlist.dev/e/CALZVapmJDEWyUcgdJ0C0V0bKpSyukHZ%3Dei9GgVh-Z0yfb8x8tQ%40mail.gmail.com

```
Hi,

I have been using git for now 4 years, and one feature I miss a lot,
that would increase the usability of git in many cases, would be
having it detect "inter-file" movements, so that if I, in a single
commit just part one file into many, git can track that change.

I suppose this is quite difficult, as would mean having extra features
in diffs, and I don't know how could it be implemented, but that would
ease even more having integration branches, and merging one with
eachother.

I wouldn't either know how to split it, in the means that if 5 lines
are in the middle of a split, where would those lines go? But as you
have resolved quite variety of problems, you might now a way.

Just wanted to collaborate with my idea =)

Cheers,

Javier Domingo Cansino

```

## Junio C Hamano, 2013-11-05 19:19

Subject: Re: Splitting files merge with branches
Message-ID: <xmqq8ux2ac6e.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq8ux2ac6e.fsf%40gitster.dls.corp.google.com
In-Reply-To: <CALZVapmJDEWyUcgdJ0C0V0bKpSyukHZ=ei9GgVh-Z0yfb8x8tQ@mail.gmail.com>

```
Javier Domingo <javierdo1@gmail.com> writes:

> I have been using git for now 4 years, and one feature I miss a lot,
> that would increase the usability of git in many cases, would be
> having it detect "inter-file" movements, so that if I, in a single
> commit just part one file into many, git can track that change.
>
> I suppose this is quite difficult, as would mean having extra features
> in diffs, and I don't know how could it be implemented,...

Sounds like $gmane/217 to me.

http://thread.gmane.org/gmane.comp.version-control.git/27/focus=217

Some of the pieces that are needed to immplement the "drilling down"
Linus envisioned in the message are already there, e.g. you can ask
"log -S<block of text> -1" to find the last commit that touched the
block of text in question.  Once you find that commit, you can
inspect "git show -m -p <that-commit>" and find "Ahh, that block of
text that appeared in the new tree came from five copies of similar
blocks of text in the old tree".  Nobody wrote that last piece of
the logic yet, though.

```
