Commit Graph

6 Commits (main)

Author SHA1 Message Date
Elijah Newren dc012d277b bfg-ish: add some sanity checks on the specified repo
Signed-off-by: Elijah Newren <newren@gmail.com>
3 years ago
林博仁(Buo-ren Lin) e732141363 Fix relative path compatibility for --replace-text and bfg_args.repo
Users could specify relative paths on the command line, and then also
provide a directory other than '.' for the repo.  Since we did an
unconditional os.chdir() to move into the repo, that would invalidate
the original relative paths.  Fix that by changing the relative paths
into absolute paths.

Signed-off-by: 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>
[en: tweaked commit message to explain the problem]
Signed-off-by: Elijah Newren <newren@gmail.com>
3 years ago
Elijah Newren b8ebda97dd contrib: avoid applying --replace-text to binary files in bfg-ish
Signed-off-by: Elijah Newren <newren@gmail.com>
4 years ago
Elijah Newren dab9386c47 contrib: update bfg-ish and filter-lamely with windows workaround
In commit f2729153 (filter-repo: workaround Windows' insistence that cwd
not be a bytestring, 2019-10-19), filter-repo was made to use a special
SubprocessWrapper class instead of the normal subprocess calls, due to
what appears to be in bugs in the python implementation on Windows not
working with arguments being bytestrings.  Add the same workarounds to
bfg-ish and filter-lamely.

Signed-off-by: Elijah Newren <newren@gmail.com>
4 years ago
Elijah Newren 320c85f941 filter-repo: improve support for partial history rewrites
Partial history rewrites were possible before with the (previously
hidden) --refs flag, but the defaults were wrong.  That could be worked
around with the --source or --target flags, but that disabled --no-data
for fast-export and thus slowed things down, and also would require
overridding --replace-refs.  And the defaults for --source and --target
may diverge further from what is wanted/needed for partial history
rewrites in the future.

So, add --partial as a first-class supported option with scary
documentation about how it permits mixing new and old history.  Make
--refs imply that flag.  Make the behavioral similarities (in regards to
which steps are skipped) between --source, --target, and --partial more
clear.  Add relevant documentation to round it out.

Signed-off-by: Elijah Newren <newren@gmail.com>
5 years ago
Elijah Newren 622afca813 contrib: new filter-repo demo named bfg-ish
This implements most of BFG Repo Cleaner, with several additional
features and bugfixes included.

Signed-off-by: Elijah Newren <newren@gmail.com>
5 years ago