summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-25Release 0.4.3 as final release in 0.4.y seriesv0.4.3stable-0.4.yKonstantin Ryabitsev
If someone wants to stay on 0.4.y series, let them grab it from pip. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-15Document changes to -PKonstantin Ryabitsev
Add changes to -P,--cherry-pick to the man page. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-15Expand use of --cherry-pick ("this", globbing)Konstantin Ryabitsev
In addition to numerical ranges, -P is now also able to do: - "-P _" to grab just the msgid used with "b4 am" - "-P *glob*" to filter by commit message subject Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-13Don't fail when a message uses a weird charsetKonstantin Ryabitsev
Found via auto-testing in: https://lore.kernel.org/linux-sgx/20200421215316.56503-13-jarkko.sakkinen@linux.intel.com/raw This is wrong on many levels: Content-Type: text/plain; charset=a Assume utf-8 when something like this happens and don't fail. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-13Fix crasher for incomplete threadsKonstantin Ryabitsev
Don't crash if the message in the References: is not available in the thread. Reported-by: Bjorn Helgaas <helgaas@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-13Up version to 0.4.3-devKonstantin Ryabitsev
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-12Prep for 0.4.2 with quickfixes for tyv0.4.2Konstantin Ryabitsev
- fix auto-thankanator logic that started matching everything - fall back to remote-only branch tracking Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-11Make sure to always use the full refnameKonstantin Ryabitsev
Git will try to helpfully disambiguate, but we just need consistency, so always ask for a full refname. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-11Deal with cases when [branch] is not specifiedKonstantin Ryabitsev
Not all local branches are going to have matching [branch] entries -- sometimes there is only a [remote]. Deal with both cases. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-11Increment version to 0.4.2-devKonstantin Ryabitsev
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-11Do not match everything in -a, only -sKonstantin Ryabitsev
While trying to be more permissive with messages selected manually with -s, we broke auto-thankanator by making it match everything. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-08Up version to 0.4.1 for releasev0.4.1Konstantin Ryabitsev
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-08Build manpage for 0.4.1 releaseKonstantin Ryabitsev
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-08Update documentation for am -P, ty -s/-d changesKonstantin Ryabitsev
- we are now using ranges for ty -s/-d - add am -P documentation for cherry-picking subsets of patches Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-07Add -P,--cherry-pick option to "b4 am"Konstantin Ryabitsev
This lets someone select a subset of patches in a series, e.g.: b4 am -P 1-3,5,7- [msgid] Suggested-by: Heiko Stübner <heiko@sntech.de> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-07Switch ty -s and -d to allow friendly rangesKonstantin Ryabitsev
Instead of insisting that people put in specific numbers, allow them to specify ranges, such as: b4 ty -s 1-3,5,7- Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-07Match applied patches using message-idKonstantin Ryabitsev
Track message-id for each patch and try to apply to the Link: or Message-Id: trailers, if we find them. Suggested-by: Jason Gunthorpe <jgg@ziepe.ca> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-07Improve remote/branch mappingKonstantin Ryabitsev
Our mapping of local to remote branches was very naive and failed when remote names didn't exactly match heads. Improve it using suggestions from Will Deacon. Link: https://linux.kernel.org/g/tools/message/140 Reported-by: Will Deacon <will@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-07Remove QP encoding when getting fromnameKonstantin Ryabitsev
Make sure we get the clean header value when we store fromname. Link: https://linux.kernel.org/g/tools/message/142 Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-27Parse message into common componentsKonstantin Ryabitsev
Parse body parts into usual chunks (backport from master into stable-0.4.y) Do a better job parsing a patch message into usual body parts: - git headers (From:, Subject:, Date:) - commit message - trailers - basement (under the ---\n) - signature (under the --\s\n) This allows us to create better reply quotes. Reported-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-24Add example files to manifestv0.4.0Konstantin Ryabitsev
We want to make those available to pip installs. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-24Prepare for 0.4.0 releaseKonstantin Ryabitsev
It's time to graduate to 0.4.0 with these features. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-24Use "local tree" instead of "undefined"Konstantin Ryabitsev
This is our fail-through treename, so if we weren't able to figure out anything about it, then call it a "local tree" instead of "undefined". Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-22Properly deal with merge to non-current branchKonstantin Ryabitsev
When running rev-list, be mindful of which branch we need to operate on, otherwise it always runs on the current branch. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-20Use the cover for backfills when availableKonstantin Ryabitsev
When we have a cover letter, use that for backfill purposes, instead of finding the first non-None patch. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-20Support file delete patches and binary patchesKonstantin Ryabitsev
Git's file delete patches don't contain hunks, so we weren't properly processing them for attestation (and for b4 am). While fixing that, I also added attestation support for binary patches. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-17Expand templates with ${branch} and ${treename}Konstantin Ryabitsev
You can use ${branch} and ${treename} (if you set b4.thanks-treename). See .example files on some hints on how to use them. Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Changes to b4 ty based on developer feedbackKonstantin Ryabitsev
- Properly expand ~ and env vars like $HOME in template paths - Allow partial matching of series (with a warning) - Allow using remote branches with -b - Always fall back to subject matching for patches - Tweak to the summary output Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Properly deal with diffs that delete all linesKonstantin Ryabitsev
We weren't properly handling special diffs that deleted entire file contents (e.g. by deleting a file). Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Don't break on @@ -N,N +N @@ diff linesKonstantin Ryabitsev
When a commit is a new file with only one line, the diff output is different, so handle it without breaking. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Keep track of how many messages we createKonstantin Ryabitsev
Don't tell us to run git send-email when there's nothing to send. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Get info from gecos if we don't have user.nameKonstantin Ryabitsev
Git gets user.name from gecos if it's not specified in user.name, so let's do the same thing. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Be more useful during non-auto matchingKonstantin Ryabitsev
Instead of bailing out when we can't find a match for a series, skip it and move to the next one in the queue. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Switch to using patchwork-compatible hashesKonstantin Ryabitsev
Using strict attestation hashes for auto-thankinator is problematic, because "git am" uses a certain degree of fuzzing, so when we try to find applied patches by running "git diff" on actual commits, line counts may not be bit-for-bit identical. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-10Document b4 ty and add template examplesKonstantin Ryabitsev
Still a bit slim on documentation, but this is better than nothing. I need to write a better README file that will introduce maintainers to most useful functionality aspects of b4. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-10Use ~/.signature if it exists for tpt defaultsKonstantin Ryabitsev
If we find a ~/.signature, then use it for making a default ${signature} value, otherwise make a "Name <email>" boring one. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-10Add summaries to default templatesKonstantin Ryabitsev
They are much more useful if b4.thanks-commit-url-mask is set, but even without them this will list all subjects and corresponding commit IDs. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-10Don't use git patch-id for patch trackingKonstantin Ryabitsev
Looks like some of the patches sent from quilt (at least from Andrew Morton) are not properly parsed by git patch-id, so use our own patch hashing routines, even if this means we're likely going to miss some of the patches that were edited by maintainers. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-09Add b4 ty that aims to simplify common feedbackKonstantin Ryabitsev
New experimental feature that aims to simplify a very common "thanks, applied" kind of feedback often expected of maintainers. Still needs documentation to explain its usage. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-08Add pr subcommand to the manpageKonstantin Ryabitsev
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-07Use trailers from old revisions if no changesKonstantin Ryabitsev
If we have multiple versions of patch series in the same thread and someone adds a follow-up trailer to a patch in v1, but doesn't do it for the same *exact* patch in v2, then we carry over that trailer from v1 to v2. We use attestation hashes for this purpose, so all patch/metadata must be exact in order for the trailer to be reused. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-07Better deal with urlescaped msgidsKonstantin Ryabitsev
Message-IDs that are using escaped characters are breaking our lookup due to the refactoring that was necessary for backfilling. This should help deal with such cases. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-06Backfill missing threads from other lore listsKonstantin Ryabitsev
When we query by message-id, sometimes the list that is returned is not the best one to use, because it is lossy. Look at other addresses in the to/cc fields, and if we find another list address that is also backed up on lore.kernel.org, then attempt to backfill missing messages from those lists, until the entire series is complete. This should become obsolete in the future once public-inbox gains ability to return a thread sourced from multiple lists/feeds, but this should be a useful stop-gap measure to help developers in the meantime. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-03Recognize when reroll info is only in 1st patchKonstantin Ryabitsev
Sometimes this happens: [PATCH v2 1/N] [PATCH 2/N] [PATCH 3/N] [PATCH 4/N] Properly recognize such cases and version all patches threaded under the first one as v2. Reported-by: Amit Kucheria <amit.kucheria@gmail.com> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-03Auto-discover base commit when none providedKonstantin Ryabitsev
When a pull request is generated using git-request-pull, the base commit is specified in the body of the message. However, in other cases this information can be missing, so we can use git merge-base to find out what it is after we've performed a "git fetch". Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-03-30Clean up stray debug dataKonstantin Ryabitsev
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-03-30Escape From lines in git-format-patch outputKonstantin Ryabitsev
We need a valid mboxo format for python, so make sure to escape all From lines not actually starting a new message, per mboxo requirements. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-03-30Decode headers into utf-8 from QPKonstantin Ryabitsev
Since we aren't planning on sending any of this as actual emails, convert EVERYTHING into utf-8 before writing messages, including QP-escaped 7-bit headers. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-03-30Add attestation checks for b4 prKonstantin Ryabitsev
We now use similar subroutines for checking signatures on FETCH_HEAD as we do for patch attestation, making it a convenient operation during the fetch stage: $ b4 pr 202003292114.2252CAEF7@keescook Looking up https://lore.kernel.org/r/202003292114.2252CAEF7@keescook Grabbing thread from lore.kernel.org Looking at: [GIT PULL] seccomp updates for v5.7-rc1 Fetching https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/seccomp-v5.7-rc1 --- [✓] Attestation-by: Kees Cook <keescook@chromium.org> (pgp: 8972F4DFDC6DC026) --- Successfully fetched into FETCH_HEAD Hopefully, I didn't introduce too many bugs into patch attestation, since I had to rewrite the backend a bit to work for both native git operations and patch attestation calls. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-03-30Add current rev to version when running from gitKonstantin Ryabitsev
For ease of tracking version information for folks running things straight out of the checkout, add current git revision to the version info string. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>