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

Re: [PATCH 1/1] Extract only the message body from git commit.

From
Hardik Kumar <hardikxk@gmail.com>
Date
Jul 22, 2026, 13:42 UTC
Message-ID
<DK556S085CN5.25WTVX3W1DSUZ@gmail.com>
In-Reply-To
<DK53I00U9FJS.2MUNWC5000IZ5@gmail.com>
> nit: I think this can be written more clearly. Let's use present tense
> and state things affirmatively:
Sure, I will update this in a later commit.
Show 5 quoted lines
> Reading the code, this doesn't seem to do what the log says it does.
> Testing it against what it did before this patch:
> We can see that the previous output only shows the commit log, title
> + body. There were no SHAs, tree, etc., the opposite of what this
> patch's log claimed.

I see, I was comparing this to the how git stores your commits in .git/objects. My assumption was the function would take an object from there and (wanting to extract just the body) was taking the entire object as is and not stripping out the subject.

> What this patch actually does is drop the commit subject.

Yes, since I suppose all the other places in the file where this method is being used don't require the subject line.

> Either way, this patch does not address the '# fixme' correctly.
>
> Before continuing, I think we should try to understand what the '# fixme'
> meant in the first place.

My assumption was that the function that I made changes to was solely responsible for sending back only the message stripping out subject and metadata related to the commit object.

Moving forward I suppose the one suggestion would be changing the name of the variable `foundTitle` to `foundSubject` instead since that might result in less ambuiguity in what the function is doing (and the fixme). Although I dont't think if that really makes any difference.

But yes the #fixme does seem very vague now. Not sure if this is worth it.

Regards, Hardik.

Previous: Pablo SabaterNext: Junio C Hamano
Message 4 of 7 in “Extract only the message log body from git commit.”
  1. 0/1 Extract only the message log body from git commit.hardikxk, Jul 22, 2026
  2. 1/1 Extract only the message body from git commit.hardikxk, Jul 22, 2026
  3. Pablo SabaterJul 22, 2026
  4. Hardik KumarJul 22, 2026
  5. Junio C HamanoJul 22, 2026
  6. Hardik KumarJul 23, 2026
  7. Pablo SabaterJul 22, 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.