diff options
Diffstat (limited to 'src/edit/git.go')
-rw-r--r-- | src/edit/git.go | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/edit/git.go b/src/edit/git.go index 010c928..183e84c 100644 --- a/src/edit/git.go +++ b/src/edit/git.go @@ -1,13 +1,13 @@ package main import ( - "strconv" - "io" "bytes" + "errors" "fmt" + "io" "os/exec" + "strconv" "time" - "errors" ) func GitPull() error { @@ -19,11 +19,11 @@ func GitPush() error { } type Edit struct { - UserName string + UserName string UserEmail string - Time time.Time - Message string - Files map[string][]byte + Time time.Time + Message string + Files map[string][]byte } func gitTime(t time.Time) string { @@ -63,12 +63,11 @@ data %d if _, err = fmt.Fprintf(w, "D %s\n", filename); err != nil { return err } - } + } } return nil } - func GitCommit(edit Edit) error { cmd := exec.Command("git", "fast-import") pip, err := cmd.StdinPipe() |