shithub: hugo

Download patch

ref: 94b5be67fc73b87d114d94a7bb1a33ab997f30f1
parent: c7646551bed0cfe81aa0581d7b50f46bb77aa2a8
author: Albert Nigmatzianov <[email protected]>
date: Mon May 15 08:58:02 EDT 2017

commands: Skip .git directories

Fix #3468

--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -663,6 +663,12 @@
 			return nil
 		}
 
+		// Skip .git directories.
+		// Related to https://github.com/spf13/hugo/issues/3468.
+		if fi.Name() == ".git" {
+			return nil
+		}
+
 		if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
 			link, err := filepath.EvalSymlinks(path)
 			if err != nil {