Re: [PATCH 2/3] doc: patch-id: add script example
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- Feb 8, 2026, 17:23 UTC
- Message-ID
- <80e4c515-025c-4b10-8405-4363f562f37a@app.fastmail.com>
- In-Reply-To
- <CALnO6CC997noiLAFmsy=4DCxc-d5CzaJew0Ri1x6CUtnL4kLXA@mail.gmail.com>
On Sun, Feb 8, 2026, at 03:34, D. Ben Knoble wrote:
Show 19 quoted lines
>>[snip] >> +#!/bin/sh >> + >> +upstream="$1" >> +branch="$2" >> +test -z "$branch" && branch=HEAD >> +limit="$3" >> +if test -n "$limit" >> +then >> + tail_opts="$limit".."$upstream" >> +else >> + since=$(git log --format=%aI "$upstream".."$branch" | tail -1) >> + tail_opts=--since="$since"' '"$upstream" >> +fi >> +for_branch=$(mktemp) >> +for_upstream=$(mktemp) > > Do we want to delete these when we are done (via trap or just cleanup > at the end)?
Sounds good. Maybe just at the end since this is a happy-path example script. ;) (not very robust and all that)
> >[snip]