Skip to content

Commit

Permalink
typos and such
Browse files Browse the repository at this point in the history
  • Loading branch information
sdboyer committed Dec 4, 2016
1 parent 05ae255 commit 49ceeb9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions git.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,20 @@ func (s *GitRepo) UpdateVersion(version string) error {
// submodules. Or nested submodules. What a great idea, submodules.
func (s *GitRepo) defendAgainstSubmodules() error {
// First, update them to whatever they shoudl be, if there should happen to be any.
out, err = s.RunFromDir("git", "submodule", "update", "--init", "--recursive")
out, err := s.RunFromDir("git", "submodule", "update", "--init", "--recursive")
if err != nil {
return NewLocalError("Unexpected error while defensively updating submodules", err, string(out))
}
// Now, do a special extra-aggressive clean in case changing versions caused
// one or more submodules to go away.
out, err = s.RunFromDir("git", "clean", "-x", "-d", "-f", "-f")
if err != nil {
return NewLocalError("Unexpected while defensively cleaning up after possible submodules", err, string(out))
return NewLocalError("Unexpected error while defensively cleaning up after possible derelict submodule directories", err, string(out))
}
// Then, repeat just in case there are any nested submodules that went away.
out, err = s.RunFromDir("git", "submodule", "foreach", "--recursive", "clean", "-x", "-d", "-f", "-f")
if err != nil {
return NewLocalError("Unexpected while defensively cleaning up after possible submodules", err, string(out))
return NewLocalError("Unexpected error while defensively cleaning up after possible derelict nested submodule directories", err, string(out))
}

return nil
Expand Down Expand Up @@ -385,10 +385,10 @@ func (s *GitRepo) ExportDir(dir string) error {
return NewLocalError("Unable to export source", err, string(out))
}
// and now, the horror of submodules
out, err := s.RunFromDir("git", "submodule", "foreach", "--recursive", "'git checkout-index -f -a --prefix=\""+filepath.Join(dir, "$path")+"\"'")
out, err = s.RunFromDir("git", "submodule", "foreach", "--recursive", "'git checkout-index -f -a --prefix=\""+filepath.Join(dir, "$path")+"\"'")
s.log(out)
if err != nil {
return NewLocalError("Error while exporting submodule sources")
return NewLocalError("Error while exporting submodule sources", err, string(out))
}

return nil
Expand Down

0 comments on commit 49ceeb9

Please sign in to comment.