Yaroslav Halchenko wrote: > Just now (after merging 0.49) mentioned that I never filed an official > wishlist > to adopt a feature I use to manage my $HOME, per our previous discussion [1] > > Please consider adopting > http://git.onerussian.com/?p=code/mr.git;a=blob;f=lib/git-link;hb=HEAD > > Example of its use is available in my .mr configuration > http://git.onerussian.com/?p=etc/mr.git;a=blob;f=.mr/base;hb=HEAD
Well, integrating some sort of vcs-home friendly symlinking into mr is interesting. But there are many assumptions in your implementation: * That git will be used and not some other VCS. * That the repo will be under $HOME. * That the links are in _links. * Account specific branch support. The git-fake-bare support tries to solve the same problem, but it managed to do it in a general way, without those sorts of assumptions, which is why I was willing to add it into mr. I personally deal with these sorts of things by running a fixup script after checkout and update. Something roughly like this: [foo] checkout = vcs clone http://bar/foo cd foo && ./fixups update = vcs pull ./fixups Bug #481341 suggests adding pre and post hooks for actions. If that were implemented in a certian way, this could be simplified to: [foo] checkout = vcs clone http://bar/foo fixup = ./fixups Or, a default fixups program could be defined to act on all repos: [DEFAULT] fixups = $HOME/bin/do_links It makes sense to have separate update_post and checkout_post hooks (and generally to have *_pre and *_post that are run before/after any arbitrary command). But having a higher-level hook that is run after both update and checkout in order to perform fixups common to both also seems reasonable. -- see shy jo
signature.asc
Description: Digital signature