diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-06-21 15:53:39 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-06-21 15:53:39 -0400 |
commit | 9622ab417325c6d60f5e9e95f4e3786bf6f0e2d5 (patch) | |
tree | ba96af39d47aad8e3e64e243a45dfb71c17e5b8e /b4/command.py | |
parent | c5cfd019feb50632f6f125e8ce36ceec807e7a27 (diff) | |
download | b4-9622ab417325c6d60f5e9e95f4e3786bf6f0e2d5.tar.gz |
Reimplement --guess-base
Based on some feedback, attempt to reimplement --guess-base by looking
at the file index hashes and using --find-object to locate when they
were last changed. We limit this using --since and --until, so that we
aren't trying to look through the entire history of the repo. For the
--until date, we take the date of the patch. For the --since date, we
take the timedelta using the number of days specified by
--guess-lookback (default is 14 days).
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/command.py')
-rw-r--r-- | b4/command.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/b4/command.py b/b4/command.py index 2d6994d..ebbb361 100644 --- a/b4/command.py +++ b/b4/command.py @@ -120,6 +120,10 @@ def cmd(): '"-P *globbing*" to match on commit subject)') sp_am.add_argument('-g', '--guess-base', dest='guessbase', action='store_true', default=False, help='Try to guess the base of the series (if not specified)') + sp_am.add_argument('-b', '--guess-branch', dest='guessbranch', default='HEAD', + help='When guessing base, use this branch instead of HEAD (use with -g)') + sp_am.add_argument('--guess-lookback', dest='guessdays', type=int, default=14, + help='When guessing base, go back this many days from the date of the patch') sp_am.add_argument('-3', '--prep-3way', dest='threeway', action='store_true', default=False, help='Prepare for a 3-way merge ' '(tries to ensure that all index blobs exist by making a fake commit range)') |