mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-24 11:39:18 -05:00
Better stash field name
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user