# Documentation on writing portable code for Git

1 messages from 2010-06-02 to 2010-06-02. Participants: Ævar Arnfjörð Bjarmason.
Thread: https://gitlist.dev/t/23978

## Ævar Arnfjörð Bjarmason, 2010-06-02 09:42

Subject: Documentation on writing portable code for Git
Message-ID: <AANLkTinqWn9i5CFDW_62eSu6xSH2hqef2aLJ7pYAiGVk@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinqWn9i5CFDW_62eSu6xSH2hqef2aLJ7pYAiGVk%40mail.gmail.com

```
On Wed, Jun 2, 2010 at 06:41, Johannes Sixt <j.sixt@viscovery.net> wrote:
> 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.

```
