Skip to content

Commit e15a0f5

Browse files
authored
Merge pull request #47 from github/suppress-grafts-warning
Suppress the warning that "info/grafts" is deprecated
2 parents 087b40a + 57f2f6b commit e15a0f5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

git/git.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,15 @@ func NewRepository(path string) (*Repository, error) {
120120
}
121121

122122
func (repo *Repository) gitCommand(callerArgs ...string) *exec.Cmd {
123-
// Disable replace references when running our commands:
124-
args := []string{"--no-replace-objects"}
123+
args := []string{
124+
// Disable replace references when running our commands:
125+
"--no-replace-objects",
126+
127+
// Disable the warning that grafts are deprecated, since we
128+
// want to set the grafts file to `/dev/null` below (to
129+
// disable grafts even where they are supported):
130+
"-c", "advice.graftFileDeprecated=false",
131+
}
125132

126133
args = append(args, callerArgs...)
127134

0 commit comments

Comments
 (0)