aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2019-06-12 17:42:20 +0200
committerGitHub <noreply@github.com>2019-06-12 17:42:20 +0200
commit6142bc316a5ade48044c95f5be92872e7e00b7d6 (patch)
tree854e0548fe4410cb211d184bd1a69558568bd046
parent60033b8925a18fff9f68bea3d980076f73eb3cb5 (diff)
parent4b689826bfc1df9927e18ebede18841d22cbcf51 (diff)
downloadgo-git-6142bc316a5ade48044c95f5be92872e7e00b7d6.tar.gz
Merge pull request #1164 from noonehereplzgo/patch-1
use constant instead of literal string
-rw-r--r--worktree.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/worktree.go b/worktree.go
index 1b10449..576ae0a 100644
--- a/worktree.go
+++ b/worktree.go
@@ -722,7 +722,7 @@ func (w *Worktree) Clean(opts *CleanOptions) error {
func (w *Worktree) doClean(status Status, opts *CleanOptions, dir string, files []os.FileInfo) error {
for _, fi := range files {
- if fi.Name() == ".git" {
+ if fi.Name() == GitDirName {
continue
}