On Mon, 5 Aug 2013 20:54:05 +0530, Ramkumar Ramachandra <[email protected]>
wrote:
> Pieter Praet wrote:
> > And AFAIK, inter-repo symlinks are an obscure corner case anyway.
> > But if you happen to know of some (sane) use cases, I'd gladly be
> > proven wrong!
>
> Uh, nothing as obscure. Simplest usecase: I have a "dotfiles"
> repository with $HOME/.gitconfig, $HOME/.zshrc etc. being symlinks to
> $HOME/dotfiles/*. [...]
Oh, no, I mean *tracked* symlinks in one repo, linking to *tracked*
files in *another* repo. I guess I just totally misunderstood your
original message.
Regarding dotfiles, I'm doing pretty much the same thing, moving stray
dotfiles to "$XDG_CONFIG_HOME/$APP/$FN" (maintaining a separate repo per
application) and using Joey Hess' mr(1) [1] with the 'fixups' parameter,
automatically calling e.g. :
$ ln -s -v ${XDG_CONFIG_HOME}/git/gitconfig ${HOME}/.gitconfig"
on checkout/fetch/etc...
(BTW git complies with the XDG Basedir Spec as of v1.7.12 [2],
so one less homedir polluter to babysit!)
> Without vc-follow-symlinks, emacs warns about the
> file really being a symbolic link to a version-controlled-file and
> magit-status asks you to specify the repository by hand. With vc
> completely turned off using (setq vc-handled-backends nil), it doesn't
> display the warning but magit-status still can't detect the
> repository.
Now I get it :)
> It's probably not the right idea to strip out the vc dependency, since
> users might expect some minimal uniformity between git and non-git
> repositories. [...]
If there are in fact people who consciously use some VCS other than git
(or SVN through git), uniformity is the least of their concerns :)
> [...] Perhaps we should turn on vc-follow-symlinks on in
> magit, since vc-find-file-hook does the resolution anyway (and throws
> the computation away unless this variable is set)? [...]
Hmm, AFAIK, its default value is 'ask, so if it's anything other that
that, it means someone actively made that choice, no matter the reason.
Second-guessing that just wouldn't be polite.
IMO, the least obtrusive way would be adding `vc-follow-symlinks' to the
'magit customization group [3], thus making users aware of its existence
and its relevance to Magit, and the rest is up to them.
> [...] Is there any case
> when the user does _not_ want the symlink to be followed?
An obscure corner case like inter-repo symlinks? :D
Peace
--
Pieter
[1] http://myrepos.branchable.com/
[2] https://git.kernel.org/cgit/git/git.git/commit/?id=21cf3227
[3] https://github.com/magit/magit/pull/756
--
---
You received this message because you are subscribed to the Google Groups
"magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.