Better stash field name

This commit is contained in:
Nathan Gabrielson
2025-06-10 16:53:30 -07:00
parent 98b7a35a4a
commit a3bc2ba365
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ func listStashes(ctx context.Context, dEnv *env.DoltEnv) error {
if err != nil {
return err
}
cli.Println(fmt.Sprintf("%s: WIP on %s: %s %s", stash.Name, stash.BranchName, commitHash.String(), stash.Description))
cli.Println(fmt.Sprintf("%s: WIP on %s: %s %s", stash.Name, stash.BranchReference, commitHash.String(), stash.Description))
}
return nil
}
+6 -6
View File
@@ -26,11 +26,11 @@ import (
)
type Stash struct {
Name string
BranchName string
Description string
HeadCommit *Commit
StashReference string
Name string
BranchReference string
Description string
HeadCommit *Commit
StashReference string
}
const (
@@ -78,7 +78,7 @@ func getStashList(ctx context.Context, ds datas.Dataset, vrw types.ValueReadWrit
}
s.HeadCommit = headCommit
s.BranchName = meta.BranchName
s.BranchReference = meta.BranchName
s.Description = meta.Description
s.StashReference = reference
@@ -151,7 +151,7 @@ func (itr *StashItr) Next(*sql.Context) (sql.Row, error) {
// BranchName and StashReference are of the form refs/heads/name
// or refs/stashes/name, so we need to parse them to get names
branch := ref.NewBranchRef(stash.BranchName).GetPath()
branch := ref.NewBranchRef(stash.BranchReference).GetPath()
stashRef := ref.NewStashRef(stash.StashReference).GetPath()
return sql.NewRow(stashRef, stash.Name, branch, commitHash.String(), stash.Description), nil