You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppress the warning that "info/grafts" is deprecated
Git has deprecated "info/grafts", and as part of this now emits a
deprecation warning if the user appears to be using a grafts file.
We *don't* want to use a grafts file; in fact, we want to suppress it
unconditionally even for repositories that would normally use grafts.
We do that by setting `GIT_GRAFT_FILE=/dev/null`; i.e., by telling git
to use an empty grafts file.
Unfortunately, the way that we *suppress* grafts triggers git's
warning!
So...continue suppressing grafts as before, but *also* add a new git
option `-c advice.graftFileDeprecated=false`, to suppress the
deprecation warning.
This should be perfectly backwards compatible. Versions of git prior
to the deprecation will suppress any grafts and will ignore the new
git option. The current (as of this writing) version of git will also
suppress any grafts and will elide the warning due to the use of the
new git option.
It's not 100% certain that this will be perfectly forwards
compatible (is anything ever?). It's possible that the git project,
after it removes the grafts facility, might start treating a request
to use grafts as a hard error, in which case our grafts suppression
will cause git to fail. If that happens, we will have to be cleverer.
For example, we might check which version of Git is in use, and only
suppress grafts for versions that still allow them. But we'll cross
that bridge if/when we come to it.
Fixes#44.
0 commit comments