Re: Silent maintenance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 14, 2010 at 22:04, Jeff King <peff@xxxxxxxx> wrote:
> 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@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]