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

Support with finding git objects

From
ATAyoub, Toufic <toufic.ayoub@philips.com>
Date
Mar 1, 2024, 19:06 UTC
Message-ID
<AMXP122MB01810E9B1195953D9AD0C8C48E5E2@AMXP122MB0181.EURP122.PROD.OUTLOOK.COM>
Hello everyone,
Hope this message finds you. I need your support regarding an issue my team is facing.
We have a code in our SW which shall display the date of the git commit. There is a path in the code that if it is executed on a platform where git is not installed, that this commit date shall be found by looking at:
1.      Reading from HEAD file the commit hash
2.      Searching for this commit hash under .git/objects
The problem we are facing is that sometimes, when the default master branch is updated with the newest commit, this commit will not be found locally, even after doing git pull and so on...
The commit can be found with:
1.      git log
2.      git cat-file -t <commit hash> -> it returns "commit"
3.      git reflog
but the strange thing is that we can neither find it under .git/objects/ nor under .git/objects/pack (although that is the newest commit and shall not be packed).
Can you please provide support by:
1.      telling me it that is an issue or is it expected?
2.      If that is expected, where shall we find this commit object to retrieve the commit message and date from it (without running git commands)?
3.      Or recommending me some other solution
I would appreciate that.
Best regards,

Toufic Ayoub Software Developer Hemodynamic Algorithms Hospital Patient Monitoring Philips

Philips Medizin Systeme Böblingen GmbH, Hewlett-Packard-Strasse 2, 71034 Boeblingen, Germany Email toufic.ayoub@philips.com |www.philips.com/healthcare Geschäftsführer: Dr. Dieter Haase (Sprecher), Günter Gegner, Sang Do Kim, Florian Kuhn Registergericht Stuttgart Reg.-Nr. HRB 245187, Sitz der Gesellschaft: Böblingen

Simply switch to printing double-sided and printing less.

________________________________ The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

Next: brian m. carlson
Message 1 of 2 in “Support with finding git objects”
  1. Ayoub, TouficMar 1, 2024
  2. brian m. carlsonMar 4, 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.