Merge branch 'cb/uname-in-untracked'
authorJunio C Hamano <gitster@pobox.com>
Mon, 3 Aug 2015 18:01:26 +0000 (11:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 Aug 2015 18:01:26 +0000 (11:01 -0700)
An experimental "untracked cache" feature used uname(2) in a
slightly unportable way.

* cb/uname-in-untracked:
untracked: fix detection of uname(2) failure

dir.c
diff --git a/dir.c b/dir.c
index 8209f8b8af1e1e3dbc9c166ca351b602de5e6f7a..1d42811cfb29009d75b95e4d24ebd67f5215e326 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -1848,7 +1848,7 @@ static const char *get_ident_string(void)
 
        if (sb.len)
                return sb.buf;
-       if (uname(&uts))
+       if (uname(&uts) < 0)
                die_errno(_("failed to get kernel name and information"));
        strbuf_addf(&sb, "Location %s, system %s %s %s", get_git_work_tree(),
                    uts.sysname, uts.release, uts.version);