aboutsummaryrefslogtreecommitdiff
path: root/git-sh-setup.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-09-24 22:52:32 -0700
committerJunio C Hamano <junkio@cox.net>2005-09-26 18:04:17 -0700
commite2f5f6ef6795c880a2f13ea472b96704b4a4ca94 (patch)
tree026f1225da4579fbf0017f4cfe8a8e4b06e299d6 /git-sh-setup.sh
parenta935824036dc2c5a8ef1980a4b05a12228712754 (diff)
downloadgit-e2f5f6ef6795c880a2f13ea472b96704b4a4ca94.tar.gz
git-e2f5f6ef6795c880a2f13ea472b96704b4a4ca94.tar.xz
Do not require clean tree when reverting and cherry-picking.
My stupidity deserved to be yelled at by Linus ... there is no reason to require the working tree to be clean when merging -- the only requirements are index to match HEAD commit and the paths involved in merge are up to date in the working tree. Revert and cherry-pick are just specialized forms of merge, and the requirements should be the same. Remove the 'general purpose routine to make sure tree is clean' from git-sh-setup, to prevent me from getting tempted again. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-sh-setup.sh')
-rwxr-xr-xgit-sh-setup.sh11
1 files changed, 0 insertions, 11 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index d5bfa62de..55db79584 100755
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -17,17 +17,6 @@ die() {
exit 1
}
-check_clean_tree() {
- dirty1_=`git-update-index -q --refresh` && {
- dirty2_=`git-diff-index --name-only --cached HEAD`
- case "$dirty2_" in '') : ;; *) (exit 1) ;; esac
- } || {
- echo >&2 "$dirty1_"
- echo "$dirty2_" | sed >&2 -e 's/^/modified: /'
- (exit 1)
- }
-}
-
[ -h "$GIT_DIR/HEAD" ] &&
[ -d "$GIT_DIR/refs" ] &&
[ -d "$GIT_OBJECT_DIRECTORY/00" ]