From 4bf65b1bb22d7800b43eb715cb65f57e028fe2cb Mon Sep 17 00:00:00 2001 From: Azareal Date: Wed, 4 Apr 2018 09:45:07 +0100 Subject: [PATCH] Will a reset do the trick...? --- updater/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/updater/main.go b/updater/main.go index 0136bfa0..058f7b6e 100644 --- a/updater/main.go +++ b/updater/main.go @@ -64,7 +64,12 @@ func updater(scanner *bufio.Scanner) bool { if err == git.NoErrAlreadyUpToDate { fmt.Println("You are already up-to-date") return true - } else if err != nil { + } else if err != nil && err != git.ErrUnstagedChanges { // fixes a bug in git where it refuses to update the files + return logError(err) + } + + err = workTree.Reset(&git.ResetOptions{Mode: git.MergeReset}) + if err != nil { return logError(err) }