git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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]
Previous: D. Ben KnobleNext: kristofferhaugsbakk@fastmail.com
Message 5 of 15 in “doc: patch-id: explain how to map efficiently”
  1. 0/3 doc: patch-id: explain how to map efficientlykristofferhaugsbakk@fastmail.com, Feb 7, 2026
  2. 1/3 doc: patch-id: emphasize multi-patch processingkristofferhaugsbakk@fastmail.com, Feb 7, 2026
  3. 2/3 doc: patch-id: add script examplekristofferhaugsbakk@fastmail.com, Feb 7, 2026
  4. D. Ben KnobleFeb 8, 2026
  5. Kristoffer HaugsbakkFeb 8, 2026
  6. 3/3 doc: patch-id: see also git-cherry(1)kristofferhaugsbakk@fastmail.com, Feb 7, 2026
  7. D. Ben KnobleFeb 8, 2026
  8. 0/3 doc: patch-id: explain how to map efficientlykristofferhaugsbakk@fastmail.com, Feb 14, 2026
  9. 1/3 doc: patch-id: emphasize multi-patch processingkristofferhaugsbakk@fastmail.com, Feb 14, 2026
  10. 2/3 doc: patch-id: add script examplekristofferhaugsbakk@fastmail.com, Feb 14, 2026
  11. 3/3 doc: patch-id: see also git-cherry(1)kristofferhaugsbakk@fastmail.com, Feb 14, 2026
  12. Ben KnobleFeb 14, 2026
  13. Junio C HamanoFeb 20, 2026
  14. Ben KnobleFeb 21, 2026
  15. Kristoffer HaugsbakkFeb 23, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.