Re: git-pull-script on my linus tree fails..

Linus Torvalds
2005-06-21T17:43:51Z

On Tue, 21 Jun 2005, Jeff Garzik wrote:
>
> The reason I requested git-checkout-script is to make git-switch-tree
> pretty much trivial. The new git-switch-tree will sit on top of
> git-checkout-script, like
>
> if $1
> switch HEAD to refs/heads/$1
> git-checkout-script

Actually, I'd suggest doing the git-checkout-script _first_. That way you
_can_ use the careful version, which refuses to switch if it would cause
information to be lost. Ie something like

git-checkout-script $1 && switch HEAD to refs/heads/$1

should do it.

(And then you can choose to use the "-f" flag or not to
git-checkout-script depending on whether you want to force it).

Anyway, I think the branch switching behaviour is useful enough that I
should make git-checkout-script understand the notion of switching to a
new branch natively.

Linus