Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'js/run-command-updates' (early part)
author
Junio C Hamano
<gitster@pobox.com>
Thu, 9 Jul 2009 07:59:32 +0000
(
00:59
-0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 9 Jul 2009 07:59:32 +0000
(
00:59
-0700)
* 'js/run-command-updates' (early part):
MinGW: truncate exit()'s argument to lowest 8 bits
compat/mingw.h
patch
|
blob
|
history
git.c
patch
|
blob
|
history
raw
(from parent 1:
0da3e1d
)
diff --git
a/compat/mingw.h
b/compat/mingw.h
index 4f7ba4c13f9d0086acf9d1cfadf6912b1d641033..c1859c5480f67dbe9640975d68407f2c1efd15f5 100644
(file)
--- a/
compat/mingw.h
+++ b/
compat/mingw.h
@@
-92,6
+92,8
@@
static inline int fcntl(int fd, int cmd, long arg)
errno = EINVAL;
return -1;
}
+/* bash cannot reliably detect negative return codes as failure */
+#define exit(code) exit((code) & 0xff)
/*
* simple adaptors
diff --git
a/git.c
b/git.c
index 9acce91850d32a6829fd7119e6b7830796624628..807d875ae06ce7bbf61bb846c5b4cb5a51855eba 100644
(file)
--- a/
git.c
+++ b/
git.c
@@
-245,7
+245,7
@@
static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
status = p->fn(argc, argv, prefix);
if (status)
- return status
& 0xff
;
+ return status;
/* Somebody closed stdout? */
if (fstat(fileno(stdout), &st))