summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f8a9d42)
raw | patch | inline | side by side (parent: f8a9d42)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 5 Dec 2006 00:07:57 +0000 (16:07 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 6 Dec 2006 07:25:52 +0000 (23:25 -0800) |
This uses the previous update to read-tree in Porcelain-ish
commands "git checkout" and "git merge" to loosen the check
when switching branches.
Signed-off-by: Junio C Hamano <junkio@cox.net>
commands "git checkout" and "git merge" to loosen the check
when switching branches.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-checkout.sh | patch | blob | history | |
git-merge.sh | patch | blob | history |
diff --git a/git-checkout.sh b/git-checkout.sh
index 737abd0c094ae6cfb201fb46c28f4962a9826a02..4192a99fec1e137599b250a4f65c1b1e4201c601 100755 (executable)
--- a/git-checkout.sh
+++ b/git-checkout.sh
git-read-tree --reset -u $new
else
git-update-index --refresh >/dev/null
- merge_error=$(git-read-tree -m -u $old $new 2>&1) || (
+ merge_error=$(git-read-tree -m -u --exclude-per-directory=.gitignore $old $new 2>&1) || (
case "$merge" in
'')
echo >&2 "$merge_error"
git diff-files --name-only | git update-index --remove --stdin &&
work=`git write-tree` &&
git read-tree --reset -u $new &&
- git read-tree -m -u --aggressive $old $new $work || exit
+ git read-tree -m -u --aggressive --exclude-per-directory=.gitignore $old $new $work ||
+ exit
if result=`git write-tree 2>/dev/null`
then
diff --git a/git-merge.sh b/git-merge.sh
index 272f004622572ad2aed62268d9a75cac5a8fa751..397b33f8d33b67018669cb4610a2051407fc3eb7 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
echo "Updating $(git-rev-parse --short $head)..$(git-rev-parse --short $1)"
git-update-index --refresh 2>/dev/null
new_head=$(git-rev-parse --verify "$1^0") &&
- git-read-tree -u -v -m $head "$new_head" &&
+ git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
finish "$new_head" "Fast forward"
dropsave
exit 0