Skip to content

Commit

Permalink
Move ignore-file check to link.File
Browse files Browse the repository at this point in the history
  • Loading branch information
andornaut committed Apr 21, 2018
1 parent bc81046 commit db7e4e7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions link/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ func Dir(repoPath, intPath string) error {
switch p {
case repoPath:
return nil
case path.Join(repoPath, ".gitignore"):
return nil
case path.Join(repoPath, "README.md"):
return nil
case path.Join(repoPath, ".git"):
return filepath.SkipDir
}
Expand Down Expand Up @@ -52,7 +48,12 @@ func Dir(repoPath, intPath string) error {
// File declares an `error` return type to match the signature of `Dir`, but
// always returns nil.
func File(repoPath, intPath string) error {
if intPath == path.Join(repoPath, "LICENSE") || intPath == path.Join(repoPath, "README.md") {
switch intPath {
case path.Join(repoPath, ".gitignore"):
return nil
case path.Join(repoPath, "LICENSE"):
return nil
case path.Join(repoPath, "README.md"):
return nil
}

Expand Down

0 comments on commit db7e4e7

Please sign in to comment.