Re: optimized checkout+rebase?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ralf Wildenhues schrieb:
> this is a common work pattern:
> 
>   git checkout master
>   git pull
>   for branch in $my_topic_branches; do
>     git checkout $branch
>     git rebase master
>     # occasional fixups here...
>   done
> 
> Now, it looks to me that one of the first operations of rebase just
> undoes part of the work that the checkout of the branch did.  Well,
> "undoes" is the wrong word, what I mean is that it looks like work
> may be saved by combining the two checkout and the rewinding step.

Well, what you could do is:

   for branch in $my_topic_branches; do
     git rebase master $branch
     # occasional fixups here...
   done

But it seems that even then rebase first does the checkout $branch, and
then the checkout master right after that. At least the first checkout
should be unnecessary because all the revision range computations and
patch formating should be possible to do without the checkout. (The second
checkout is indispensable, of course.)

This has annoyed me, too, but not so much that I started looking at a fix,
though...

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux