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

Re: [PATCH] Implement rebase -q to fix pull --rebase -q

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 3, 2008, 08:26 UTC
Message-ID
<7vr64pfyvg.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<4ac8254d0812030007w3217f6eei3d364ce2272930c3@mail.gmail.com>
"Tuncer Ayaz" <tuncer.ayaz@gmail.com> writes:
Show 10 quoted lines
> I mainly use -q in automation where I only want output if something
> goes wrong. Just like good old cp or mv do.
> Do you think this is the wrong way to go?
>
>> How are you dealing with messages from the actual replaying of each local
>> commit on top of what is fetched?  In order to be able to tell where you
>> are when one of them fail in conflicts, you cannot stay silent while doing
>> so.
>
> Fair point.
Ahh, ok, if this is for cron jobs, then it is understandable that:
 (1) You may want a successful "git pull" or "git pull --rebase" to be
     absolutely silent about what it did; and
 (2) A failed "git pull" and "git pull --rebase" that produces information
     other than the fact it failed would not help you, the receiver of a
     cron job report, very much.  You would go to the repository when it
     fails, reset the mess away, and then do the pull or pull-rebase
     yourself manually anyway.

If that is the motivation behind the series, I think you would really want to squelch output from "format-patch | am -3" pipeline.

Another thing to consider is that, unlike simple single-operation commands such as "mv" or "cp" you mentioned, what "git pull" does is much more involved and has many different failure modes, so you cannot compare them fairly. Simple commands can have a single "quiet" level, but I have a feeling that there is a difference between "quiet mode" I expect when I am running "git pull" interactively and "quiet mode" I would want when I would be driving "git pull" from a cron job. IOW, you probably would want something like "--really-quiet" mode.

I would write such a cron-job script to capture the log and send it only upon failure from the underlying command if I were doing this myself, though.

Previous: Tuncer AyazNext: Tuncer Ayaz
Message 5 of 8 in “Implement rebase -q to fix pull --rebase -q”
  1. Implement rebase -q to fix pull --rebase -qTuncer Ayaz, Dec 3, 2008
  2. Tuncer AyazDec 3, 2008
  3. Junio C HamanoDec 3, 2008
  4. Tuncer AyazDec 3, 2008
  5. Junio C HamanoDec 3, 2008
  6. Tuncer AyazDec 3, 2008
  7. Junio C HamanoDec 3, 2008
  8. Tuncer AyazDec 3, 2008

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.