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

Documentation on writing portable code for Git

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 2, 2010, 09:42 UTC
Message-ID
<AANLkTinqWn9i5CFDW_62eSu6xSH2hqef2aLJ7pYAiGVk@mail.gmail.com>
On Wed, Jun 2, 2010 at 06:41, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 7 quoted lines
> Am 6/2/2010 2:13, schrieb Brandon Casey:
>>  test_expect_success 'setup' '
>> -     unset GIT_PAGER GIT_PAGER_IN_USE &&
>> +     unset GIT_PAGER GIT_PAGER_IN_USE
>
> Maybe we should terminate the line with ';' to document that it is a
> deliberate choice that there is no '&&'?

(Split from the "ignore return status of shell's unset builtin" thread)

It would be nice if there was documentation describing how to write portable code for various parts of Git. Basically a bullet-point aggregate of the subjects of various patches we keep getting from users of IRIX, Solaris, HP-UX etc. E.g:

    * Use FOO=bar and then export FOO, not export FOO=bar
    * Don't check the return value of unset, Solaris ...
I could contribute some of these for Perl.
Message 1 of 1 in “Documentation on writing portable code for Git”
  1. Ævar Arnfjörð BjarmasonJun 2, 2010

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.