-
Notifications
You must be signed in to change notification settings - Fork 569
Description
I'd like to protect the tip of a branch which has a slash in its name: feature/worker-prototype
.
When I run the BFG on the repository while protecting the branch, JGit doesn't like the "/" and throw an exception.
Exception in thread "main" java.lang.IllegalArgumentException: / is not permitted as a path 'segment' for this filesystem. Segment in question: 991564ae-feature/worker-prototype.csv. If you want to create a Path from a system dependent string then use fromString. If you want to create a child path use resolve instead of / to create the child path. It should be noted that the string after '/' must be a single segment but resolve accepts full strings. Examples: Path.fromString("c: \a\b") path / ("a/b/c", '/') path resolve "a\b\c" at scalax.file.FileSystem.checkSegmentForSeparators(FileSystem.scala:280) at scalax.file.defaultfs.DefaultPath.$div(DefaultPath.scala:44) at com.madgag.git.bfg.cleaner.CLIReporter$$anonfun$reportProtectedCommitsAndTheirDirt$1.apply(Reporter.scala:122) at com.madgag.git.bfg.cleaner.CLIReporter$$anonfun$reportProtectedCommitsAndTheirDirt$1.apply(Reporter.scala:108) at scala.collection.immutable.List.foreach(List.scala:318) at com.madgag.git.bfg.cleaner.CLIReporter.reportProtectedCommitsAndTheirDirt(Reporter.scala:107) at com.madgag.git.bfg.cleaner.CLIReporter.reportObjectProtection(Reporter.scala:80) at com.madgag.git.bfg.cleaner.RepoRewriter$.rewrite(RepoRewriter.scala:96) at com.madgag.git.bfg.cli.Main$$anonfun$1.apply(Main.scala:59) at com.madgag.git.bfg.cli.Main$$anonfun$1.apply(Main.scala:34) at scala.Option.map(Option.scala:145) at com.madgag.git.bfg.cli.Main$delayedInit$body.apply(Main.scala:33) at scala.Function0$class.apply$mcV$sp(Function0.scala:40) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) at scala.App$$anonfun$main$1.apply(App.scala:71) at scala.App$$anonfun$main$1.apply(App.scala:71) at scala.collection.immutable.List.foreach(List.scala:318) at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32) at scala.App$class.main(App.scala:71) at com.madgag.git.bfg.cli.Main$.main(Main.scala:27) at com.madgag.git.bfg.cli.Main.main(Main.scala)
Using BFG 1.11. Is there a fix / an easy workaround?