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

Re: Find the size of git push in pre-receive hook

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 7, 2011, 05:42 UTC
Message-ID
<7vboso4hf6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAFx4vfb-ssFXFEy9We7U+5+Fi+QsbcckNOEh1eXbMiqNfkU7jQ@mail.gmail.com>
Manigandan S <etc.mani@gmail.com> writes:
> Let me explain it in detail, if I was not clear.
Do not top-post on this list.

You said you wanted to restrict the size of a push, but what you are trying is to restrict the size of a repository after a push. If accepting this push will result in your repository go over the quota, the push will be denied. Otherwise the push will be accepted.

If that is the case, how much the resulting repository weighs is what you are trying to measure, not the size of _this_ push, i.e. the amount of additional data this push will introduce, and "du -s" for the repository inside pre-receive-hook is the way to do so.

Previous: Junio C HamanoNext: Jeff King
Message 4 of 5 in “Find the size of git push in pre-receive hook”
  1. manigandansNov 4, 2011
  2. Magnus BäckNov 4, 2011
  3. Junio C HamanoNov 4, 2011
  4. Junio C HamanoNov 7, 2011
  5. Jeff KingNov 8, 2011

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.