threads / patch / 35027

patchRelNotes/1.8.5: direct script writers to "git status --porcelain"

Subject: [PATCH] RelNotes/1.8.5: direct script writers to "git status --porcelain"

## tl;dr

5 messages between Sep 26, 2013 and Sep 28, 2013. Diffs are folded; open one to read it.

replies: 4people: 4as markdown or json

Matthieu Moy· Sep 26, 2013, 13:23 UTC · lore
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---

Not terribly important, but the old item alone may sound like "we broke your script purposely, good luck with the new version" to a script writer.

 Documentation/RelNotes/1.8.5.txt | 3 +++
 1 file changed, 3 insertions(+)
Show changes to Documentation/RelNotes/1.8.5.txt +3 −0
diff --git a/Documentation/RelNotes/1.8.5.txt b/Documentation/RelNotes/1.8.5.txt
index ac5c3fa..f100a0f 100644
--- a/Documentation/RelNotes/1.8.5.txt
+++ b/Documentation/RelNotes/1.8.5.txt
@@ -96,6 +96,9 @@ UI, Workflows & Features
 
  * "git status" now omits the prefix to make its output a comment in a
    commit log editor, which is not necessary for human consumption.
+   Scripts that parse the output of "git status" are advised to use
+   "git status --porcelain", which is both easier to parse and stable,
+   instead.
 
  * Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if
    "foo" is not a tag.  "git rev-parse --verify v1.0^{tag}" would be
-- 
1.8.4.474.g128a96c
Jakub Narebski· Sep 26, 2013, 18:19 UTC · re: Matthieu Moy · lore

Re: [PATCH] RelNotes/1.8.5: direct script writers to "git status --porcelain"

Matthieu Moy <Matthieu.Moy <at> imag.fr> writes:
Show 5 quoted lines
>   * "git status" now omits the prefix to make its output a comment in a
>     commit log editor, which is not necessary for human consumption.
> +   Scripts that parse the output of "git status" are advised to use
> +   "git status --porcelain", which is both easier to parse and stable,
> +   instead.
Good addition.

Perhaps "to use instead ..." would be easier to understand than proposed "to use ..., instead." (with "..." being one line long).

-- 
Jakub Narebski.
Matthieu Moy· Sep 26, 2013, 18:33 UTC · re: Jakub Narebski · lore

[PATCH v2] RelNotes/1.8.5: direct script writers to "git status --porcelain"

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Jakub Narebski <jnareb@gmail.com> writes:
> Perhaps "to use instead ..." would be easier to understand than
> proposed "to use ..., instead." (with "..." being one line long).

Actually, I had the version below staged, but forgot to "commit --amend" before sending. Should be clear enough.

 Documentation/RelNotes/1.8.5.txt | 3 +++
 1 file changed, 3 insertions(+)
Show changes to Documentation/RelNotes/1.8.5.txt +3 −0
diff --git a/Documentation/RelNotes/1.8.5.txt b/Documentation/RelNotes/1.8.5.txt
index ac5c3fa..e295266 100644
--- a/Documentation/RelNotes/1.8.5.txt
+++ b/Documentation/RelNotes/1.8.5.txt
@@ -96,6 +96,9 @@ UI, Workflows & Features
 
  * "git status" now omits the prefix to make its output a comment in a
    commit log editor, which is not necessary for human consumption.
+   Scripts that parse the output of "git status" are advised to use
+   "git status --porcelain" instead. Its format is both easier to
+   parse and stable.
 
  * Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if
    "foo" is not a tag.  "git rev-parse --verify v1.0^{tag}" would be
-- 
1.8.4.474.g128a96c
Keshav Kini· Sep 26, 2013, 20:45 UTC · re: Jakub Narebski · lore

Re: [PATCH] RelNotes/1.8.5: direct script writers to "git status --porcelain"

Jakub Narebski <jnareb@gmail.com> writes:
Show 11 quoted lines
> Matthieu Moy <Matthieu.Moy <at> imag.fr> writes:
>>   * "git status" now omits the prefix to make its output a comment in a
>>     commit log editor, which is not necessary for human consumption.
>> +   Scripts that parse the output of "git status" are advised to use
>> +   "git status --porcelain", which is both easier to parse and stable,
>> +   instead.
>
> Good addition.
>
> Perhaps "to use instead ..." would be easier to understand than
> proposed "to use ..., instead." (with "..." being one line long).

FWIW, I find "to use instead ___" slightly stilted. I'd suggest "to instead use", but rewording it to the following is much better, IMHO: '... are advised to use "git status --porcelain" instead, as it is both stable and easier to parse.'

-Keshav
Jonathan Nieder· Sep 28, 2013, 00:08 UTC · re: Keshav Kini · lore

Re: [PATCH] RelNotes/1.8.5: direct script writers to "git status --porcelain"

Keshav Kini wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>> Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 7 quoted lines
>>>   * "git status" now omits the prefix to make its output a comment in a
>>>     commit log editor, which is not necessary for human consumption.
>>> +   Scripts that parse the output of "git status" are advised to use
>>> +   "git status --porcelain", which is both easier to parse and stable,
>>> +   instead.
>>
>> Good addition.
[...]
>                   rewording it to the following is much better, IMHO:
> '... are advised to use "git status --porcelain" instead, as it is both
> stable and easier to parse.'
Thanks, all.

← back to recent threads