File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
** /.git
2
- / .git
3
- ! / .git /HEAD
4
- ! / .git /refs /heads
2
+ .git
3
+ ! .git /HEAD
4
+ ! .git /refs /heads
5
5
** /* _test.go
6
6
7
7
build /_workspace
Original file line number Diff line number Diff line change @@ -82,14 +82,15 @@ func Env() Environment {
82
82
// LocalEnv returns build environment metadata gathered from git.
83
83
func LocalEnv () Environment {
84
84
env := applyEnvFlags (Environment {Name : "local" , Repo : "ethereum/go-ethereum" })
85
- head := ReadGitFile ("HEAD" )
85
+
86
+ head := readGitFile ("HEAD" )
86
87
if splits := strings .Split (head , " " ); len (splits ) == 2 {
87
88
head = splits [1 ]
88
89
} else {
89
90
return env
90
91
}
91
92
if env .Commit == "" {
92
- env .Commit = ReadGitFile (head )
93
+ env .Commit = readGitFile (head )
93
94
}
94
95
if env .Branch == "" {
95
96
if head != "HEAD" {
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ func RunGit(args ...string) string {
89
89
return strings .TrimSpace (stdout .String ())
90
90
}
91
91
92
- // ReadGitFile returns content of file in .git directory.
93
- func ReadGitFile (file string ) string {
92
+ // readGitFile returns content of file in .git directory.
93
+ func readGitFile (file string ) string {
94
94
content , err := ioutil .ReadFile (path .Join (".git" , file ))
95
95
if err != nil {
96
96
return ""
You can’t perform that action at this time.
0 commit comments