Git config trick.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Git config trick.

Ori Livneh
In ~/.gitconfig, add:

[url "ssh://[hidden email]:29418/mediawiki/extensions/"]
    insteadOf = "ext:"

Now you can:

git clone ext:UploadWizard

!

---
Ori Livneh
[hidden email]
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Git config trick.

Tyler Romeo
This is one of the most useful things I've ever learned. Thanks!

*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
www.whizkidztech.com | [hidden email]


On Fri, Jul 19, 2013 at 1:40 PM, Ori Livneh <[hidden email]> wrote:

> In ~/.gitconfig, add:
>
> [url "ssh://[hidden email]:29418/mediawiki/extensions/
> "]
>     insteadOf = "ext:"
>
> Now you can:
>
> git clone ext:UploadWizard
>
> !
>
> ---
> Ori Livneh
> [hidden email]
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Git config trick.

Roan Kattouw-2
In reply to this post by Ori Livneh
On Fri, Jul 19, 2013 at 10:40 AM, Ori Livneh <[hidden email]> wrote:

> In ~/.gitconfig, add:
>
> [url "ssh://[hidden email]:29418/mediawiki/extensions/"]
>     insteadOf = "ext:"
>
> Now you can:
>
> git clone ext:UploadWizard
>
> !
>
"!" indeed. Sweet trick, dude, thanks!

Roan

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Git config trick.

C. Scott Ananian
In reply to this post by Tyler Romeo
On Fri, Jul 19, 2013 at 2:44 PM, Tyler Romeo <[hidden email]> wrote:

> This is one of the most useful things I've ever learned. Thanks!
>

It's close, but the '-p' option to just-about-every-git-command still wins
the "most useful" prize.  But close!

I'll suggest a little variant:

[url "https://gerrit.wikimedia.org/r/p/mediawiki/"]
insteadOf="mw:"

...lets you do:
  $ git clone mw:core
  $ git clone mw:extensions/Parsoid
  etc

You should still do 'git review --setup' once you've cloned the extension
or whatever.  That will set up the "ssh://
[hidden email]:29418/mediawiki/..." remote for gerrit and
stuff.
  --scott

--
(http://cscott.net)
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Git config trick.

Paul Selitskas
In reply to this post by Ori Livneh
Father of God^WGit. Thanks, works like a charm!


On Fri, Jul 19, 2013 at 8:40 PM, Ori Livneh <[hidden email]> wrote:

> In ~/.gitconfig, add:
>
> [url "ssh://[hidden email]:29418/mediawiki/extensions/
> "]
>     insteadOf = "ext:"
>
> Now you can:
>
> git clone ext:UploadWizard
>
> !
>
> ---
> Ori Livneh
> [hidden email]
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l




--
З павагай,
Павел Селіцкас/Pavel Selitskas
Wizardist @ Wikimedia projects
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Git config trick.

Antoine Musso-3
In reply to this post by Ori Livneh
Le 19/07/13 19:40, Ori Livneh a écrit :
> In ~/.gitconfig, add:
>
> [url "ssh://[hidden email]:29418/mediawiki/extensions/"]
>     insteadOf = "ext:"
>
> Now you can:
>
> git clone ext:UploadWizard

Oh my god I should read the doc. Tip variant:

 [url "ssh://gerrit.wikimedia.org:29418/"]
     insteadOf = "wmf:"
 [url "ssh://review.openstack.org:29418/openstack-infra/"]
     insteadOf = "infra:"
 ...

 git clone wmf:operations/puppet
 git clone infra:zuul

Adopted! Thank you Ori :-]

------[hijacking]------------------------------------------------------

Hijacking the thread, I wrote a basic python script that let you easily
clone assuming you get all your clones under ~/project :

 cd ~/projects/mediawiki
 git gerritclone extensions/AbuseFilter
 # cloned under extensions/AbuseFilter

 cd ~/projects/
 git gerritclone mediawiki/extensions/Scribunto
 # cloned under mediawiki/extensions/Scribunto

Lame python is at:
  https://github.com/hashar/git-gerritclone



--
Antoine "hashar" Musso


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l