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

RE: [External] Using Git as a Database

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Sep 23, 2024, 19:09 UTC
Message-ID
<00d001db0dec$1c8fa320$55aee960$@nexbridge.com>
In-Reply-To
<87r09aus7v.fsf@igel.home>
On September 23, 2024 2:43 PM, Andreas Schwab wrote:
Show 10 quoted lines
>On Sep 23 2024, email@mateuszwielgos.com wrote:
>
>> Thank you for your reply, Han. The problem that I have with ‘—allow-empty’ is
>that the resulting commit is not associated with any particular file. I tried ‘git commit
>—allow-empty myfile.txt’ but the file argument is effectively ignored. ‘git log
>myfile.txt’ does not show the empty commit.
>
>Since the git model is snapshot based, there is no way around that, apart from
>putting the reference in the commit message which you can search with git log --
>grep=myfile.txt.

One way around this is to inject a date/timestamp in the file. Be careful about conflicts If you every try to merge. This forces a signature change in the internal blob on commit.

I am not recommending this, just suggesting a way to force the issue.
Previous: Andreas SchwabNext: Sergey Organov
Message 5 of 6 in “Using Git as a Database”
  1. Mateusz WielgosSep 23, 2024
  2. 韩仰Sep 23, 2024
  3. email@mateuszwielgos.comSep 23, 2024
  4. Andreas SchwabSep 23, 2024
  5. rsbecker@nexbridge.comSep 23, 2024
  6. Sergey OrganovSep 25, 2024

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.