Last active
December 14, 2015 14:39
-
-
Save akavel/5102393 to your computer and use it in GitHub Desktop.
pseudo-"git", using Mercurial + hg-git plugin to cheat on "go get"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Homepage: https://gist.github.com/akavel/5102393 | |
:: Author: (c) 2013 by Mateusz Czaplinski | |
:: License: MIT/X11 | |
if "%1"=="clone" goto :clone | |
if "%1"=="show-ref" goto :showref | |
if "%1"=="checkout" goto :checkout | |
goto :unknown | |
:clone | |
call hg clone git+%2.git %3 | |
goto :eof | |
:showref | |
call hg parent --template "{node} refs/heads/master\n" | |
goto :eof | |
:checkout | |
if not "%2"=="origin/master" goto :unknown | |
goto :eof | |
:unknown | |
echo GIT %* | |
goto :err | |
:err | |
cmd /c exit /b 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment