commands/track: remove --no-touch option

This commit is contained in:
Taylor Blau 2016-07-06 08:33:50 -06:00
parent f516dfecc7
commit 08862035ef
2 changed files with 9 additions and 31 deletions

@ -26,7 +26,6 @@ var (
Run: trackCommand,
}
trackNoTouchFlag bool
trackVerboseLoggingFlag bool
trackDryRunFlag bool
)
@ -122,7 +121,6 @@ ArgsLoop:
}
Print("Tracking %s", pattern)
if !trackNoTouchFlag || trackDryRunFlag {
for _, f := range gittracked {
if trackVerboseLoggingFlag || trackDryRunFlag {
Print("Git LFS: touching %s", f)
@ -137,7 +135,6 @@ ArgsLoop:
}
}
}
}
}
type mediaPath struct {
@ -233,7 +230,6 @@ func blocklistItem(name string) string {
}
func init() {
trackCmd.Flags().BoolVarP(&trackNoTouchFlag, "no-touch", "n", false, "skip modifying files matched by the glob")
trackCmd.Flags().BoolVarP(&trackVerboseLoggingFlag, "verbose", "v", false, "log which files are being tracked and modified")
trackCmd.Flags().BoolVarP(&trackDryRunFlag, "dry-run", "d", false, "preview results of running `git lfs track`")

@ -45,24 +45,6 @@ begin_test "track"
)
end_test
begin_test "track --no-touch"
(
set -e
reponame="track_no_touch"
mkdir "$reponame"
cd "$reponame"
git init
touch foo.dat
git add foo.dat
git lfs track -v --no-touch "foo.dat" 2>&1 > track.log
[ "0" -eq "$(grep -c 'Git LFS: touching foo.dat' track.log)" ]
)
end_test
begin_test "track --verbose"
(
set -e