hub 1.10.6 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of hub might be problematic. Click here for more details.

@@ -0,0 +1,107 @@
1
+ prevent_require = lambda do |name|
2
+ $" << "#{name}.rb"
3
+ require name # hax to avoid Ruby 2.0.0 bug
4
+ end
5
+
6
+ unless defined?(CGI)
7
+ prevent_require.call 'cgi'
8
+
9
+ module CGI
10
+ ESCAPE_RE = /[^a-zA-Z0-9 .~_-]/
11
+
12
+ def self.escape(s)
13
+ s.to_s.gsub(ESCAPE_RE) {|match|
14
+ '%' + match.unpack('H2' * match.bytesize).join('%').upcase
15
+ }.tr(' ', '+')
16
+ end
17
+
18
+ def self.unescape(s)
19
+ s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/) {
20
+ [$1.delete('%')].pack('H*')
21
+ }
22
+ end
23
+ end
24
+ end
25
+
26
+ unless defined?(URI)
27
+ prevent_require.call 'uri'
28
+
29
+ Kernel.module_eval do
30
+ def URI(str)
31
+ URI.parse(str)
32
+ end
33
+ end
34
+
35
+ module URI
36
+ InvalidURIError = Class.new(StandardError)
37
+
38
+ def self.parse(str)
39
+ URI::HTTP.new(str)
40
+ end
41
+
42
+ def self.encode_www_form(params)
43
+ params.map { |k, v|
44
+ if v.class == Array
45
+ encode_www_form(v.map { |x| [k, x] })
46
+ else
47
+ ek = CGI.escape(k)
48
+ v.nil? ? ek : "#{ek}=#{CGI.escape(v)}"
49
+ end
50
+ }.join("&")
51
+ end
52
+
53
+ def self.===(other)
54
+ other.respond_to?(:host)
55
+ end
56
+
57
+ class HTTP
58
+ attr_accessor :scheme, :user, :password, :host, :path, :query, :fragment
59
+ attr_writer :port
60
+ alias hostname host
61
+
62
+ def initialize(str)
63
+ m = str.to_s.match(%r{^ ([\w-]+): // (?:([^/@]+)@)? ([^/?#]+) }x)
64
+ raise InvalidURIError unless m
65
+ _, self.scheme, self.userinfo, host = m.to_a
66
+ self.host, self.port = host.split(':', 2)
67
+ path, self.fragment = m.post_match.split('#', 2)
68
+ self.path, self.query = path.to_s.split('?', 2)
69
+ end
70
+
71
+ def to_s
72
+ url = "#{scheme}://"
73
+ url << "#{userinfo}@" if user || password
74
+ url << host
75
+ url << ":#{@port}" if @port
76
+ url << path
77
+ url << "?#{query}" if query
78
+ url << "##{fragment}" if fragment
79
+ url
80
+ end
81
+
82
+ def request_uri
83
+ url = path
84
+ url += "?#{query}" if query
85
+ url
86
+ end
87
+
88
+ def port
89
+ (@port || (scheme == 'https' ? 443 : 80)).to_i
90
+ end
91
+
92
+ def userinfo=(info)
93
+ self.user, self.password = info.to_s.split(':', 2)
94
+ info
95
+ end
96
+
97
+ def userinfo
98
+ if password then "#{user}:#{password}"
99
+ elsif user then user
100
+ end
101
+ end
102
+
103
+ def find_proxy
104
+ end
105
+ end
106
+ end
107
+ end
@@ -8,7 +8,7 @@ module Hub
8
8
  @settings = Hash.new {|h,k| h[k] = {} }
9
9
  Array(files || CONFIG_FILES).each do |path|
10
10
  file = File.expand_path path
11
- parse_file file if File.exist? file
11
+ parse_file file if File.readable?(file)
12
12
  end
13
13
  end
14
14
 
@@ -9,7 +9,7 @@ module Hub
9
9
  # This file is generated code. DO NOT send patches for it.
10
10
  #
11
11
  # Original source files with comments are at:
12
- # https://github.com/defunkt/hub
12
+ # https://github.com/github/hub
13
13
  #
14
14
 
15
15
  preamble
@@ -23,12 +23,18 @@ preamble
23
23
  end
24
24
 
25
25
  def build io
26
- io.puts "#!#{ruby_executable}"
26
+ io.puts "#!#{ruby_shebang}"
27
27
  io << PREAMBLE
28
28
 
29
29
  each_source_file do |filename|
30
30
  File.open(filename, 'r') do |source|
31
- source.each_line {|line| io << line if line !~ /^\s*#/ }
31
+ source.each_line do |line|
32
+ next if line =~ /^\s*#/
33
+ if line.include?(' VERSION =')
34
+ line.sub!(/'(.+?)'/, "'#{detailed_version}'")
35
+ end
36
+ io << line
37
+ end
32
38
  end
33
39
  io.puts ''
34
40
  end
@@ -48,6 +54,18 @@ preamble
48
54
  end
49
55
  end
50
56
 
57
+ def detailed_version
58
+ version = `git describe --tags HEAD 2>/dev/null`.chomp
59
+ if version.empty?
60
+ version = Hub::VERSION
61
+ head_sha = `git rev-parse --short HEAD 2>/dev/null`.chomp
62
+ version += "-g#{head_sha}" unless head_sha.empty?
63
+ version
64
+ else
65
+ version.sub(/^v/, '')
66
+ end
67
+ end
68
+
51
69
  def ruby_executable
52
70
  if File.executable? '/usr/bin/ruby' then '/usr/bin/ruby'
53
71
  else
@@ -55,5 +73,15 @@ preamble
55
73
  File.join RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']
56
74
  end
57
75
  end
76
+
77
+ def ruby_shebang
78
+ ruby = ruby_executable
79
+ `#{ruby_executable} --disable-gems -e0 2>/dev/null`
80
+ if $?.success?
81
+ "#{ruby} --disable-gems"
82
+ else
83
+ ruby
84
+ end
85
+ end
58
86
  end
59
87
  end
data/lib/hub/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hub
2
- Version = VERSION = '1.10.6'
2
+ Version = VERSION = '1.11.0'
3
3
  end
data/man/hub.1 CHANGED
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "HUB" "1" "March 2013" "DEFUNKT" "Git Manual"
4
+ .TH "HUB" "1" "December 2013" "GITHUB" "Hub Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBhub\fR \- git + hub = github
@@ -55,13 +55,16 @@
55
55
  \fBgit browse\fR [\fB\-u\fR] [[\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR] [SUBPAGE]
56
56
  .
57
57
  .br
58
- \fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [\fISTART\fR\.\.\.]\fIEND\fR
58
+ \fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [[\fISTART\fR\.\.\.]\fIEND\fR]
59
59
  .
60
60
  .br
61
61
  \fBgit fork\fR [\fB\-\-no\-remote\fR]
62
62
  .
63
63
  .br
64
- \fBgit pull\-request\fR [\fB\-f\fR] [\fITITLE\fR|\fB\-i\fR \fIISSUE\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]
64
+ \fBgit pull\-request\fR [\fB\-f\fR] [\fB\-m\fR \fIMESSAGE\fR|\fB\-F\fR \fIFILE\fR|\fB\-i\fR \fIISSUE\fR|\fIISSUE\-URL\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]
65
+ .
66
+ .br
67
+ \fBgit ci\-status\fR [\fB\-v\fR] [\fICOMMIT\fR]
65
68
  .
66
69
  .SH "DESCRIPTION"
67
70
  hub enhances various git commands to ease most common workflows with GitHub\.
@@ -80,7 +83,10 @@ Create a git repository as with git\-init(1) and add remote \fBorigin\fR at "git
80
83
  .
81
84
  .TP
82
85
  \fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR \fIDIRECTORY\fR
83
- Clone repository "git://github\.com/\fIUSER\fR/\fIREPOSITORY\fR\.git" into \fIDIRECTORY\fR as with git\-clone(1)\. When \fIUSER\fR/ is omitted, assumes your GitHub login\. With \fB\-p\fR, clone private repositories over SSH\. For repositories under your GitHub login, \fB\-p\fR is implicit\.
86
+ Clone repository "git://github\.com/\fIUSER\fR/\fIREPOSITORY\fR\.git" into \fIDIRECTORY\fR as with git\-clone(1)\. When \fIUSER\fR/ is omitted, assumes your GitHub login\.
87
+ .
88
+ .IP
89
+ If the repository is private or the current user has push access to the repository, hub will use the ssh protocol for cloning\. Use \fB\-p\fR to select the ssh protocol unconditionally\. HTTPS protocol can be used instead by setting "hub\.protocol" (see \fICONFIGURATION\fR)\.
84
90
  .
85
91
  .TP
86
92
  \fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[\fB/\fR\fIREPOSITORY\fR]
@@ -131,25 +137,35 @@ Create a new public GitHub repository from the current git repository and add re
131
137
  .
132
138
  .TP
133
139
  \fBgit browse\fR [\fB\-u\fR] [[\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR] [SUBPAGE]
134
- Open repository\'s GitHub page in the system\'s default web browser using \fBopen(1)\fR or the \fBBROWSER\fR env variable\. If the repository isn\'t specified, \fBbrowse\fR opens the page of the repository found in the current directory\. If SUBPAGE is specified, the browser will open on the specified subpage: one of "wiki", "commits", "issues" or other (the default is "tree")\.
140
+ Open repository\'s GitHub page in the system\'s default web browser using \fBopen(1)\fR or the \fBBROWSER\fR env variable\. If the repository isn\'t specified, \fBbrowse\fR opens the page of the repository found in the current directory\. If SUBPAGE is specified, the browser will open on the specified subpage: one of "wiki", "commits", "issues" or other (the default is "tree")\. With \fB\-u\fR, outputs the URL rather than opening the browser\.
135
141
  .
136
142
  .TP
137
- \fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [\fISTART\fR\.\.\.]\fIEND\fR
138
- Open a GitHub compare view page in the system\'s default web browser\. \fISTART\fR to \fIEND\fR are branch names, tag names, or commit SHA1s specifying the range of history to compare\. If a range with two dots (\fBa\.\.b\fR) is given, it will be transformed into one with three dots\. If \fISTART\fR is omitted, GitHub will compare against the base branch (the default is "master")\.
143
+ \fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [[\fISTART\fR\.\.\.]\fIEND\fR]
144
+ Open a GitHub compare view page in the system\'s default web browser\. \fISTART\fR to \fIEND\fR are branch names, tag names, or commit SHA1s specifying the range of history to compare\. If a range with two dots (\fBa\.\.b\fR) is given, it will be transformed into one with three dots\. If \fISTART\fR is omitted, GitHub will compare against the base branch (the default is "master")\. If \fIEND\fR is omitted, GitHub compare view is opened for the current branch\. With \fB\-u\fR, outputs the URL rather than opening the browser\.
139
145
  .
140
146
  .TP
141
147
  \fBgit fork\fR [\fB\-\-no\-remote\fR]
142
148
  Forks the original project (referenced by "origin" remote) on GitHub and adds a new remote for it under your username\.
143
149
  .
144
150
  .TP
145
- \fBgit pull\-request\fR [\fB\-f\fR] [\fITITLE\fR|\fB\-i\fR \fIISSUE\fR|\fIISSUE\-URL\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]
151
+ \fBgit pull\-request\fR [\fB\-f\fR] [\fB\-m\fR \fIMESSAGE\fR|\fB\-F\fR \fIFILE\fR|\fB\-i\fR \fIISSUE\fR|\fIISSUE\-URL\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]
146
152
  Opens a pull request on GitHub for the project that the "origin" remote points to\. The default head of the pull request is the current branch\. Both base and head of the pull request can be explicitly given in one of the following formats: "branch", "owner:branch", "owner/repo:branch"\. This command will abort operation if it detects that the current topic branch has local commits that are not yet pushed to its upstream branch on the remote\. To skip this check, use \fB\-f\fR\.
147
153
  .
148
154
  .IP
149
- If \fITITLE\fR is omitted, a text editor will open in which title and body of the pull request can be entered in the same manner as git commit message\.
155
+ Without \fIMESSAGE\fR or \fIFILE\fR, a text editor will open in which title and body of the pull request can be entered in the same manner as git commit message\. Pull request message can also be passed via stdin with \fB\-F \-\fR\.
150
156
  .
151
157
  .IP
152
- If instead of normal \fITITLE\fR an issue number is given with \fB\-i\fR, the pull request will be attached to an existing GitHub issue\. Alternatively, instead of title you can paste a full URL to an issue on GitHub\.
158
+ Issue to pull request conversion via \fB\-i <ISSUE>\fR or \fIISSUE\-URL\fR arguments is deprecated and will likely be removed from the future versions of both hub and GitHub API\.
159
+ .
160
+ .TP
161
+ \fBgit ci\-status\fR [\fB\-v\fR] [\fICOMMIT\fR]
162
+ Looks up the SHA for \fICOMMIT\fR in GitHub Status API and displays the latest status\. Exits with one of:
163
+ .
164
+ .br
165
+ success (0), error (1), failure (1), pending (2), no status (3)
166
+ .
167
+ .IP
168
+ If \fB\-v\fR is given, additionally print the URL to CI build results\.
153
169
  .
154
170
  .SH "CONFIGURATION"
155
171
  Hub will prompt for GitHub username & password the first time it needs to access the API and exchange it for an OAuth token, which it saves in "~/\.config/hub"\.
@@ -266,15 +282,15 @@ $ git cherry\-pick mislav@SHA
266
282
  .nf
267
283
 
268
284
  $ git am https://github\.com/defunkt/hub/pull/55
269
- > curl https://github\.com/defunkt/hub/pull/55\.patch \-o /tmp/55\.patch
285
+ [ downloads patch via API ]
270
286
  > git am /tmp/55\.patch
271
287
 
272
288
  $ git am \-\-ignore\-whitespace https://github\.com/davidbalbert/hub/commit/fdb9921
273
- > curl https://github\.com/davidbalbert/hub/commit/fdb9921\.patch \-o /tmp/fdb9921\.patch
289
+ [ downloads patch via API ]
274
290
  > git am \-\-ignore\-whitespace /tmp/fdb9921\.patch
275
291
 
276
292
  $ git apply https://gist\.github\.com/8da7fb575debd88c54cf
277
- > curl https://gist\.github\.com/8da7fb575debd88c54cf\.txt \-o /tmp/gist\-8da7fb575debd88c54cf\.txt
293
+ [ downloads patch via API ]
278
294
  > git apply /tmp/gist\-8da7fb575debd88c54cf\.txt
279
295
  .
280
296
  .fi
@@ -299,10 +315,7 @@ $ git pull\-request
299
315
  [ opened pull request on GitHub for "YOUR_USER:feature" ]
300
316
 
301
317
  # explicit title, pull base & head:
302
- $ git pull\-request "I\'ve implemented feature X" \-b defunkt:master \-h mislav:feature
303
-
304
- $ git pull\-request \-i 123
305
- [ attached pull request to issue #123 ]
318
+ $ git pull\-request \-m "Implemented feature X" \-b defunkt:master \-h mislav:feature
306
319
  .
307
320
  .fi
308
321
  .
@@ -419,17 +432,27 @@ $ git compare other\-user patch
419
432
  .
420
433
  .nf
421
434
 
422
- $ hub submodule add wycats/bundler vendor/bundler
435
+ $ git submodule add wycats/bundler vendor/bundler
423
436
  > git submodule add git://github\.com/wycats/bundler\.git vendor/bundler
424
437
 
425
- $ hub submodule add \-p wycats/bundler vendor/bundler
438
+ $ git submodule add \-p wycats/bundler vendor/bundler
426
439
  > git submodule add git@github\.com:wycats/bundler\.git vendor/bundler
427
440
 
428
- $ hub submodule add \-b ryppl \-\-name pip ryppl/pip vendor/pip
441
+ $ git submodule add \-b ryppl \-\-name pip ryppl/pip vendor/pip
429
442
  > git submodule add \-b ryppl \-\-name pip git://github\.com/ryppl/pip\.git vendor/pip
430
443
  .
431
444
  .fi
432
445
  .
446
+ .SS "git ci\-status"
447
+ .
448
+ .nf
449
+
450
+ $ git ci\-status [commit]
451
+ > (prints CI state of commit and exits with appropriate code)
452
+ > One of: success (0), error (1), failure (1), pending (2), no status (3)
453
+ .
454
+ .fi
455
+ .
433
456
  .SS "git help"
434
457
  .
435
458
  .nf
@@ -442,10 +465,10 @@ $ git help hub
442
465
  .fi
443
466
  .
444
467
  .SH "BUGS"
445
- \fIhttps://github\.com/defunkt/hub/issues\fR
468
+ \fIhttps://github\.com/github/hub/issues\fR
446
469
  .
447
470
  .SH "AUTHORS"
448
- \fIhttps://github\.com/defunkt/hub/contributors\fR
471
+ \fIhttps://github\.com/github/hub/contributors\fR
449
472
  .
450
473
  .SH "SEE ALSO"
451
- git(1), git\-clone(1), git\-remote(1), git\-init(1), \fIhttp://github\.com\fR, \fIhttps://github\.com/defunkt/hub\fR
474
+ git(1), git\-clone(1), git\-remote(1), git\-init(1), \fIhttp://github\.com\fR, \fIhttps://github\.com/github/hub\fR
data/man/hub.1.html CHANGED
@@ -65,7 +65,7 @@
65
65
 
66
66
  <ol class='man-decor man-head man head'>
67
67
  <li class='tl'>hub(1)</li>
68
- <li class='tc'>Git Manual</li>
68
+ <li class='tc'>Hub Manual</li>
69
69
  <li class='tr'>hub(1)</li>
70
70
  </ol>
71
71
 
@@ -98,9 +98,10 @@
98
98
 
99
99
  <p><code>git create</code> [<var>NAME</var>] [<code>-p</code>] [<code>-d</code> <var>DESCRIPTION</var>] [<code>-h</code> <var>HOMEPAGE</var>]<br />
100
100
  <code>git browse</code> [<code>-u</code>] [[<var>USER</var><code>/</code>]<var>REPOSITORY</var>] [SUBPAGE]<br />
101
- <code>git compare</code> [<code>-u</code>] [<var>USER</var>] [<var>START</var>...]<var>END</var><br />
101
+ <code>git compare</code> [<code>-u</code>] [<var>USER</var>] [[<var>START</var>...]<var>END</var>]<br />
102
102
  <code>git fork</code> [<code>--no-remote</code>]<br />
103
- <code>git pull-request</code> [<code>-f</code>] [<var>TITLE</var>|<code>-i</code> <var>ISSUE</var>] [<code>-b</code> <var>BASE</var>] [<code>-h</code> <var>HEAD</var>]</p>
103
+ <code>git pull-request</code> [<code>-f</code>] [<code>-m</code> <var>MESSAGE</var>|<code>-F</code> <var>FILE</var>|<code>-i</code> <var>ISSUE</var>|<var>ISSUE-URL</var>] [<code>-b</code> <var>BASE</var>] [<code>-h</code> <var>HEAD</var>]<br />
104
+ <code>git ci-status</code> [<code>-v</code>] [<var>COMMIT</var>]</p>
104
105
 
105
106
  <h2 id="DESCRIPTION">DESCRIPTION</h2>
106
107
 
@@ -117,8 +118,12 @@ variable. With <code>-s</code>, outputs shell script suitable for <code>eval</c
117
118
  <var>REPOSITORY</var> is the current working directory's basename.</p></dd>
118
119
  <dt><code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var><code>/</code>]<var>REPOSITORY</var> <var>DIRECTORY</var></dt><dd><p>Clone repository "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" into
119
120
  <var>DIRECTORY</var> as with <span class="man-ref">git-clone<span class="s">(1)</span></span>. When <var>USER</var>/ is omitted, assumes
120
- your GitHub login. With <code>-p</code>, clone private repositories over SSH.
121
- For repositories under your GitHub login, <code>-p</code> is implicit.</p></dd>
121
+ your GitHub login.</p>
122
+
123
+ <p>If the repository is private or the current user has push access to the
124
+ repository, hub will use the ssh protocol for cloning. Use <code>-p</code> to select
125
+ the ssh protocol unconditionally. HTTPS protocol can be used instead by
126
+ setting "hub.protocol" (see <var>CONFIGURATION</var>).</p></dd>
122
127
  <dt><code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[<code>/</code><var>REPOSITORY</var>]</dt><dd><p>Add remote "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" as with
123
128
  <span class="man-ref">git-remote<span class="s">(1)</span></span>. When /<var>REPOSITORY</var> is omitted, the basename of the
124
129
  current working directory is used. With <code>-p</code>, use private remote
@@ -169,15 +174,17 @@ set the repository's description and homepage URL, respectively.</p></dd>
169
174
  specified, <code>browse</code> opens the page of the repository found in the current
170
175
  directory. If SUBPAGE is specified, the browser will open on the specified
171
176
  subpage: one of "wiki", "commits", "issues" or other (the default is
172
- "tree").</p></dd>
173
- <dt><code>git compare</code> [<code>-u</code>] [<var>USER</var>] [<var>START</var>...]<var>END</var></dt><dd><p>Open a GitHub compare view page in the system's default web browser.
177
+ "tree"). With <code>-u</code>, outputs the URL rather than opening the browser.</p></dd>
178
+ <dt><code>git compare</code> [<code>-u</code>] [<var>USER</var>] [[<var>START</var>...]<var>END</var>]</dt><dd><p>Open a GitHub compare view page in the system's default web browser.
174
179
  <var>START</var> to <var>END</var> are branch names, tag names, or commit SHA1s specifying
175
180
  the range of history to compare. If a range with two dots (<code>a..b</code>) is given,
176
181
  it will be transformed into one with three dots. If <var>START</var> is omitted,
177
- GitHub will compare against the base branch (the default is "master").</p></dd>
182
+ GitHub will compare against the base branch (the default is "master").
183
+ If <var>END</var> is omitted, GitHub compare view is opened for the current branch.
184
+ With <code>-u</code>, outputs the URL rather than opening the browser.</p></dd>
178
185
  <dt><code>git fork</code> [<code>--no-remote</code>]</dt><dd><p>Forks the original project (referenced by "origin" remote) on GitHub and
179
186
  adds a new remote for it under your username.</p></dd>
180
- <dt><code>git pull-request</code> [<code>-f</code>] [<var>TITLE</var>|<code>-i</code> <var>ISSUE</var>|<var>ISSUE-URL</var>] [<code>-b</code> <var>BASE</var>] [<code>-h</code> <var>HEAD</var>]</dt><dd><p>Opens a pull request on GitHub for the project that the "origin" remote
187
+ <dt><code>git pull-request</code> [<code>-f</code>] [<code>-m</code> <var>MESSAGE</var>|<code>-F</code> <var>FILE</var>|<code>-i</code> <var>ISSUE</var>|<var>ISSUE-URL</var>] [<code>-b</code> <var>BASE</var>] [<code>-h</code> <var>HEAD</var>]</dt><dd><p>Opens a pull request on GitHub for the project that the "origin" remote
181
188
  points to. The default head of the pull request is the current branch.
182
189
  Both base and head of the pull request can be explicitly given in one of
183
190
  the following formats: "branch", "owner:branch", "owner/repo:branch".
@@ -185,12 +192,18 @@ This command will abort operation if it detects that the current topic
185
192
  branch has local commits that are not yet pushed to its upstream branch
186
193
  on the remote. To skip this check, use <code>-f</code>.</p>
187
194
 
188
- <p>If <var>TITLE</var> is omitted, a text editor will open in which title and body of
189
- the pull request can be entered in the same manner as git commit message.</p>
195
+ <p>Without <var>MESSAGE</var> or <var>FILE</var>, a text editor will open in which title and body
196
+ of the pull request can be entered in the same manner as git commit message.
197
+ Pull request message can also be passed via stdin with <code>-F -</code>.</p>
198
+
199
+ <p>Issue to pull request conversion via <code>-i &lt;ISSUE></code> or <var>ISSUE-URL</var>
200
+ arguments is deprecated and will likely be removed from the future versions
201
+ of both hub and GitHub API.</p></dd>
202
+ <dt><code>git ci-status</code> [<code>-v</code>] [<var>COMMIT</var>]</dt><dd><p>Looks up the SHA for <var>COMMIT</var> in GitHub Status API and displays the latest
203
+ status. Exits with one of:<br />
204
+ success (0), error (1), failure (1), pending (2), no status (3)</p>
190
205
 
191
- <p>If instead of normal <var>TITLE</var> an issue number is given with <code>-i</code>, the pull
192
- request will be attached to an existing GitHub issue. Alternatively, instead
193
- of title you can paste a full URL to an issue on GitHub.</p></dd>
206
+ <p>If <code>-v</code> is given, additionally print the URL to CI build results.</p></dd>
194
207
  </dl>
195
208
 
196
209
 
@@ -282,15 +295,15 @@ $ git cherry-pick mislav@SHA
282
295
  <h3 id="git-am-git-apply">git am, git apply</h3>
283
296
 
284
297
  <pre><code>$ git am https://github.com/defunkt/hub/pull/55
285
- &gt; curl https://github.com/defunkt/hub/pull/55.patch -o /tmp/55.patch
298
+ [ downloads patch via API ]
286
299
  &gt; git am /tmp/55.patch
287
300
 
288
301
  $ git am --ignore-whitespace https://github.com/davidbalbert/hub/commit/fdb9921
289
- &gt; curl https://github.com/davidbalbert/hub/commit/fdb9921.patch -o /tmp/fdb9921.patch
302
+ [ downloads patch via API ]
290
303
  &gt; git am --ignore-whitespace /tmp/fdb9921.patch
291
304
 
292
305
  $ git apply https://gist.github.com/8da7fb575debd88c54cf
293
- &gt; curl https://gist.github.com/8da7fb575debd88c54cf.txt -o /tmp/gist-8da7fb575debd88c54cf.txt
306
+ [ downloads patch via API ]
294
307
  &gt; git apply /tmp/gist-8da7fb575debd88c54cf.txt
295
308
  </code></pre>
296
309
 
@@ -309,10 +322,7 @@ $ git pull-request
309
322
  [ opened pull request on GitHub for "YOUR_USER:feature" ]
310
323
 
311
324
  # explicit title, pull base &amp; head:
312
- $ git pull-request "I've implemented feature X" -b defunkt:master -h mislav:feature
313
-
314
- $ git pull-request -i 123
315
- [ attached pull request to issue #123 ]
325
+ $ git pull-request -m "Implemented feature X" -b defunkt:master -h mislav:feature
316
326
  </code></pre>
317
327
 
318
328
  <h3 id="git-checkout">git checkout</h3>
@@ -405,16 +415,23 @@ $ git compare other-user patch
405
415
 
406
416
  <h3 id="git-submodule">git submodule</h3>
407
417
 
408
- <pre><code>$ hub submodule add wycats/bundler vendor/bundler
418
+ <pre><code>$ git submodule add wycats/bundler vendor/bundler
409
419
  &gt; git submodule add git://github.com/wycats/bundler.git vendor/bundler
410
420
 
411
- $ hub submodule add -p wycats/bundler vendor/bundler
421
+ $ git submodule add -p wycats/bundler vendor/bundler
412
422
  &gt; git submodule add git@github.com:wycats/bundler.git vendor/bundler
413
423
 
414
- $ hub submodule add -b ryppl --name pip ryppl/pip vendor/pip
424
+ $ git submodule add -b ryppl --name pip ryppl/pip vendor/pip
415
425
  &gt; git submodule add -b ryppl --name pip git://github.com/ryppl/pip.git vendor/pip
416
426
  </code></pre>
417
427
 
428
+ <h3 id="git-ci-status">git ci-status</h3>
429
+
430
+ <pre><code>$ git ci-status [commit]
431
+ &gt; (prints CI state of commit and exits with appropriate code)
432
+ &gt; One of: success (0), error (1), failure (1), pending (2), no status (3)
433
+ </code></pre>
434
+
418
435
  <h3 id="git-help">git help</h3>
419
436
 
420
437
  <pre><code>$ git help
@@ -425,22 +442,22 @@ $ git help hub
425
442
 
426
443
  <h2 id="BUGS">BUGS</h2>
427
444
 
428
- <p><a href="https://github.com/defunkt/hub/issues" data-bare-link="true">https://github.com/defunkt/hub/issues</a></p>
445
+ <p><a href="https://github.com/github/hub/issues" data-bare-link="true">https://github.com/github/hub/issues</a></p>
429
446
 
430
447
  <h2 id="AUTHORS">AUTHORS</h2>
431
448
 
432
- <p><a href="https://github.com/defunkt/hub/contributors" data-bare-link="true">https://github.com/defunkt/hub/contributors</a></p>
449
+ <p><a href="https://github.com/github/hub/contributors" data-bare-link="true">https://github.com/github/hub/contributors</a></p>
433
450
 
434
451
  <h2 id="SEE-ALSO">SEE ALSO</h2>
435
452
 
436
453
  <p><span class="man-ref">git<span class="s">(1)</span></span>, <span class="man-ref">git-clone<span class="s">(1)</span></span>, <span class="man-ref">git-remote<span class="s">(1)</span></span>, <span class="man-ref">git-init<span class="s">(1)</span></span>,
437
454
  <a href="http://github.com" data-bare-link="true">http://github.com</a>,
438
- <a href="https://github.com/defunkt/hub" data-bare-link="true">https://github.com/defunkt/hub</a></p>
455
+ <a href="https://github.com/github/hub" data-bare-link="true">https://github.com/github/hub</a></p>
439
456
 
440
457
 
441
458
  <ol class='man-decor man-foot man foot'>
442
- <li class='tl'>DEFUNKT</li>
443
- <li class='tc'>March 2013</li>
459
+ <li class='tl'>GITHUB</li>
460
+ <li class='tc'>December 2013</li>
444
461
  <li class='tr'>hub(1)</li>
445
462
  </ol>
446
463