Git development
 help / color / mirror / Atom feed
From: Tim Wiederhake <twied@gmx.net>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org,
	Tim Wiederhake via GitGitGadget <gitgitgadget@gmail.com>
Subject: Re: [PATCH] gitk: add user-defined custom commands
Date: Fri, 07 Aug 2026 23:39:22 +0200	[thread overview]
Message-ID: <76636876b815ac4aaac77eb7b772e2e55234e11a.camel@gmx.net> (raw)
In-Reply-To: <82e59e71-5cb0-4a7f-9fc1-e66b367670f0@kdbg.org>

On Wed, 2026-08-05 at 08:59 +0200, Johannes Sixt wrote:
> Am 04.08.26 um 23:43 schrieb Tim Wiederhake via GitGitGadget:
> > Allow users to define up to three custom commands each for the
> > commit
> > list and the diff display area.  Commands are configured in a new
> > "Commands" tab in the preferences dialog, with a name and a command
> > template per slot.  Non-empty slots appear in the right-click
> > context
> > menu of the respective area.
> > 
> > Command templates support placeholder substitution (commit id,
> > commit
> > title, author name, author date, etc.) and are executed via "sh -c"
> > to allow for background execution by appending "&", and pipeing. 
> > If
> > a command terminates with exit code 42, its output is displayed;
> > otherwise only non-zero exit codes are reported.
> 
> Thanks, but this commit message is a bit lacking: it does not explain
> why it is a good idea to have this feature, what purpose it servers.
> For
> this reason, it is not possible to tell whether the design is sound
> and
> whether the implementation follows the design.
> 
> > Signed-off-by: Tim Wiederhake <twied@gmx.net>
> > Assisted-by: Claude Opus 4.6
> Thank you for being explicit about AI assistance. Note that this code
> is
> going to be downstreamed to the Git project. Therefore, their AI
> rules[*] must be obeyed.
> 
> Equally important is that I want to be sure that you have checked and
> carefully reviewed and understood everything the AI produced. I am
> not
> going to look at the code until there is sufficient insurance that
> you
> did. (Blatantly put, I don't want to review code produced by someone
> else with AI.)
> 
> [*] https://git-scm.com/docs/SubmittingPatches#ai
> 
> -- Hannes

Hi Hannes,

thanks for the feedback!

I agree that the commit message is a bit light on the "why" side of
things. Personally, I wrote this patch because i wanted gitk to have
the ability to let me select a line in any commit, rebase to that
commit, start an editor with that file and line selected, and after
quitting the editor amend the commit and continue the rebase. An "edit
this line at that point in history" function of sorts, because I tend
to spot typos only twenty commits later.

If I had proposed a patch to this effect, I am sure it would have been
nack'd as too niche, wrong tool, or any other reason. But having the
possibility to define custom commands allows users to adapt gitk to
their workflow instead of the other way round. I am very open to
suggestions on how to put this in the commit message without resorting
to (contrieved) examples.

Regarding the use about AI: I used Claude to produce the initial
implementation. I do not write Tcl, and frankly, this patch has not
changed that. I have reworked the code - using Claude - until it was
effectively the Tcl version of code I would have written myself in
Python or C or any other language that I actually understand. Does that
pass the bar?

Regards,
Tim

  reply	other threads:[~2026-08-07 21:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 21:43 [PATCH] gitk: add user-defined custom commands Tim Wiederhake via GitGitGadget
2026-08-05  6:59 ` Johannes Sixt
2026-08-07 21:39   ` Tim Wiederhake [this message]
2026-08-09  8:33     ` Johannes Sixt
2026-08-07 22:16 ` Junio C Hamano
2026-08-09  8:47   ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76636876b815ac4aaac77eb7b772e2e55234e11a.camel@gmx.net \
    --to=twied@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=j6t@kdbg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox