From c7635f8f2130f9904bc0000ccc31fb236cdc01d2 Mon Sep 17 00:00:00 2001 From: go2null <1t1is2@gmail.com> Date: Thu, 28 May 2015 11:18:03 +0000 Subject: [PATCH 1/2] FIXes 'mktemp' to work again on Linux Broken in 67241a46a820f19706a398adfee55af863fb5449 `mktemp` for BSD (including OSX) requires a template, but it allows any number of `X`s in the template. (GNU) `mktemp` for Linux does not require a template, however, if a template is specified, then the number of `X`s must be 6. See http://unix.stackexchange.com/a/206111/117157 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f52064d..67ee429 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ install: @mkdir -p $(DESTDIR)$(BINPREFIX) @echo "... installing bins to $(DESTDIR)$(BINPREFIX)" @echo "... installing man pages to $(DESTDIR)$(MANPREFIX)" - $(eval TEMPFILE := $(shell mktemp -t git-extra.XXX)) + $(eval TEMPFILE := $(shell mktemp -q -t git-extras.XXXXXX 2>/dev/null || mktemp -q)) @# chmod from rw-------(default) to rwxrwxr-x, so that users can exec the scripts @chmod 775 $(TEMPFILE) @$(foreach COMMAND, $(COMMANDS_USED_WITH_GIT_REPO), \ From a67b42711d882832aad2b3dfcd7b2082358ea93f Mon Sep 17 00:00:00 2001 From: go2null <1t1is2@gmail.com> Date: Thu, 28 May 2015 11:54:40 +0000 Subject: [PATCH 2/2] FIXes location of `--` for `grep` Broken in 5b1ac3ccc69f65f8670746f5e0b9c14653cf6685 `--` must be after all parameters (options), and before positional arguments See https://unix.stackexchange.com/questions/11376/what-does-double-dash-mean-also-known-as-bare-double-dash --- bin/git-contrib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-contrib b/bin/git-contrib index 1dbea52..b6f1634 100755 --- a/bin/git-contrib +++ b/bin/git-contrib @@ -6,4 +6,4 @@ test -z "$user" && echo "user name required." 1>&2 && exit 1 count=`git log --oneline --pretty="format: %an" | grep -- "$user" | wc -l` test $count -eq 0 && echo "$user did not contribute." && exit 1 -git shortlog | grep -- "$user (" -A $count +git shortlog | grep -A $count -- "$user ("