Subject: Re: [PATCH 7/9] notes: support an external command to display notes

From: "brian m. carlson" <[email-masked]>
Date: Thu, 21 May 2026 21:18:30 +0000

On 2026-05-21 at 04:12:41, Siddh Raman Pant wrote:
> On Thu, May 21 2026 at 06:42:00 +0530, brian m. carlson wrote:
> > > Assisted-by: Codex:gpt-5.5-xhigh-fast
> > 
> > Just a question here: was this written in whole or in part by Codex, or
> > was it just used as a reference to ask questions?  I ask because the
> > style of notes-external.c differs quite a bit from the style we use (for
> > one, the horizontal rule comments) and we have this in
> 
> AI tools typically don't generate comments in code like in this series,
> you can see by trying out for yourself. Each comment is hand-written by
> me. Sorry, I'll remove those lines in v2 after this discussion.

I've actually seen AI tools do things very similar to what you've
written.

> > SubmittingPatches:
> > 
> >     The Developer's Certificate of Origin requires contributors to certify
> >     that they know the origin of their contributions to the project and
> >     that they have the right to submit it under the project's license.
> >     It's not yet clear that this can be legally satisfied when submitting
> >     significant amount of content that has been generated by AI tools.
> > 
> >     [...]
> > 
> >     To avoid these issues, we will reject anything that looks AI
> >     generated, that sounds overly formal or bloated, that looks like AI
> >     slop, that looks good on the surface but makes no sense, or that
> >     senders don’t understand or cannot explain.
> 
> Please tell me why this change is a slop and doesn't make sense.

I didn't say this was slop and didn't make sense.  I quoted the portion
that says that we don't accept anything AI generated, including for
license reasons.  There's still very little clarity about whether AI
code is a derivative work of the training set or whether it can be
copyrightable at all, very especially on a worldwide basis.  We don't
want to end up with a legal or license problem that the DCO was intended
to solve.

> If I wanted to mislead here, I would not have used the "Assisted-by"
> trailer, which is now being used in kernel land:
> 
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-assisted-by

The kernel and Git do different things.  Linux generally allows AI and
we generally restrict its use quite heavily.  Linux tries to never break
dependent projects and we don't have that policy.

I appreciate the header being included and agree that it should be, but
it's important we ask questions about the provenance of the code when AI
is used because many people do not read SubmittingPatches (or
contributing documentation in general).

> > I'll note that it also has a lot of global variables, which are common
> > in the codebase but we're trying to move away from, 
> 
> Is there a new facility to store the config without a global variable?
> 
> If the issue is the number, I can make a housing struct if you want.

We'd typically use repo_config_get_string or such to fetch the
configuration these days.  If you don't want to fetch it multiple times,
we'd generally read all the config and put it in a struct that we'd
initialize with a function at a suitable time.

There's effort to avoid the global variables because they don't work
well in libraries and we want to allow libgit.a to be used more
generally.  In addition, Rust considers static mutable variables to be
unsafe, so as we add more Rust, we'll need to minimize the use of any
globals.

> I added comments to explain the code clearly as it's being followed,
> especially since this is a new feature and I wanted the intent to be
> clear.
> 
> If you could tell me which comments to remove, that would be great.

I don't think it's necessarily a problem to have the comments, but it is
uncommon in our codebase, which is what drew my attention.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA