git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question regarding quarantine environments
@ 2018-08-02 17:58 Liam Decker
  2018-08-02 18:39 ` Jeff King
  0 siblings, 1 reply; 7+ messages in thread
From: Liam Decker @ 2018-08-02 17:58 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

Hi all,

I've been working on a git hook in golang recently. However, the library I
was using did not support a possible quarantine directory, which I would
use for my hook.

I have been trying to find out how git finds this incoming directory in the
objects folder, as their code simply assumed it resided in
.git/objects/<1st byte>/<last 19 bytes>
I read the documentation describing the git repository layout here [1] as
well as the objects documentation here [2] and the git hooks documentation
here [3] directed me to the receive-pack documentation here [4]
I have also tried googling, but this is a pretty specific question

The solution that I implemented was to check the objects directory for the
object, and if it was not there, to look for a quarantine directory and try
there. However, that feels fairly inefficient.
For the curious, the library and solution I attempted are both here [5]

If anyone could help direct me to find specifically how git looks for
objects in the repository, I would be very grateful

[1] https://git-scm.com/docs/gitrepository-layout
[2] https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
[3] https://git-scm.com/docs/githooks
[4] https://git-scm.com/docs/git-receive-pack
[5] https://github.com/src-d/go-git/pull/887

[-- Attachment #2: Type: text/html, Size: 1790 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-03 13:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 17:58 Question regarding quarantine environments Liam Decker
2018-08-02 18:39 ` Jeff King
2018-08-03  2:49   ` Jonathan Nieder
2018-08-03 12:56   ` Ævar Arnfjörð Bjarmason
2018-08-03 13:00     ` Jeff King
2018-08-03 13:25       ` Ævar Arnfjörð Bjarmason
2018-08-03 13:29         ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).