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

Re: Add configuration options for some commonly used command-line options

From
Jeff King <peff@peff.net>
Date
Mar 20, 2017, 19:14 UTC
Message-ID
<20170320191403.wn65gyoime2lrubu@sigill.intra.peff.net>
In-Reply-To
<xmqq7f3jwzdo.fsf@gitster.mtv.corp.google.com>
On Mon, Mar 20, 2017 at 11:56:35AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> One thing we may want to consider is why we have to even worry about
> scripts getting broken.  It is because people script around
> Porcelain, and that is because we have been too eager to improve
> Porcelain while neglecting plumbing for too long, to the point that
> some things are only doable with Porcelain (or doing the same with
> plumbing while possible are made too cumbersome).  I find it quite
> disturbing that nobody brought that up as an issue that needs to be
> addressed in this entire thread.

I think there is a chicken-and-egg problem there. The plumbing _wasn't_ there, so people started using porcelain in their scripts, which made us hesitant to change it. That fact that it doesn't break makes script writers think it's OK. And now we're stuck with things like "log" and "diff" as pseudo-plumbing, unless we want to take a strong stand and say "you're doing it wrong, even though there was no other way to do it until now".

Unless you want to follow the usual deprecation schedule by introducing new plumbing commands to fill in the gaps, waiting, and then proceeding to change the porcelain. But I think that's isomorphic with the other solutions. I.e., out of:

  1. git rev-list
  2. GIT_PLUMBING=1 git log
  3. git command log

They are all doing the exact same thing: running a log-like command without any config or cross-version changes. It's just a matter of syntax. One of the nice things about (2) and (3) is that you don't have to invent a new plumbing-ish name for each command.

-Peff
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 10 of 19 in “Add configuration options for some commonly used command-line options (Was: [RFH] GSoC 2015 application)”
  1. Duy NguyenMar 19, 2017
  2. Matthieu MoyMar 19, 2017
  3. brian m. carlsonMar 19, 2017
  4. Ævar Arnfjörð BjarmasonMar 19, 2017
  5. Duy NguyenMar 20, 2017
  6. Brandon WilliamsMar 20, 2017
  7. Jeff KingMar 20, 2017
  8. Brandon McCaigMar 31, 2017
  9. Junio C HamanoMar 20, 2017
  10. Jeff KingMar 20, 2017
  11. Ævar Arnfjörð BjarmasonMar 20, 2017
  12. parse-options: add facility to make options configurableÆvar Arnfjörð Bjarmason, Mar 24, 2017
  13. Ævar Arnfjörð BjarmasonMar 25, 2017
  14. Jeff KingMar 25, 2017
  15. Ævar Arnfjörð BjarmasonMar 25, 2017
  16. Jeff KingMar 28, 2017
  17. WIP configurable options facilityÆvar Arnfjörð Bjarmason, Mar 28, 2017
  18. brian m. carlsonMar 25, 2017
  19. Duy NguyenMar 20, 2017

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.