git-filter-repo.txt: fix example of editing blob contents

You can call bytes.replace() or re.sub(), but you can't call
bytes.sub().  Oops.  Fix the example in the documentation.

Reported-by: John Gietzen <john@gietzen.us>
Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
Elijah Newren 2020-01-03 17:54:15 -08:00
parent 8994b4e55d
commit 3a3cd3d15e

View File

@ -879,7 +879,7 @@ git filter-repo --blob-callback '
# Mark this blob for removal from all commits
blob.skip()
else:
blob.data = blob.data.sub(b"Hello", b"Goodbye")
blob.data = blob.data.replace(b"Hello", b"Goodbye")
'
--------------------------------------------------