{"thread":{"id":"65821","subject":"Assisted-by tag","startedAt":"2026-06-16T19:25:56Z","lastAt":"2026-06-16T19:53:25Z","messageCount":2,"participants":["Marius Spix","Kristoffer Haugsbakk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"545679","messageId":"20260616212553.31ddea83@rockhopper","threadId":"65821","inReplyTo":null,"subject":"Assisted-by tag","fromName":"Marius Spix","fromEmail":"marius.spix@web.de","sentAt":"2026-06-16T19:25:53Z","receivedAt":"2026-06-16T19:25:56Z","isPatch":false,"body":"Hi there,\n\nas the Linux kernel requires the new Assisted-by tag for AI-assisted\ncommits, I was researching how git handles such tags. Thereby I\nobserved the following behaviour:\n\ngit commit --signoff\n* adds an empty line before the Signed-off-by tag\n* ignores the Signed-off-by tag by checking for an empty commit message\n\ngit commit --trailer \"\\nAssisted-by: OpenAI\"\n* does not add an empty line (the \"\\n\" is not converted to a newline)\n* does not ignore the tag by checking for empty commit message\n\nSince there will be more and more AI-assisted commits in projects like\nthe Linux kernel in the future, this should be taken in account.\n\nWhen merging or squashing commits, that tag should also be\nautomatically applied to the new commit message to make it clear that\nthe commit is tainted by AI.\n\nYour opinion?\n\nBest regards\n\nMarius\n"},{"id":"545680","messageId":"9ef3ac51-9f98-45bb-9815-6fbc5636e15a@app.fastmail.com","threadId":"65821","inReplyTo":"20260616212553.31ddea83@rockhopper","subject":"Re: Assisted-by tag","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-06-16T19:53:03Z","receivedAt":"2026-06-16T19:53:25Z","isPatch":false,"body":"On Tue, Jun 16, 2026, at 21:25, Marius Spix wrote:\n> as the Linux kernel requires the new Assisted-by tag for AI-assisted\n> commits, I was researching how git handles such tags. Thereby I\n> observed the following behaviour:\n>\n> git commit --signoff\n> * adds an empty line before the Signed-off-by tag\n> * ignores the Signed-off-by tag by checking for an empty commit message\n\nThat a bare message which is just `Signed-off-by` is considered an\n“empty” commit message seems like a historical quirk. It checks\nspecifically for that tag/trailer.\n\n>\n> git commit --trailer \"\\nAssisted-by: OpenAI\"\n> * does not add an empty line (the \"\\n\" is not converted to a newline)\n> * does not ignore the tag by checking for empty commit message\n\nThis is just a regular trailer. I don’t know why you have a `\\n`.\n\n    git commit --trailer \"Assisted-by: OpenAI\"\n\nAny number of these will populate the trailer block.\n\n> Since there will be more and more AI-assisted commits in projects like\n> the Linux kernel in the future, this should be taken in account.\n>\n> When merging or squashing commits, that tag should also be\n> automatically applied to the new commit message to make it clear that\n> the commit is tainted by AI.\n\nThat `Signed-off-by` has dedicated options and logic is historical\nbaggage at this point.\n\nA 2013 [patch] to add `git commit --fixes` because the Linux Kernel uses\n`Fixes` was rejected because the Git project considers tags/trailers\nproject-specific. Instead git-interpret-trailers(1) was born which\neventually provided the code base for `git commit --trailer` and similar\noptions.\n\n  [patch]: https://lore.kernel.org/all/20131027013402.GA7146@leaf/\n\nHandling how trailers are added is also deemed project-specific. There\nare only the configurations and options that git-interpret-trailers(1)\nprovides. And handling that commits are rewritten (combined and so on)\nin such a way that trailer-taint sticks is beyond any discussion I’ve\nseen on the subject.\n"}]}