aboutsummaryrefslogtreecommitdiff
path: root/git-reset-script
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 15:40:00 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 15:40:00 -0700
commitef0bfa25e99627b809c0902d21072821955db3fe (patch)
tree5760644db3f9cb044c99aa0f9ce4fc8d4eb76da1 /git-reset-script
parent6b38a402e97274037982a5346ca4168cc8ee026c (diff)
downloadgit-ef0bfa25e99627b809c0902d21072821955db3fe.tar.gz
git-ef0bfa25e99627b809c0902d21072821955db3fe.tar.xz
Remove MERGE_HEAD in "git checkout/reset"
Both of these scripts will end up resetting the index to some specific head, and any unresolved merge will be forgotten.
Diffstat (limited to 'git-reset-script')
-rwxr-xr-xgit-reset-script2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-reset-script b/git-reset-script
index eaefd00d9..fe773388c 100755
--- a/git-reset-script
+++ b/git-reset-script
@@ -1,3 +1,5 @@
#!/bin/sh
+: ${GIT_DIR=.git}
git-read-tree --reset HEAD
git-update-cache --refresh
+rm -f "$GIT_DIR/MERGE_HEAD"