diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2021-04-29 23:23:37 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2021-05-01 15:42:56 -0600 |
commit | d39c8630d9befab256448c03564ef438fc1b0e90 (patch) | |
tree | 0b1e69c01dfc8009a760bcccf7577d248a6a4d2e | |
parent | 54379b08717fb411048db5b3957fbb66920b7266 (diff) |
sitting here
-rw-r--r-- | fi-prune-empty2/stream.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fi-prune-empty2/stream.go b/fi-prune-empty2/stream.go index 9d891b1..8c3c25b 100644 --- a/fi-prune-empty2/stream.go +++ b/fi-prune-empty2/stream.go @@ -224,9 +224,14 @@ func (h *Handler) CmdCommitEnd(cmd libfastimport.CmdCommitEnd) error { // apply the result of ProcessCommit to h.commitMeta if cmt.Force { h.commitMeta.From = h.driver.FixCommitIsh(h.commitMeta.From) + merge := make([]string, 0, len(h.commitMeta.Merge)) for i := range h.commitMeta.Merge { - h.commitMeta.Merge[i] = h.driver.FixCommitIsh(h.commitMeta.Merge[i]) + fixed := h.driver.FixCommitIsh(h.commitMeta.Merge[i]) + if fixed != "" { + merge = append(merge, fixed) + } } + h.commitMeta.Merge = merge } else { if len(cmtptr.Parents) == 0 { h.commitMeta.From = EmptyHash @@ -240,6 +245,7 @@ func (h *Handler) CmdCommitEnd(cmd libfastimport.CmdCommitEnd) error { } // emit the commit + h.commitMeta.Msg = strings.TrimPrefix(h.commitMeta.Msg, "(from AES) ") if err := h.backend.Do(h.commitMeta); err != nil { return errors.Wrapf(err, "processing commit :%d", h.commitMeta.Mark) } |