Skip to content

Commit

Permalink
base stash actions on STASH_NAME instead of COMMIT_HASH
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed May 1, 2023
1 parent 2ece68d commit 9d49608
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/views/CommitDetails.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default defineComponent
filename: filepath

_commit_actions = commit_actions(props.commit.hash)
_stash_actions = stash_actions(props.commit.hash)
_stash_actions = stash_actions(stash.value?.name or '')

{
branch_tips
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/RefTip.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export default defineComponent
if is_branch.value
to_context_menu_entries(branch_actions(props.git_ref.name))
else if props.git_ref.type == 'stash' and props.commit
to_context_menu_entries(stash_actions(props.commit.hash))
to_context_menu_entries(stash_actions(props.git_ref.name))
else if props.git_ref.type == 'tag'
to_context_menu_entries(tag_actions(props.git_ref.name))
4 changes: 2 additions & 2 deletions web/src/views/store.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export tag_actions = (###* @type string ### tag_name) =>
parse_config_actions(config_tag_actions.value, [['{TAG_NAME}', tag_name.replace(/^tag: /, '')]])
``###* @type {Ref<ConfigGitAction[]>} ###
config_stash_actions = ref []
export stash_actions = (###* @type string ### hash) =>
parse_config_actions(config_stash_actions.value, [['{COMMIT_HASH}', hash]])
export stash_actions = (###* @type string ### stash_name) =>
parse_config_actions(config_stash_actions.value, [['{STASH_NAME}', stash_name]])
``###* @type {Ref<ConfigGitAction[]>} ###
_unparsed_combine_branches_actions = ref []
export combine_branches_actions = computed =>
Expand Down

0 comments on commit 9d49608

Please sign in to comment.