git-find-repeo

Maximilian Gass mxey at cloudconnected.org
Thu Feb 28 18:15:21 CET 2008


Hi,

after a little discussion with madduck, I settled on the approach of multiple
repos, checked out into a single worktree.

AFAIK the problem always used to be how to find out the correct repo for a file.

So I created git-find-repo.sh:

#!/bin/sh

file=$1

for repo in .fgits/*; do
    if GIT_DIR=$repo git ls-files $file | fgrep $file >/dev/null; then
        echo $repo
        exit
    fi
done

exit 1


Integrated with an alias like 'git guess-repo', this can be used to set GIT_DIR
accordingly.

Comments?

mxey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.madduck.net/pipermail/vcs-home/attachments/20080228/06b0e3a2/attachment.pgp>


More information about the vcs-home mailing list