diff options
author | Lauris BH <lauris@nix.lv> | 2020-03-17 18:19:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-17 12:19:58 -0400 |
commit | 43c09134a972dc421aa06fb303697671c828cf67 (patch) | |
tree | 6bf8da5bc0a23ce516cd5598ec982b6715fb6716 /vendor/gopkg.in/src-d/go-git.v4/common.go | |
parent | 2f928316dbc2bb71137e857d97039d4f51f7d405 (diff) | |
download | gitea-43c09134a972dc421aa06fb303697671c828cf67.tar.gz gitea-43c09134a972dc421aa06fb303697671c828cf67.zip |
Migrate to go-git/go-git v5.0.0 (#10735)
Diffstat (limited to 'vendor/gopkg.in/src-d/go-git.v4/common.go')
-rw-r--r-- | vendor/gopkg.in/src-d/go-git.v4/common.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/vendor/gopkg.in/src-d/go-git.v4/common.go b/vendor/gopkg.in/src-d/go-git.v4/common.go deleted file mode 100644 index f837a2654c..0000000000 --- a/vendor/gopkg.in/src-d/go-git.v4/common.go +++ /dev/null @@ -1,22 +0,0 @@ -package git - -import "strings" - -const defaultDotGitPath = ".git" - -// countLines returns the number of lines in a string à la git, this is -// The newline character is assumed to be '\n'. The empty string -// contains 0 lines. If the last line of the string doesn't end with a -// newline, it will still be considered a line. -func countLines(s string) int { - if s == "" { - return 0 - } - - nEOL := strings.Count(s, "\n") - if strings.HasSuffix(s, "\n") { - return nEOL - } - - return nEOL + 1 -} |