summaryrefslogtreecommitdiff
path: root/filter.go
diff options
context:
space:
mode:
Diffstat (limited to 'filter.go')
-rw-r--r--filter.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/filter.go b/filter.go
index dec3cd8..d52b191 100644
--- a/filter.go
+++ b/filter.go
@@ -30,6 +30,8 @@ type Filter struct {
curCommitIn libfastimport.CmdCommit
curCommitOut map[string]fullcommit
+
+ OnCommit func()
}
func NewFilter(fromRef string, toPfx string) (*Filter, error) {
@@ -191,6 +193,10 @@ func (f *Filter) Run() error {
// TODO: synthesize ABS-tree submodule commits
f.curCommitIn = libfastimport.CmdCommit{}
f.curCommitOut = nil
+
+ if f.OnCommit != nil {
+ f.OnCommit()
+ }
case libfastimport.FileModify:
branchname := filename2branchname(string(cmdt.Path))
if branchname == "" {