threads / discuss / 13148

Man pages lack of exit status information

Subject: Man pages lack of exit status information

## tl;dr

4 messages between Apr 17, 2008 and Apr 17, 2008.

replies: 3people: 3as markdown or json

Francis Moreau· Apr 17, 2008, 07:45 UTC · lore
Hello,

I checked on a couple of git commands' man pages and I couldn't find the exit status of these commands.

For example: git-status, git-diff man pages don't tell anything.
Am I missing something ?
Thanks
-- 
Francis
Wincent Colaiuta· Apr 17, 2008, 08:17 UTC · re: Francis Moreau · lore

Re: Man pages lack of exit status information

El 17/4/2008, a las 9:45, Francis Moreau escribió:
Show 8 quoted lines
> Hello,
>
> I checked on a couple of git commands' man pages and I couldn't find
> the exit status of these commands.
>
> For example: git-status, git-diff man pages don't tell anything.
>
> Am I missing something ?

The "git-diff" man page documents this under the --exit-code option. It probably would be nice to have an "EXIT STATUS" section added to the man pages of those commands for which it would be interesting (like "git-diff") and perhaps to the main "git" man page as well (with general info).

If there is interest in this I'll whip up a doc patch.

Cheers, Wincent

Francis Moreau· Apr 17, 2008, 08:38 UTC · re: Wincent Colaiuta · lore

Re: Man pages lack of exit status information

On Thu, Apr 17, 2008 at 10:17 AM, Wincent Colaiuta <win@wincent.com> wrote:
Show 16 quoted lines
> El 17/4/2008, a las 9:45, Francis Moreau escribió:
> > I checked on a couple of git commands' man pages and I couldn't find
> > the exit status of these commands.
> >
> > For example: git-status, git-diff man pages don't tell anything.
> >
> > Am I missing something ?
> >
>
>  The "git-diff" man page documents this under the --exit-code option. It
> probably would be nice to have an "EXIT STATUS" section added to the man
> pages of those commands for which it would be interesting (like "git-diff")
> and perhaps to the main "git" man page as well (with general info).
>
>  If there is interest in this I'll whip up a doc patch.
>

I think it makes sense to have such section specially since git plumbings are also designed to be used in higher level scripts.

I really use to searching for RETURN VALUE section in man pages when I need what a command returns. And it's a pain to have to read the whole man page for finding such important information.

Thanks
-- 
Francis
David Mansfield· Apr 17, 2008, 17:38 UTC · re: Francis Moreau · lore

Re: Man pages lack of exit status information

On Thu, 2008-04-17 at 10:38 +0200, Francis Moreau wrote:
Show 25 quoted lines
> On Thu, Apr 17, 2008 at 10:17 AM, Wincent Colaiuta <win@wincent.com> wrote:
> > El 17/4/2008, a las 9:45, Francis Moreau escribió:
> > > I checked on a couple of git commands' man pages and I couldn't find
> > > the exit status of these commands.
> > >
> > > For example: git-status, git-diff man pages don't tell anything.
> > >
> > > Am I missing something ?
> > >
> >
> >  The "git-diff" man page documents this under the --exit-code option. It
> > probably would be nice to have an "EXIT STATUS" section added to the man
> > pages of those commands for which it would be interesting (like "git-diff")
> > and perhaps to the main "git" man page as well (with general info).
> >
> >  If there is interest in this I'll whip up a doc patch.
> >
> 
> I think it makes sense to have such section specially since git plumbings are
> also designed to be used in higher level scripts.
> 
> I really use to searching for RETURN VALUE section in man pages when I need
> what a command returns. And it's a pain to have to read the whole man page for
> finding such important information.
> 
+1 for adding a RETURN VALUE section to the docs.

Yes, please! We need this. I got burned because git-status does something which is non-intuitive, and just yesterday I was asking about git-merge, which I can only assume returns (exits) with 1 if there was a conflict.

David

← back to recent threads