Open scottpig opened 4 years ago
It may be that these jar files are no longer attached to references. Have you run gc to expire and prune blobs in repository first: git -c gc.reflogExpireUnreachable=0 -c gc.pruneExpire=now gc
java -jar bfg-1.13.0.jar --delete-files *.jar MyBigRepo.git
A major problem with this command is that in sh
/bash
the *.jar
expression expands to bfg-1.13.0.jar
and other *.jar files' filenames in your working directory due to the filename expansion feature if you don't quote it up.
It is actually running java -jar bfg-1.13.0.jar --delete-files bfg-1.13.0.jar _foo_.jar _bar_.jar MyBigRepo.git
Please check if this causes the issue.
I've actually run into the same problem, I'm not able to remove jar files regardless if I use the quotes or no java -jar bfg-1.13.2.jar --delete-files *.jar myRepo java -jar bfg-1.13.2.jar --delete-files '*.jar' myRepo Both commands end up reporting there's nothing to remove.
I've also tried to make the jar files be deleted along with other file types like this java -jar bfg-1.13.2.jar --delete-files '*.{exe,dll,jar}' myRepo The result in this case is the same, nothing at all is deleted. But if I remove the jar from the extensions, both exe and dll files are removed.
The only workaround I've been able to find is to remove the jar files alphabetically, executing the command for each starting letter, in which case the cleaning is done as expected. Example: java -jar bfg-1.13.2.jar --delete-files a*.jar myRepo
Same problem faced by me too. For other file types, this works fine, but ".jar" & ".war" don't seem to work at all.
@rtyley - Do you have any solutions for this? or is this a bug that is supposed to be fixed?
I've used bfg to successfully remove several files and folders from my repo, but it seems to have a blind spot for jar files.
I can see that there are deleted jar files in the repo when I run this command:
But when I attempt to remove them with this,
It can't find anything to remove:
The command works as expected for other file types. It seems that only jar files can't be cleaned. Am I missing something?