On Fri, 1 Jun 2012 23:23:34 +1200
Kent Fredric <kentfredric@...> wrote:
> On 1 June 2012 22:54, Rich Freeman <email@example.com> wrote:
> > Rebasing re-applies the same diff to the new head to give you a new
> > set of commits. When you apply the same diff to a different parent
> > you end up with a different tree, so the tree signature won't be the
> > same either.
> Not nessecarily. Given that :
> a file with a given content has a fixed SHA
> A tree is just a list of these SHA's , and that in turn is referenced
> by SHA, so if 2 commits have identical file content, their 'tree' sha
> will be the same ( in theory ).
> So that means, if you perform a rebase, assuming the filesystem looks
> the same as it did before the rebase, it will have the same SHA1 for
> the tree, regardless of the process of how it got to be that way.
I don't think that 'not necessarily' makes any difference here. Maybe
in our particular case this is not as likely as with regular source
code tree but while rebasing you can hit conflicts. And then files
start to change...