Re: Adding Exit status documentation to all git commands starting with git status

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

 



nadim khemir <nadim@xxxxxxxxxx> writes:

> There are different styles to add exit status, give me your input on why and 
> why not using one or the other. I list 3 solutions and what I think about 
> them.

No matter what you do, I think EXIT STATUS section should consistently
come near the end of the document, immediately before SEE ALSO, which is
where people who know how manual pages are written expect to find it.

> EXIT STATUS
> -----------
> The command exits with non-zero status if there is no path that is 
> different between the index file and the current HEAD commit (i.e.,
> there is nothing to commit by running `git commit`).

Prose is much easier to read as long as it is brief enough, than two-item
enumeration:

> EXIT STATUS
> -----------
> Zero status:      There is a different between the index file and HEAD.
> Non-zero status:  There is nothing to commit by running `git commit`. 

whose use of "Zero status" makes it look doubly funny (traditionally
manual pages do not seem to spell out exit status 0 as "zero", but
"non-zero" is Ok).

Avoid talking about only one side of the condition if you can without
being too verbose.

        The command exits with status 0 if there is something to commit by
        running `git commit` with corresponding arguments, and non-zero
        otherwise.
--
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]

  Powered by Linux