git-hub 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +12 -2
- data/README.md +3 -0
- data/lib/hub/commands.rb +7 -0
- data/lib/hub/version.rb +1 -1
- data/man/hub.1 +8 -20
- data/man/hub.1.html +12 -10
- data/man/hub.1.ron +11 -7
- data/test/hub_test.rb +12 -0
- metadata +2 -2
data/HISTORY.md
CHANGED
@@ -1,7 +1,17 @@
|
|
1
|
-
## 0.
|
1
|
+
## 0.3.1 (2010-02-13)
|
2
2
|
|
3
|
-
*
|
3
|
+
* Add `hub remote origin` shortcut. Assumes your GitHub login.
|
4
|
+
|
5
|
+
## 0.3.0 (2010-01-23)
|
6
|
+
|
7
|
+
* Add `hub browse` command for opening a repo in a browser.
|
8
|
+
* Add `hub standalone` for installation of standalone via RubyGems
|
9
|
+
* Bugfix: Don't run hub standalone in standalone mode
|
10
|
+
* Bugfix: `git clone` flags are now passed through.
|
4
11
|
* Bugfix: `git clone` with url and path works.
|
12
|
+
* Bugfix: basename call
|
13
|
+
* Bugfix: Check for local directories before cloning
|
14
|
+
|
5
15
|
|
6
16
|
## 0.2.0 (2009-12-24)
|
7
17
|
|
data/README.md
CHANGED
@@ -128,6 +128,9 @@ superpowers:
|
|
128
128
|
$ git remote add -p rtomayko
|
129
129
|
> git remote add rtomayko git@github.com:rtomayko/CURRENT_REPO.git
|
130
130
|
|
131
|
+
$ git remote add origin
|
132
|
+
> git remote add origin git://github.com/YOUR_USER/CURRENT_REPO.git
|
133
|
+
|
131
134
|
### git init
|
132
135
|
|
133
136
|
$ git init -g
|
data/lib/hub/commands.rb
CHANGED
@@ -91,6 +91,9 @@ module Hub
|
|
91
91
|
#
|
92
92
|
# $ hub remote add -p mojombo
|
93
93
|
# > git remote add mojombo git@github.com:mojombo/THIS_REPO.git
|
94
|
+
#
|
95
|
+
# $ hub remote add origin
|
96
|
+
# > git remote add origin git://github.com/YOUR_LOGIN/THIS_REPO.git
|
94
97
|
def remote(args)
|
95
98
|
return unless args[1] == 'add'
|
96
99
|
|
@@ -100,6 +103,10 @@ module Hub
|
|
100
103
|
ssh = args.delete('-p')
|
101
104
|
user = args.last
|
102
105
|
url = ssh ? PRIVATE : PUBLIC
|
106
|
+
|
107
|
+
# Origin special case.
|
108
|
+
user = github_user if args[2] == 'origin'
|
109
|
+
|
103
110
|
args << url % [ user, REPO ]
|
104
111
|
end
|
105
112
|
end
|
data/lib/hub/version.rb
CHANGED
data/man/hub.1
CHANGED
@@ -1,32 +1,16 @@
|
|
1
1
|
.\" generated with Ron/v0.3
|
2
2
|
.\" http://github.com/rtomayko/ron/
|
3
3
|
.
|
4
|
-
.TH "HUB" "1" "
|
4
|
+
.TH "HUB" "1" "February 2010" "DEFUNKT" "Git Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBhub\fR \-\- git + hub = github
|
8
8
|
.
|
9
9
|
.SH "SYNOPSIS"
|
10
|
-
\fBhub\fR \fICOMMAND\fR \fIOPTIONS\fR
|
11
|
-
.
|
12
|
-
.br
|
13
|
-
\fBhub alias\fR [\fB\-s\fR] \fISHELL\fR
|
14
|
-
.
|
15
|
-
.br
|
10
|
+
\fBhub\fR \fICOMMAND\fR \fIOPTIONS\fR \fBhub alias\fR [\fB\-s\fR] \fISHELL\fR
|
16
11
|
.
|
17
12
|
.P
|
18
|
-
\fBgit init \-g\fR \fIOPTIONS\fR
|
19
|
-
.
|
20
|
-
.br
|
21
|
-
\fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR
|
22
|
-
.
|
23
|
-
.br
|
24
|
-
\fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[/\fIREPOSITORY\fR]
|
25
|
-
.
|
26
|
-
.br
|
27
|
-
\fBgit browse\fR [\fB\-p\fR] [\fIUSER\fR/]\fIREPOSITORY\fR
|
28
|
-
.
|
29
|
-
.br
|
13
|
+
\fBgit init \-g\fR \fIOPTIONS\fR \fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR \fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[/\fIREPOSITORY\fR] \fBgit browse\fR [\fB\-p\fR] [\fIUSER\fR/]\fIREPOSITORY\fR
|
30
14
|
.
|
31
15
|
.SH "DESCRIPTION"
|
32
16
|
\fBhub\fR enhances various \fBgit\fR commands with GitHub remote expansion. The
|
@@ -56,7 +40,8 @@ your GitHub login. With \fB\-p\fR, use private remote
|
|
56
40
|
Add remote "git://github.com/\fIUSER\fR/\fIREPOSITORY\fR.git" as with
|
57
41
|
git\-remote(1). When /\fIREPOSITORY\fR is omitted, the basename of the
|
58
42
|
current working directory is used. With \fB\-p\fR, use private remote
|
59
|
-
"git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git".
|
43
|
+
"git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git". If \fIUSER\fR is "origin"
|
44
|
+
then uses your GitHub login.
|
60
45
|
.
|
61
46
|
.TP
|
62
47
|
\fBgit push\fR \fIREMOTE\-1\fR,\fIREMOTE\-2\fR,...,\fIREMOTE\-N\fR \fIREF\fR
|
@@ -144,6 +129,9 @@ $ git remote add rtomayko
|
|
144
129
|
> git remote add rtomayko git://github.com/rtomayko/CURRENT_REPO.git
|
145
130
|
$ git remote add \-p rtomayko
|
146
131
|
> git remote add rtomayko git@github.com:rtomayko/CURRENT_REPO.git
|
132
|
+
|
133
|
+
$ git remote add origin
|
134
|
+
> git remote add origingit://github.com/YOUR_USER/CURRENT_REPO.git
|
147
135
|
.
|
148
136
|
.fi
|
149
137
|
.
|
data/man/hub.1.html
CHANGED
@@ -66,15 +66,13 @@
|
|
66
66
|
<p><code>hub</code> -- git + hub = github</p>
|
67
67
|
<h2>SYNOPSIS</h2>
|
68
68
|
|
69
|
-
<p><code>hub</code> <var>COMMAND</var> <var>OPTIONS</var>
|
70
|
-
<code>hub alias</code> [<code>-s</code>] <var>SHELL</var>
|
71
|
-
</p>
|
69
|
+
<p><code>hub</code> <var>COMMAND</var> <var>OPTIONS</var>
|
70
|
+
<code>hub alias</code> [<code>-s</code>] <var>SHELL</var></p>
|
72
71
|
|
73
|
-
<p><code>git init -g</code> <var>OPTIONS</var>
|
74
|
-
<code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var>
|
75
|
-
<code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[/<var>REPOSITORY</var>]
|
76
|
-
<code>git browse</code> [<code>-p</code>] [<var>USER</var>/]<var>REPOSITORY</var>
|
77
|
-
</p>
|
72
|
+
<p><code>git init -g</code> <var>OPTIONS</var>
|
73
|
+
<code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var>
|
74
|
+
<code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[/<var>REPOSITORY</var>]
|
75
|
+
<code>git browse</code> [<code>-p</code>] [<var>USER</var>/]<var>REPOSITORY</var></p>
|
78
76
|
|
79
77
|
<h2>DESCRIPTION</h2>
|
80
78
|
|
@@ -114,7 +112,8 @@ your GitHub login. With <code>-p</code>, use private remote
|
|
114
112
|
<dd><p>Add remote "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" as with
|
115
113
|
git-remote(1). When /<var>REPOSITORY</var> is omitted, the basename of the
|
116
114
|
current working directory is used. With <code>-p</code>, use private remote
|
117
|
-
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git"
|
115
|
+
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git". If <var>USER</var> is "origin"
|
116
|
+
then uses your GitHub login.</p></dd>
|
118
117
|
<dt>
|
119
118
|
<code>git push</code> <var>REMOTE-1</var>,<var>REMOTE-2</var>,...,<var>REMOTE-N</var> <var>REF</var>
|
120
119
|
</dt>
|
@@ -176,6 +175,9 @@ $ git clone -p resque
|
|
176
175
|
|
177
176
|
$ git remote add -p rtomayko
|
178
177
|
> git remote add rtomayko git@github.com:rtomayko/CURRENT_REPO.git
|
178
|
+
|
179
|
+
$ git remote add origin
|
180
|
+
> git remote add origingit://github.com/YOUR_USER/CURRENT_REPO.git
|
179
181
|
</code></pre>
|
180
182
|
|
181
183
|
<h3>git init</h3>
|
@@ -232,7 +234,7 @@ $ git help hub
|
|
232
234
|
|
233
235
|
<ol class='foot man'>
|
234
236
|
<li class='tl'>DEFUNKT</li>
|
235
|
-
<li class='tc'>
|
237
|
+
<li class='tc'>February 2010</li>
|
236
238
|
<li class='tr'>hub(1)</li>
|
237
239
|
</ol>
|
238
240
|
|
data/man/hub.1.ron
CHANGED
@@ -3,13 +3,13 @@ hub(1) -- git + hub = github
|
|
3
3
|
|
4
4
|
## SYNOPSIS
|
5
5
|
|
6
|
-
`hub` <COMMAND> <OPTIONS>
|
7
|
-
`hub alias` [`-s`] <SHELL>
|
6
|
+
`hub` <COMMAND> <OPTIONS>
|
7
|
+
`hub alias` [`-s`] <SHELL>
|
8
8
|
|
9
|
-
`git init -g` <OPTIONS>
|
10
|
-
`git clone` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>
|
11
|
-
`git remote add` [`-p`] <OPTIONS> <USER>[/<REPOSITORY>]
|
12
|
-
`git browse` [`-p`] [<USER>/]<REPOSITORY>
|
9
|
+
`git init -g` <OPTIONS>
|
10
|
+
`git clone` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>
|
11
|
+
`git remote add` [`-p`] <OPTIONS> <USER>[/<REPOSITORY>]
|
12
|
+
`git browse` [`-p`] [<USER>/]<REPOSITORY>
|
13
13
|
|
14
14
|
## DESCRIPTION
|
15
15
|
|
@@ -39,7 +39,8 @@ After configuring the alias, the following commands have superpowers:
|
|
39
39
|
Add remote "git://github.com/<USER>/<REPOSITORY>.git" as with
|
40
40
|
git-remote(1). When /<REPOSITORY> is omitted, the basename of the
|
41
41
|
current working directory is used. With `-p`, use private remote
|
42
|
-
"git@github.com:<USER>/<REPOSITORY>.git".
|
42
|
+
"git@github.com:<USER>/<REPOSITORY>.git". If <USER> is "origin"
|
43
|
+
then uses your GitHub login.
|
43
44
|
|
44
45
|
* `git push` <REMOTE-1>,<REMOTE-2>,...,<REMOTE-N> <REF>:
|
45
46
|
Push <REF> to each of <REMOTE-1> through <REMOTE-N> by executing
|
@@ -95,6 +96,9 @@ cloning:
|
|
95
96
|
$ git remote add -p rtomayko
|
96
97
|
> git remote add rtomayko git@github.com:rtomayko/CURRENT_REPO.git
|
97
98
|
|
99
|
+
$ git remote add origin
|
100
|
+
> git remote add origingit://github.com/YOUR_USER/CURRENT_REPO.git
|
101
|
+
|
98
102
|
### git init
|
99
103
|
|
100
104
|
$ git init -g
|
data/test/hub_test.rb
CHANGED
@@ -76,6 +76,18 @@ class HubTest < Test::Unit::TestCase
|
|
76
76
|
assert_command input, command
|
77
77
|
end
|
78
78
|
|
79
|
+
def test_remote_origin
|
80
|
+
input = "remote add origin"
|
81
|
+
command = "git remote add origin git://github.com/tpw/hub.git"
|
82
|
+
assert_command input, command
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_private_remote_origin
|
86
|
+
input = "remote add -p origin"
|
87
|
+
command = "git remote add origin git@github.com:tpw/hub.git"
|
88
|
+
assert_command input, command
|
89
|
+
end
|
90
|
+
|
79
91
|
def test_private_remote
|
80
92
|
input = "remote add -p rtomayko"
|
81
93
|
command = "git remote add rtomayko git@github.com:rtomayko/hub.git"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-hub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-13 00:00:00 -08:00
|
13
13
|
default_executable: hub
|
14
14
|
dependencies: []
|
15
15
|
|