Suggestion on git-push --porcelain

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

 



Hi,

this is regarding the recent patch series from Larry. (I thought
replying to any of the patch messages was appropriate, I couldn't find
a cover-letter, so I'm starting a new thread.)

Around June last year, a patch from Larry was made to add the
--porcelain option, so as to produce machine-readable output regarding
ref status.

The latest patch series goes a step further, and tries to change
output - for example, suppressing user-friendly advice and giving "To:
<destination>".

I think this is an untenable path - adding/suppressing output of
certain messages for porcelain writers, while trying to keep things
fixed enough for porcelain writers to depend on. We will also have to
keep and eye out for future patches from adding fprintfs to stdout and
stderr that may break porcelain scripts.

I believe a better approach would be to prefix messages intended for
porcelain writers. For example, a push session might look like this:

  $ git push --porcelain
  PORCELAIN To git://foo.com/git/myrepo.git
  PORCELAIN uptodate refs/heads/baz:refs/heads/baz 1234ab ba4321
  PORCELAIN nonff refs/heads/bar:refs/heads/bar 2345cd 3456de

This is an "positive" approach, in the sense that we don't remove
anything from the current output; we just add more printf("PORCELAIN")
lines to wherever is appropriate.

-- 
Cheers,
Ray Chuan
--
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]