diff options
| -rw-r--r-- | autogen.go | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -39,8 +39,15 @@ func (repo *Repo) AutogenSave(files []string, refname string, del bool) error { } // restores files from git metadata (notes) -func (repo *Repo) AutogenRestore() error { - result := repo.Run([]string{"git", "notes", "show"}) +func (repo *Repo) AutogenRestore(refname string) error { + var cmd []string + if refname == "" { + cmd = []string{"git", "notes", "show"} + } else { + cmd = []string{"git", "notes", "show", refname} + } + + result := repo.Run(cmd) if result.Exit != 0 { return errors.New(fmt.Sprint("git notes show returned ", result.Exit)) } |
