giternal icon indicating copy to clipboard operation
giternal copied to clipboard

Allow freezing at a revision

Open smtlaissezfaire opened this issue 14 years ago • 3 comments

Is it possible to freeze an external at a given revision or on another branch?

smtlaissezfaire avatar Jan 04 '11 18:01 smtlaissezfaire

Alternatively, how can I use a different branch from the master branch?

smtlaissezfaire avatar Jan 04 '11 18:01 smtlaissezfaire

Not yet. Specifying a tree-ish is a feature I've had in mind for a long time but just haven't added so far.

You can use a different branch by manually CDing into the external dir and checking out the branch you want. giternal just uses "git pull" so as long as the directory points at your desired branch, and you've set tracking up so that "git pull" works, it should work for you.

You could potentially run into problems if someone has it pointing at master while another's is pointing at a different branch. To avoid this I would say you want to manually check out your desired branch locally, freeze it & commit, then unfreeze it if necessary. freezing it will ensure that anyone who pulls your commit will get the same set of files as you have on your system.

But specifying a sha in the config is definitely desirable. Not sure when I'll make that happen, but patches are certainly welcome.

patmaddox avatar Jan 04 '11 19:01 patmaddox

One problem with freezing so that other people can pull the same files is that unless they have a clean repository they will get the following error when they try to pull the frozen modules:

# git pull
Updating xxxxxxx..yyyyyyy
error: The following untracked working tree files would be overwritten by merge:
vendor/foo/...
...
Aborting

rocketraman avatar Mar 17 '11 06:03 rocketraman