summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-10 02:16:33 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-10-10 02:16:33 (GMT)
commitd5b0c9ea178dab3599674ccff50645c0464b8c31 (patch)
treea35b27b04d18022ea4731941ea2a1bedce998092
parentf8e2c54c9a17af3319e96db1d9e97ace36ae6831 (diff)
parentfb8024b414b417d85ce215eba3dd23c188500c15 (diff)
downloadgit-d5b0c9ea178dab3599674ccff50645c0464b8c31.zip
git-d5b0c9ea178dab3599674ccff50645c0464b8c31.tar.gz
git-d5b0c9ea178dab3599674ccff50645c0464b8c31.tar.bz2
Merge branch 'fixes'
with minor hand resolving on git-tag. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Documentation/git-tag.txt4
-rw-r--r--Makefile2
-rwxr-xr-xgit-tag.sh2
-rwxr-xr-xgit-verify-tag.sh8
-rw-r--r--mailinfo.c4
-rw-r--r--patch-id.c4
-rw-r--r--templates/Makefile9
7 files changed, 23 insertions, 10 deletions
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 1eafeef..3984812 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -1,16 +1,14 @@
git-tag(1)
==========
-v0.99.4, Aug 2005
NAME
----
git-tag - Create a tag object signed with GPG
-
SYNOPSIS
--------
-'git-tag' [-a | -s | -u <key-id>] [-f] [-m <msg>] <name>
+'git-tag' [-a | -s | -u <key-id>] [-f] [-m <msg>] <name> [<head>]
DESCRIPTION
-----------
diff --git a/Makefile b/Makefile
index a201187..ac384c7 100644
--- a/Makefile
+++ b/Makefile
@@ -265,7 +265,7 @@ ifdef NEEDS_NSL
SIMPLE_LIB += -lnsl
endif
ifdef NO_STRCASESTR
- DEFINES += -Dstrcasestr=gitstrcasestr
+ DEFINES += -Dstrcasestr=gitstrcasestr -DNO_STRCASESTR=1
LIB_OBJS += compat/strcasestr.o
endif
ifdef NO_MMAP
diff --git a/git-tag.sh b/git-tag.sh
index 9afdf5c..25c1a0e 100755
--- a/git-tag.sh
+++ b/git-tag.sh
@@ -4,7 +4,7 @@
. git-sh-setup || die "Not a git archive"
usage () {
- echo >&2 "Usage: git-tag [-a | -s | -u <key-id>] [-f] [-m <msg>] <tagname>"
+ echo >&2 "Usage: git-tag [-a | -s | -u <key-id>] [-f] [-m <msg>] <tagname> [<head>]"
exit 1
}
diff --git a/git-verify-tag.sh b/git-verify-tag.sh
index 156c75b..ed4c893 100755
--- a/git-verify-tag.sh
+++ b/git-verify-tag.sh
@@ -1,8 +1,12 @@
#!/bin/sh
. git-sh-setup || die "Not a git archive"
-tag=$(git-rev-parse $1) || exit 1
+type="$(git-cat-file -t "$1" 2>/dev/null)" ||
+ die "$1: no such object."
-git-cat-file tag $tag > .tmp-vtag || exit 1
+test "$type" = tag ||
+ die "$1: cannot verify a non-tag object of type $type."
+
+git-cat-file tag "$1" > .tmp-vtag || exit 1
cat .tmp-vtag | sed '/-----BEGIN PGP/Q' | gpg --verify .tmp-vtag - || exit 1
rm -f .tmp-vtag
diff --git a/mailinfo.c b/mailinfo.c
index df470bb..cb853df 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -9,6 +9,10 @@
#include <ctype.h>
#include <iconv.h>
+#ifdef NO_STRCASESTR
+extern char *gitstrcasestr(const char *haystack, const char *needle);
+#endif
+
static FILE *cmitmsg, *patchfile;
static int keep_subject = 0;
diff --git a/patch-id.c b/patch-id.c
index 5a8dc75..960e7ce 100644
--- a/patch-id.c
+++ b/patch-id.c
@@ -55,6 +55,10 @@ static void generate_id_list(void)
if (!patchlen && memcmp(line, "diff ", 5))
continue;
+ /* Ignore git-diff index header */
+ if (!memcmp(line, "index ", 6))
+ continue;
+
/* Ignore line numbers when computing the SHA1 of the patch */
if (!memcmp(line, "@@ -", 4))
continue;
diff --git a/templates/Makefile b/templates/Makefile
index 221a086..c23aee8 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -6,13 +6,15 @@ prefix ?= $(HOME)
template_dir ?= $(prefix)/share/git-core/templates/
# DESTDIR=
-all: boilerplates custom
+all: boilerplates.made custom
find blt
# Put templates that can be copied straight from the source
# in a file direc--tory--file in the source. They will be
# just copied to the destination.
-boilerplates:
+
+bpsrc = $(filter-out %~,$(wildcard *--*))
+boilerplates.made : $(bpsrc)
ls *--* 2>/dev/null | \
while read boilerplate; \
do \
@@ -25,6 +27,7 @@ boilerplates:
*) cp $$boilerplate blt/$$dst ;; \
esac || exit; \
done || exit
+ date >$@
# If you need build-tailored templates, build them into blt/
# directory yourself here.
@@ -32,7 +35,7 @@ custom:
: no custom templates yet
clean:
- rm -rf blt
+ rm -rf blt boilerplates.made
install: all
$(INSTALL) -d -m755 $(DESTDIR)$(template_dir)