Merge with master to pick up safety patches.
authorJunio C Hamano <junkio@cox.net>
Fri, 19 Aug 2005 05:10:50 +0000 (22:10 -0700)
committerJunio C Hamano <junkio@cox.net>
Fri, 19 Aug 2005 05:10:50 +0000 (22:10 -0700)
Documentation/git.txt
cache.h
git-rebase-script
tools/git-applymbox
index be26614ffbfca315943daa11dc0c4523d6ed6f58..8d313cba6e98a3ff1d2ba191ffbebc1f436de375 100644 (file)
@@ -328,12 +328,7 @@ GIT_DIR.
 
 Terminology
 -----------
-Each line contains terms which you may see used interchangeably
-
- object database, .git directory
- directory cache, index
- id, sha1, sha1-id, sha1 hash
- type, tag
+Please see link:glossary.html[glossary] document.
 
 
 Environment Variables
diff --git a/cache.h b/cache.h
index 742378f40ffb3746c72af7e470c94fe9735ca0a4..996466795f65a115f2b6375391ff353114610d5e 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -41,7 +41,7 @@
 #endif
 
 #ifndef __attribute__
-#define __attribute(x)
+#define __attribute__(x)
 #endif
 
 /*
index 5bb3bd97af8019ad31d9278fcfd27e08ca3ce1da..a335b991782e56b9ce33520a4671539791ff4fb8 100755 (executable)
@@ -27,7 +27,9 @@ esac
 
 upstream=`git-rev-parse --verify "$1"` &&
 ours=`git-rev-parse --verify "$ours_symbolic"` || exit
-test "$(git-diff-cache --cached "$ours")" = "" || 
+different1=$(git-diff-cache --name-only --cached "$ours") &&
+different2=$(git-diff-cache --name-only "$ours") &&
+test "$different1$different2" = "" ||
 die "Your working tree does not match $ours_symbolic."
 
 git-read-tree -m -u $ours $upstream &&
index 889d4c1743ccdfcf8ad0be96a58eb8b60c03ccdc..afcb00a3f5e25d062eb1219994506a669e252bc5 100755 (executable)
@@ -18,6 +18,8 @@
 ## use a Signoff_file, because applypatch wants to append the sign-off
 ## message to msg-clean every time it is run.
 
+. git-sh-setup-script || die "Not a git archive"
+
 keep_subject= query_apply= continue= resume=t
 while case "$#" in 0) break ;; esac
 do
@@ -39,6 +41,12 @@ case "$continue" in
        shift
 esac
 
+files=$(git-diff-cache --cached --name-only HEAD) || exit
+if [ "$files" ]; then
+   echo "Dirty index: cannot apply patches (dirty: $files)" >&2
+   exit 1
+fi
+
 case "$query_apply" in
 t)     touch .dotest/.query_apply
 esac