mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
Add separate open command for links and check if branch exists on remote before opening pull request link.
This commit is contained in:
parent
c69fce2e9d
commit
990dc8c4ea
11 changed files with 49 additions and 11 deletions
|
@ -561,6 +561,16 @@ func (c *GitCommand) GetRemoteURL() string {
|
|||
return utils.TrimTrailingNewline(url)
|
||||
}
|
||||
|
||||
// CheckRemoteBranchExists Returns remote branch
|
||||
func (c *GitCommand) CheckRemoteBranchExists(branch *Branch) bool {
|
||||
_, err := c.OSCommand.RunCommandWithOutput(fmt.Sprintf(
|
||||
"git show-ref --verify -- refs/remotes/origin/%s",
|
||||
branch.Name,
|
||||
))
|
||||
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// Diff returns the diff of a file
|
||||
func (c *GitCommand) Diff(file *File) string {
|
||||
cachedArg := ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue