Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Commit 1c65f7e

Browse files
committed
[README] add pull support
1 parent fe32170 commit 1c65f7e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

fgit.go

+8-10
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ func debugConnection(url string) bool {
3030
}
3131

3232
func debug(url string) bool {
33+
fmt.Println("" +
34+
"FastGit Debug Command Line Tool\n" +
35+
"===============================")
3336
if url != "--help" {
34-
fmt.Println("" +
35-
"FastGit Debug Tool\n" +
36-
"==================\n" +
37-
"Remote Address:", url)
37+
fmt.Println("Remote Address:", url)
3838
fmt.Print("IP Address: ")
3939
addr, err := net.LookupIP(strings.Replace(strings.Replace(url, "https://", "", -1), "http://", "", -1))
4040
if err != nil {
@@ -60,8 +60,6 @@ func debug(url string) bool {
6060
return debugConnection(url)
6161
} else {
6262
fmt.Println("" +
63-
"FastGit Debug Command Line Tool\n" +
64-
"===============================\n" +
6563
"SYNTAX\n" +
6664
" fgit debug [URL<string>] [--help]\n" +
6765
"REMARKS\n" +
@@ -128,7 +126,7 @@ func main() {
128126
}
129127

130128
isConvertToFastGit := false
131-
isPush := false
129+
isPushOrPull := false
132130

133131
if os.Args[1] == "debug" {
134132
var isConnectOk bool
@@ -148,13 +146,13 @@ func main() {
148146
}
149147

150148
for i := range os.Args {
151-
if os.Args[i] == "push" {
152-
isPush = true
149+
if os.Args[i] == "push" || os.Args[i] == "pull" {
150+
isPushOrPull = true
153151
break
154152
}
155153
}
156154

157-
if isPush {
155+
if isPushOrPull {
158156
isConvertToFastGit = convertToFastGit()
159157
}
160158

0 commit comments

Comments
 (0)