Compare commits
No commits in common. "c404599204289e3e89776c8d92e1fdab6eea0a5c" and "1622f99d5d396fc41998344beee1b7d01502d5a4" have entirely different histories.
c404599204
...
1622f99d5d
|
@ -6,7 +6,7 @@ builds:
|
||||||
- windows
|
- windows
|
||||||
- darwin
|
- darwin
|
||||||
ldflags:
|
ldflags:
|
||||||
- "-s -w -X go.jolheiser.com/git-ea/cmd.Version={{.Version}}"
|
- "-s -w -X main.Version={{.Version}}"
|
||||||
archives:
|
archives:
|
||||||
- replacements:
|
- replacements:
|
||||||
386: i386
|
386: i386
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"github.com/go-git/go-git/v5/plumbing"
|
"github.com/go-git/go-git/v5/plumbing"
|
||||||
"github.com/go-git/go-git/v5/plumbing/object"
|
"github.com/go-git/go-git/v5/plumbing/object"
|
||||||
"github.com/peterbourgon/ff/v3/ffcli"
|
"github.com/peterbourgon/ff/v3/ffcli"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/skratchdot/open-golang/open"
|
"github.com/skratchdot/open-golang/open"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -46,6 +47,10 @@ func (h *Handler) Backport() *ffcli.Command {
|
||||||
|
|
||||||
h.fetch(ctx)
|
h.fetch(ctx)
|
||||||
|
|
||||||
|
if isClean() {
|
||||||
|
log.Fatal().Msg("working tree is dirty")
|
||||||
|
}
|
||||||
|
|
||||||
from := *fromFlag
|
from := *fromFlag
|
||||||
if from == "" {
|
if from == "" {
|
||||||
from = "main"
|
from = "main"
|
||||||
|
|
|
@ -57,7 +57,7 @@ func (h *Handler) Branch() *ffcli.Command {
|
||||||
case strings.HasPrefix(base, "u/"):
|
case strings.HasPrefix(base, "u/"):
|
||||||
base = "upstream/" + strings.TrimPrefix(base, "u/")
|
base = "upstream/" + strings.TrimPrefix(base, "u/")
|
||||||
}
|
}
|
||||||
if !strings.HasPrefix(base, "upstream") && !strings.HasPrefix(base, "origin") && !strings.HasPrefix(base, "pr-") {
|
if (!strings.HasPrefix(base, "upstream") || !strings.HasPrefix(base, "origin")) && !strings.HasPrefix(base, "pr-") {
|
||||||
base = fmt.Sprintf("upstream/%s", base)
|
base = fmt.Sprintf("upstream/%s", base)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"github.com/go-git/go-git/v5/plumbing"
|
"github.com/go-git/go-git/v5/plumbing"
|
||||||
"github.com/go-git/go-git/v5/plumbing/object"
|
"github.com/go-git/go-git/v5/plumbing/object"
|
||||||
"github.com/peterbourgon/ff/v3/ffcli"
|
"github.com/peterbourgon/ff/v3/ffcli"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *Handler) Frontport() *ffcli.Command {
|
func (h *Handler) Frontport() *ffcli.Command {
|
||||||
|
@ -39,6 +40,10 @@ func (h *Handler) Frontport() *ffcli.Command {
|
||||||
|
|
||||||
h.fetch(ctx)
|
h.fetch(ctx)
|
||||||
|
|
||||||
|
if !isClean() {
|
||||||
|
log.Fatal().Msg("working tree is dirty")
|
||||||
|
}
|
||||||
|
|
||||||
commits, err := h.repo().Log(&git.LogOptions{
|
commits, err := h.repo().Log(&git.LogOptions{
|
||||||
From: h.head(from),
|
From: h.head(from),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue