All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Marc Branchaud <marcnarc@xiplink.com>
Cc: Larry D'Anna <larry@elder-gods.org>, git@vger.kernel.org
Subject: Re: [PATCH] add --porcelain option to git-push
Date: Tue, 23 Jun 2009 08:50:13 -0700	[thread overview]
Message-ID: <7v4ou79cga.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4A40EF9C.7000706@xiplink.com> (Marc Branchaud's message of "Tue\, 23 Jun 2009 11\:07\:08 -0400")

Marc Branchaud <marcnarc@xiplink.com> writes:

> Shouldn't this option be named "--plumbing" since it's making 'git push'
> act like plumbing?  Actually, neither name seems intuitively descriptive
> to me...

Perhaps.  But asking for output format designed for Porcelain
implementions to read with --porcelain option has precedence.

> Why not teach 'git push' to change its output format if it's writing to a pipe?

That is ugly.  Besides, "writing to a pipe" would not be a right criteria,
if you want to do

          git push >log
          if grep blah log
          then
                do blah thing
          fi
          if grep baa log
          then
                do baa thing, too
          fi

When you make a program behave differently depending on where your stdout
goes, typically you see if it is going to the terminal (e.g. isatty(3)),
but even then you would need an explicit override from the command line
when stdout is a tty and you do not want "for humans" frills (e.g. color),
and when stdout is not a tty and you do want such frills.

  parent reply	other threads:[~2009-06-23 15:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 21:28 I'd like to be able to know what git-push will do Larry D'Anna
2009-06-22 21:40 ` Jeff King
2009-06-23  1:10   ` [PATCH] add --porcelain option to git-push Larry D'Anna
2009-06-23 15:07     ` Marc Branchaud
2009-06-23 15:38       ` [PATCH] add --plumbing " Larry D'Anna
2009-06-23 15:50       ` Junio C Hamano [this message]
2009-06-23 17:09         ` [PATCH] add --porcelain " Marc Branchaud
2009-06-23 18:41       ` Markus Heidelberg
2009-06-23 22:38     ` Constantine Plotnikov
2009-06-24  0:26       ` Larry D'Anna
2009-06-25 19:07     ` Junio C Hamano
2009-06-25 19:30       ` Larry D'Anna
2009-06-27  0:23       ` [PATCH] add --summary " Larry D'Anna

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=7v4ou79cga.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=larry@elder-gods.org \
    --cc=marcnarc@xiplink.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.