Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable to expand to branch name - local or remote #900

Closed
jpschewe opened this issue Mar 1, 2019 · 4 comments
Closed

Variable to expand to branch name - local or remote #900

jpschewe opened this issue Mar 1, 2019 · 4 comments

Comments

@jpschewe
Copy link

jpschewe commented Mar 1, 2019

I have this binding to fast forward branches

bind refs > !git merge --ff-only %(branch)

When I have a local branch selected this works just fine. However when I have a remote branch selected, it appears to drop the remote name from the "%(branch)". Reading the documentation it seems that "%(repo:remote)" will work sometimes, but not when I want to fast forward to a remote branch that isn't associated with the checked out branch.

Ideally I'd like to bind a key to fast forward the current branch to whatever branch name is currently selected, whether that is a local branch or a remote branch. Is this possible?

@koutcher
Copy link
Collaborator

koutcher commented Mar 2, 2019

Wouldn't bind refs > !git merge --ff-only %(commit) do the job ?

@jpschewe
Copy link
Author

jpschewe commented Mar 2, 2019

Thanks, I hadn't thought of that. The other binding that I'd like to use this with is a no-ff command. Using the commit id in the merge will populate the commit message with the commit id rather than the branch name though. Do you have a solution for that?

@koutcher
Copy link
Collaborator

koutcher commented Mar 3, 2019

You can use %(remote)/%(branch) for remote branches but, in the current state of Tig, I don't think you can handle both local and remote branches with the same binding.

@jpschewe
Copy link
Author

jpschewe commented Mar 3, 2019

Thus the feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants