summaryrefslogtreecommitdiff
path: root/fi-prune-empty2/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'fi-prune-empty2/main.go')
-rw-r--r--fi-prune-empty2/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/fi-prune-empty2/main.go b/fi-prune-empty2/main.go
index 0278a66..dd2594d 100644
--- a/fi-prune-empty2/main.go
+++ b/fi-prune-empty2/main.go
@@ -31,6 +31,8 @@ type Args struct {
help bool
srcdir string
+ allowExcludedParents bool
+
pruneEmpty PruneArg
pruneFastForward PruneArg
existingReplace ExistingReplaceArg
@@ -44,6 +46,7 @@ func main() {
argparser.BoolVarP(&args.help, "help", "h", false, "Show this message")
argparser.StringVar(&args.srcdir, "srcdir", ".", "Path to the source git repository; this is required for '--prune-empty=auto' and '--prune-fastforward=auto'")
+ argparser.BoolVar(&args.allowExcludedParents, "allow-excluded-parents", false, "Whether to allow excluded parents to be referenced by commit-hash rather than by mark")
args.pruneEmpty = PruneAuto
argparser.Var(&args.pruneEmpty, "prune-empty", "Whether to prune empty commits; 'auto' means only prune commits which have become empty but are not empty in the --srcdir repo with GIT_NO_REPLACE_OBJECTS")
@@ -86,7 +89,7 @@ func main() {
frontend := libfastimport.NewFrontend(os.Stdin, os.Stdin, nil)
backend := libfastimport.NewBackend(os.Stdout, os.Stdout, nil)
- filter := NewHandler(backend, NewDriver(args, backend))
+ filter := NewHandler(backend, NewDriver(args, backend), args.allowExcludedParents)
if err := fiutil.RunHandler(frontend, filter); err != nil {
fmt.Fprintf(os.Stderr, "%s: error: %v\n", os.Args[0], err)
os.Exit(1)