There are very few Q&A's on git grafts
versus replace
. The search [git] +grafts +replace only found two that felt relevant of the 5. what-are-git-info-grafts-for and git-what-is-a-graftcommit-or-a-graft-id. There is also a note on git.wiki.kernel.org:GraftPoint
Are grafts now completely overtaken by the replace
and filter-branch
, or do they still needed for some special corner cases (and backward compatibility) ?
In general, how do they differ (e.g. which are transported between repos), and how are they generically the same? I've seen that Linus doesn't appear to care about grafts at present in the discussion on commit generation numbers (of the max parents back to any root variety) "Grafts are already unreliable."
EDIT: more info found.
A search of www.kernel.org/pub/software/scm/git/docs for graft
only found 3 results:
- git-filter-branch(1),
- v1.5.4.7/git-filter-branch(1),
- v1.5.0.7/git-svn(1).
A slightly broader search found RelNotes/1.6.5.txt which contains:
- refs/replace/ hierarchy is designed to be usable as a replacement of the "grafts" mechanism, with the added advantage that it can be transferred across repositories.
Unfortunately, the gitrepository-layout(5) isn't yet up to date with the refs/replace/ repository layout info (and notes), nor any deprecation note of info/grafts.
This gets closer to supporting what I was thinking but I'd welcome any confirmation or clarification.
replace
can do everything that grafts were used for. – Olethea