git worktree

62 views
Skip to first unread message

Dima Pasechnik

unread,
Jan 6, 2016, 6:03:15 PM1/6/16
to sage-devel
This is a newish (since git 2.5) feature of git that apparently makes switching between different branches very quick.
https://git-scm.com/docs/git-worktree
I imagine it is diskspace-hungry, but, OK, this should only be big deal on VMs...

Has anyone tried it? Getting rid of "I checked out that branch, and it triggered a 10-minute Sage rebuild" things would be great...

Dima

Volker Braun

unread,
Jan 6, 2016, 6:23:38 PM1/6/16
to sage-devel
Its a neat twist on just making multiple clones of the Sage repo; In terms of rebuild time it doesn't give you really anything different. 

Nathann Cohen

unread,
Jan 7, 2016, 9:52:26 AM1/7/16
to sage-devel
Has anyone tried it? Getting rid of "I checked out that branch, and it triggered a 10-minute Sage rebuild" things would be great...

At some point I will get tired of repeating it, but there is absolutely no reason on earth why loading a branch should trigger *any* kind of rebuild except the files that were changed.

Checkout the latest develop that you have and create a new branch there with:

    git checkout -b tmp develop

Then you pull the distant branch:

    git pull trac <branch name>

Then 'sage -b' and you are done.

I have a short bash script that does that very easily, loads the branch from the ticket number, and if necessary adds a meaningful commit message ("Merged with beta<whatever>") on the merge commit.

So --> there is never any reason to recompile anything short of a new beta, or the files that a branch changed.

Nathann

Jeroen Demeyer

unread,
Jan 7, 2016, 9:57:12 AM1/7/16
to sage-...@googlegroups.com
On 2016-01-07 15:52, Nathann Cohen wrote:
> there is absolutely
> no reason on earth why loading a branch should trigger *any* kind of
> rebuild except the files that were changed.

You forgot dependencies.

Loading a branch should trigger a rebuild of everything which changed
and everything which depends (recursively) on things which changed.
Reply all
Reply to author
Forward
0 new messages