From: Stefan Beller Date: Fri, 13 Apr 2018 18:22:23 GMT Subject: Re: [PATCH] Deprecate support for .git/info/grafts Message-ID: In-Reply-To: <0f0942043678fe76f8d654306482ee26fac643f0.1523617836.git.johannes.schindelin@gmx.de> Hi Johannes, On Fri, Apr 13, 2018 at 4:11 AM, Johannes Schindelin wrote: > The grafts feature was a convenient way to "stich together" ancient > history to the fresh start of linux.git. Did you mean: stitch? > Its implementation is, however, not up to Git's standards, as there are > too many ways where it can lead to surprising and unwelcome behavior. > > For example, when pushing from a repository with active grafts, it is > possible to miss commits that have been "grafted out", resulting in a > broken state on the other side. > > Also, the grafts feature is limited to "rewriting" commits' list of > parents, it cannot replace anything else. > > The much younger feature implemented as `git replace` set out to remedy > those limitations and dangerous bugs. > > Seeing as `git replace` is pretty mature by now, it is time to deprecate > support for the graft file, and to retire it eventually. It seems that the maturity needed for this commit was reached in 4228e8bc98 (replace: add --graft option, 2014-07-19) Reviewed-by: Stefan Beller > Signed-off-by: Johannes Schindelin > --- > return -1; > + if (advice_graft_file_deprecated) > + advise(_("Support for /info/grafts is deprecated\n" > + "and will be removed in a future Git version.\n" > + "\n" > + "Please use \"git replace --graft [...]\" instead.\n" > + "\n" > + "Turn this message off by running\n" > + "\"git config advice.graftFileDeprecated false\"")); So the user would have to run: for line in /info/grafts: git replace --graft $line # The order in the grafts file is the same as the arguments, # but we'd have to pass each as its own argument rm /info/grafts I wonder if we want to offer a migration tool or just leave it at this hint. Thanks, Stefan