SyneRBI / SyneRBI_VM

Virtual Machine with pre-installed SyneRBI software
http://www.ccpsynerbi.ac.uk
Apache License 2.0
3 stars 7 forks source link

update checkout problem with local branch #153

Closed KrisThielemans closed 3 years ago

KrisThielemans commented 4 years ago

@paskino found a problem with our current strategy of using fetch, checkout tag https://github.com/SyneRBI/SyneRBI_VM/blob/7f0749fa1092d50768507b5751a751103550ddce/scripts/UPDATE.sh#L141

See https://github.com/SyneRBI/SyneRBI_VM/pull/151#discussion_r407855603

There are 3 cases:

However, if you're in a detached HEAD, you cannot pull:

$ git checkout origin/master
$ git pull
You are not currently on a branch.
Please specify which branch you want to merge with.

I guess there is no easy way to check in which of the 3 cases we are. Possibly the easiest thing to do is a git pull anyway after the checkout, and cope with the failure.

I suppose this is why the CMake Externalproject* stuff is so complicated for updating git...

KrisThielemans commented 4 years ago

there's another pull in clone_or_pull which has the same problem