[Rev 04] RFR: git-fork: support configuration and more options

Erik Helin ehelin at openjdk.java.net
Mon Dec 9 09:44:16 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
> configurable).
> 
> Some particularly nice features:
> 
> - support for `--reference` means really fast clone times if you have a similar
>   repository available locally
> - support for `--host` 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`:
> 
> [fork]
>        ssh = true
>        host = 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 ��
> 
> Thanks,
> Erik

The pull request has been updated with 1 additional commit.

-------------

Added commits:
 - dfae228f: Print host

Changes:
  - all: https://git.openjdk.java.net/skara/pull/300/files
  - new: https://git.openjdk.java.net/skara/pull/300/files/64fec188..dfae228f

Webrevs:
 - full: https://webrevs.openjdk.java.net/skara/300/webrev.04
 - incr: https://webrevs.openjdk.java.net/skara/300/webrev.03-04

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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