impure renames / history tracking

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

 



Hi,

I'm trying to understand git better (so I can explain it better to others, with an eye to them considering switching to git), one question I have is about renames.

- git obviously detects pure renames perfectly well

- git doesn't however record renames, so 'impure' renames may not be
  detected

My question is:

- why not record rename information explicitely in the commit object?

I.e. so as to be able to follow history information through 'impure' renames without having to resort to heuristics.

E.g. imagine a project where development typically occurs through:

o: commit
m: merge

   o---o-m--o-o-o--o----m <- project
  /     /              /
o-o-o-o-o--o-o-o--o-o-o <- main branch

The project merge back to main in one 'big' combined merge (collapsing all of the commits on 'project' into one commit). This leads to 'impure renames' being not uncommon. The desired end-result of merging back to 'main' being to rebase 'project' as one commit against 'main', and merge that single commit back, a la:

   o---o-m--o-o-o--o----m <- project
  /     /              /
o-o-o-o-o--o-o-o--o-o-o---m <- main branch
                       \ /
                        o <- project_collapsed

So that 'm' on 'main' is that one commit[1].

The merits or demerits of such merging practice aside, what reason would there be /against/ recording explicit rename information in the commit object, so as to help browsers follow history (particularly impure renames) better in a commit?

I.e. would there be resistance to adding meta-info rename headers commit objects, and having diffcore and other tools to use those headers to /augment/ their existing heuristics in detecting renames?

Thanks!

1. Git currently doesn't have 'porcelain' to do this, presumably there'd be no objection to one?

regards,
--
Paul Jakma	paul@xxxxxxxx	paul@xxxxxxxxx	Key ID: 64A2FF6A
Fortune:
It is the quality rather than the quantity that matters.
- Lucius Annaeus Seneca (4 B.C. - A.D. 65)
-
: 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]