Package: git-core
Version: 1:1.6.3.3-2
Severity: wishlist

I have various repositories hosted on the same machine, available
read-only via the git protocol and read-write via ssh.  I'd like to use
something like the url.<base>.insteadOf mechanism to substitute the ssh
URI for the git URI, if and only if I have ssh access from my system.
Any of the following would work for this case:

[url "ssh://example.org/"]
    insteadOf = "git://example.org/"
    test = test -f ~/.ssh/id_rsa

[url "ssh://example.org/"]
    insteadOf = "git://example.org/"
    testExists = ~/.ssh/id_rsa

[url "ssh://example.org/"]
    insteadOf = "git://example.org/"
    for = push

The first of these seems the most general, but requires git to fork and
exec a program when resolving a URI; this doesn't seem particularly
costly, though, since git already needs to fork and exec a program such
as ssh to perform the operation.

The second of these proves easier and faster, since git need only call
access(2).  However, it does seem somewhat more specialized for this
particular scenario.

The third of these seems the simplest, and it solves the problem fairly
generally while proving straightforward and cheap for Git (resolve URIs
differently depending on intended use).  I think it seems like the best
solution.

- Josh Triplett

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages git-core depends on:
ii  libc6                  2.9-26            GNU C Library: Shared libraries
ii  libcurl3-gnutls        7.19.5-1.1        Multi-protocol file transfer libra
ii  libdigest-sha1-perl    2.12-1            NIST SHA-1 message digest algorith
ii  liberror-perl          0.17-1            Perl module for error/exception ha
ii  libexpat1              2.0.1-4           XML parsing C library - runtime li
ii  perl-modules           5.10.0-25         Core Perl modules
ii  zlib1g                 1:1.2.3.3.dfsg-15 compression library - runtime

Versions of packages git-core recommends:
ii  less                          436-1      pager program similar to more
ii  openssh-client [ssh-client]   1:5.1p1-7  secure shell client, an rlogin/rsh
ii  patch                         2.5.9-5    Apply a diff file to an original
ii  rsync                         3.0.6-1    fast remote file copy program (lik

Versions of packages git-core suggests:
pn  git-arch                     <none>      (no description available)
pn  git-cvs                      <none>      (no description available)
pn  git-daemon-run               <none>      (no description available)
pn  git-doc                      <none>      (no description available)
pn  git-email                    <none>      (no description available)
pn  git-gui                      <none>      (no description available)
ii  git-svn                      1:1.6.3.3-2 fast, scalable, distributed revisi
ii  gitk                         1:1.6.3.3-2 fast, scalable, distributed revisi
pn  gitweb                       <none>      (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to