From 3a3cd3d15e65131673f84617e60ba6c92d911b44 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Fri, 3 Jan 2020 17:54:15 -0800 Subject: [PATCH] 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 Signed-off-by: Elijah Newren --- Documentation/git-filter-repo.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-filter-repo.txt b/Documentation/git-filter-repo.txt index 6e3c60a..6fb571d 100644 --- a/Documentation/git-filter-repo.txt +++ b/Documentation/git-filter-repo.txt @@ -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") ' --------------------------------------------------