chiark / gitweb /
tg-update.sh: Fix recursive update shell call
authorPetr Baudis <pasky@suse.cz>
Sun, 3 Aug 2008 01:01:37 +0000 (03:01 +0200)
committerPetr Baudis <pasky@suse.cz>
Sun, 3 Aug 2008 01:01:37 +0000 (03:01 +0200)
The sh -i would not have correct stdin, but tg update did not exit
with an error status on base-head merge conflicts in the first place.

tg-update.sh

index 03b8f3fc6b81bc1cc78263122cb0f412f2a0521e..ec14bf68049d1dcffcf8b68b3d5ec36226c847af 100644 (file)
@@ -55,7 +55,7 @@ if [ -s "$depcheck" ]; then
                                        # The merge got stuck! Let the user fix it up.
                                        info "You are in a subshell. If you abort the merge,"
                                        info "use \`exit 1\` to abort the recursive update altogether."
                                        # The merge got stuck! Let the user fix it up.
                                        info "You are in a subshell. If you abort the merge,"
                                        info "use \`exit 1\` to abort the recursive update altogether."
-                                       if ! sh -i; then
+                                       if ! sh -i </dev/tty; then
                                                info "Ok, you aborated the merge. Now, you just need to"
                                                info "switch back to some sane branch using \`git checkout\`."
                                                exit 3
                                                info "Ok, you aborated the merge. Now, you just need to"
                                                info "switch back to some sane branch using \`git checkout\`."
                                                exit 3
@@ -105,4 +105,5 @@ if ! git merge "refs/top-bases/$name"; then
                info "Please commit merge resolution and call exit."
                info "You can abort this operation using \`git reset --hard\`."
        fi
                info "Please commit merge resolution and call exit."
                info "You can abort this operation using \`git reset --hard\`."
        fi
+       exit 3
 fi
 fi