From: Christian Couder <christian.couder@gmail.com>
To: ZheNing Hu <adlternative@gmail.com>
Cc: Git List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>,
Taylor Blau <me@ttaylorr.com>
Subject: Re: [QUESTION]: How to get uploading git objects via a git command in a pre-receive-hook
Date: Sat, 29 Jun 2024 18:29:41 +0200 [thread overview]
Message-ID: <CAP8UFD04cvb8k2ZkUYM20B5ym6e8q=KGL4PEDNF8_4x6G32SnQ@mail.gmail.com> (raw)
In-Reply-To: <CAOLTT8Sb4+_L7TrP8zZvvSqFu0MqbDanOhi6jfxfRLQKRimYzw@mail.gmail.com>
Hi ZheNing,
On Sat, Jun 29, 2024 at 4:42 PM ZheNing Hu <adlternative@gmail.com> wrote:
>
> Hi,
>
> I want to check the uploaded Git LFS objects in the pre-receive hook
> of the Git server. Assuming that the Git repository during the upload
> process is A.git, my current approach is to create an empty repository
> B.git and then use
> GIT_ALTERNATE_OBJECT_DIRECTORIES="A.git/objects/tmp_objdir-incoming-**"
> followed by executing git -C B.git cat-file --batch-check
> --batch-all-objects to obtain the objects being uploaded, then filter
> out the LFS objects. This process is very time-consuming, taking
> roughly more than 10 seconds. I wonder if there's a simpler method?
I wonder if it's possible to use `git verify-pack --verbose` on the
received packfile.
Best,
Christian.
next prev parent reply other threads:[~2024-06-29 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-29 14:42 [QUESTION]: How to get uploading git objects via a git command in a pre-receive-hook ZheNing Hu
2024-06-29 16:29 ` Christian Couder [this message]
2024-07-01 3:40 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP8UFD04cvb8k2ZkUYM20B5ym6e8q=KGL4PEDNF8_4x6G32SnQ@mail.gmail.com' \
--to=christian.couder@gmail.com \
--cc=adlternative@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).