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

Re: Silent maintenance

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 15, 2010, 00:21 UTC
Message-ID
<AANLkTim1HL_WH_ShxNYXmsSnbMNq7=C7oj46qav2OQe1@mail.gmail.com>
In-Reply-To
<20100814220410.GA16592@coredump.intra.peff.net>
On Sat, Aug 14, 2010 at 22:04, Jeff King <peff@peff.net> wrote:
Show 30 quoted lines
> On Sat, Aug 14, 2010 at 09:41:44PM +0000, Ævar Arnfjörð Bjarmason wrote:
>
>> On Sat, Aug 14, 2010 at 21:05, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> > Enrico Weigelt wrote:
>> >
>> >> are there some flags to make the maintenance commands like
>> >> git-repack and git-gc silent, so they only output errors ?
>> >
>> > Does --quiet work?  If not, patches would be welcome.
>>
>> I intentionally neglected to mention that. That inevitably leads to
>> cases where something fails, but you didn't record the output.
>
> I'm confused. Isn't the point of quiet to silence all of the cruft, and
> leave only actual errors?
>
>  $ git gc
>  Counting objects: 128, done.
>  Compressing objects: 100% (49/49), done.
>  Writing objects: 100% (128/128), done.
>  Total 128 (delta 71), reused 121 (delta 68)
>
>  $ git gc --quiet
>
>  $ chmod -w .git/objects/pack
>  $ git gc --quiet
>  fatal: Unable to create temporary file: Permission denied
>  error: failed to run repack
>
> Isn't that what the OP wanted?

Maybe, personally I prefer to get all or nothing. If you specify --quiet you'll only get errors, so it doesn't give you much context. But if you use cronjob(1) you can see at a glance the normal output of all the successfully executed commands that led up to your failure.

E.g. the output of a successful "cherry-pick" right before a failing merge can be really helpful to see the state of the failing program.

Previous: Jeff KingNext: Enrico Weigelt
Message 8 of 9 in “Silent maintenance”
  1. Enrico WeigeltAug 14, 2010
  2. Ævar Arnfjörð BjarmasonAug 14, 2010
  3. Valeo de VriesAug 14, 2010
  4. Ævar Arnfjörð BjarmasonAug 14, 2010
  5. Jonathan NiederAug 14, 2010
  6. Ævar Arnfjörð BjarmasonAug 14, 2010
  7. Jeff KingAug 14, 2010
  8. Ævar Arnfjörð BjarmasonAug 15, 2010
  9. Enrico WeigeltAug 15, 2010

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.