News for hackers. Stuff that matters.
Re:How does apt render its fancy progress bar? by xyzzy_plugh on Wednesday October 13, 2021 @09:21AM (#28851748)
It makes more sense if you look at the whole option.

  ... --porcelain[=<version>]
The idea is to present the porcelain at a specific version. So really you should read it as "give me the porcelain (for v1)", e.g.:

  git status --porcelain=v1
If it was an environment variable instead it would be

  GIT_PORCELAIN_VERSION
Re:How does apt render its fancy progress bar? by geofft on Wednesday October 13, 2021 @10:45AM (#28852780)
But that's not what it does. Try it.

    $ git status
    On branch master

    No commits yet

    Untracked files:
      (use "git add <file>..." to include in what will be committed)
     foo

    nothing added to commit but untracked files present (use "git add" to track)
    $ git status --porcelain=v1
    ?? foo
    $ git status --porcelain=v2
    ? foo
    $ git status --porcelain=v3
    fatal: unsupported porcelain version 'v3'
No --porcelain option gives you the output in the format of the git status porcelain, either at the current version or at Git 1.x or whatever, i.e., "give me the porcelain" is the wrong reading of the option.

The correct reading is "I am implementing a porcelain myself, give me a format I can parse in order to do that."

Re:How does apt render its fancy progress bar? by avgcorrection on Wednesday October 13, 2021 @01:10PM (#28854759)
It’s funny how wrong this is.[1] No, `--porcelain` is machine output format, and the machine output format is (sensibly) versioned (you of course need to version such output—the output of `git status` writ large is not versioned afaik).

This [2] answer by VonC even quotes a mail where someone said that it was “[their] fault, to some degree.”

[1] Because it proves the opposite point.

[2] https://stackoverflow.com/a/6978402/1725151