From 1bff6490b0225aef07d2fd13cbb806ac8ce115de Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 18 Aug 2005 15:52:58 -0700 Subject: [PATCH 1/4] Link the glossary document from the main manual. Signed-off-by: Junio C Hamano --- Documentation/git.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Documentation/git.txt b/Documentation/git.txt index be26614ffb..8d313cba6e 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -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 From d571c2be99cb4ab96ff70c62c31d587271db9567 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 18 Aug 2005 15:31:40 -0700 Subject: [PATCH 2/4] [PATCH] git-applymbox: verify that index is clean This makes git-applymbox verify that the index matches the current HEAD before it starts applying patches. Otherwise, you might have updated the index with unrelated changes, and the first patch will commit not just the patch from the mbox, but also any changes you had in your index. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- tools/git-applymbox | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/git-applymbox b/tools/git-applymbox index 889d4c1743..afcb00a3f5 100755 --- a/tools/git-applymbox +++ b/tools/git-applymbox @@ -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 From a8055f8a8ed10a6d3272382f38a0808427ab4921 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 18 Aug 2005 16:30:36 -0700 Subject: [PATCH 3/4] Also make git-rebase-script stricter about dirty working tree. Otherwise the first commit rebase makes could include whatever dirty state the original working tree had. Signed-off-by: Junio C Hamano --- git-rebase-script | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-rebase-script b/git-rebase-script index 5bb3bd97af..a335b99178 100755 --- a/git-rebase-script +++ b/git-rebase-script @@ -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 && From 75ea6911d64bbe1b202eed61eda3ebaa4d76cb99 Mon Sep 17 00:00:00 2001 From: Jason Riedy Date: Thu, 18 Aug 2005 21:10:08 -0700 Subject: [PATCH 4/4] [PATCH] Spell __attribute__ correctly in cache.h. Sun's cc doesn't know __attribute__. Signed-off-by: Jason Riedy Signed-off-by: Junio C Hamano --- cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.h b/cache.h index 742378f40f..996466795f 100644 --- a/cache.h +++ b/cache.h @@ -41,7 +41,7 @@ #endif #ifndef __attribute__ -#define __attribute(x) +#define __attribute__(x) #endif /*