RFR: git-fork: support configuration and more options

Erik Helin ehelin at openjdk.java.net
Fri Dec 6 15:33:36 UTC 2019

Hi all,

please review this (large) rewrite of `git-fork`. The command is mostly
backwards compatible, but I've added a number of new options (and made them all

Some particulary nice features:

- support for `--reference` means really fast clone times if you have a similar
  repository available locally
- support for `--forge` means very short command-lines (particularly if you one
  configures this flag)
- support for the `ssh://` protocol is more natural when cloning a personal fork

All features taken together becomes faily smooth. As an example, consider the
following `~/.gitconfig`:

       ssh = true
       forge = github.com
       reference = ~/git/github.com/openjdk/jdk

_If_ I have a `jdk` repository available at the above path (it doesn't have to
be up to date), then a fork of _any_ jdk derived repostiry becomes really fast:

$ time git fork openjdk/panama
Fork available at: https://github.com/edvbld/panama
Cloning ssh://git@github.com/edvbld/panama.git...
Cloning into 'panama'...
remote: Enumerating objects: 12082, done.
remote: Counting objects: 100% (12082/12082), done.
remote: Total 35466 (delta 12082), reused 12082 (delta 12082), pack-reused 23384
Receiving objects: 100% (35466/35466), 13.08 MiB | 10.86 MiB/s, done.
Resolving deltas: 100% (28691/28691), completed with 1851 local objects.
Updating files: 100% (67732/67732), done.
Adding remote 'upstream' for https://github.com/openjdk/panama...done

real    0m23.801s
user    0m8.834s
sys     0m2.959s

I've tested `git-pr` manually and it all seems to hang together ��



 - 530f03ef: git-fork: support configuration and more options

Changes: https://git.openjdk.java.net/skara/pull/300/files
 Webrev: https://webrevs.openjdk.java.net/skara/300/webrev.00
  Stats: 212 lines in 1 file changed: 155 ins; 8 del; 49 mod
  Patch: https://git.openjdk.java.net/skara/pull/300.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/300/head:pull/300

PR: https://git.openjdk.java.net/skara/pull/300

More information about the skara-dev mailing list