Skip to content

Commit 3a3cd3d

Browse files
committed
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 <[email protected]> Signed-off-by: Elijah Newren <[email protected]>
1 parent 8994b4e commit 3a3cd3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/git-filter-repo.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ git filter-repo --blob-callback '
879879
# Mark this blob for removal from all commits
880880
blob.skip()
881881
else:
882-
blob.data = blob.data.sub(b"Hello", b"Goodbye")
882+
blob.data = blob.data.replace(b"Hello", b"Goodbye")
883883
'
884884
--------------------------------------------------
885885

0 commit comments

Comments
 (0)