rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
11.11k stars 549 forks source link

BFG is not finding text to be replaced #261

Closed gwerbin closed 6 years ago

gwerbin commented 6 years ago

I've "installed" BFG on Windows 7 by copying the jar to C:\tools, and I run it as follows.

echo badstring1 >> expressions.txt
echo badstring2 >> expressions.txt

java -jar C:\tools\bfg.jar --replace-text expressions.txt

and my output is always

BFG aborting: No refs to update - no dirty commits found??

I know the bad string is in there because a) I put it there, and b) when I check out old commits the string is still there. I'm also 100% sure I spelled it right, because I copied and pasted it out of the old commit.

Why isn't BFG finding the expression anywhere? How can I debug and/or fix this?

Edit: I am not able to reproduce this reliably on a small test repository. So this is really a "how can I debug BFG" question.

gwerbin commented 6 years ago

The Windows command line sucks. It was echo-ing the trailing space into the expressions.txt file.

rtyley commented 6 years ago

echo-ing the trailing space into the expressions.txt file

Wow! Good find!