git_pr 0.0.3.beta2 → 0.0.3.beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/git-pr +5 -1
- data/lib/git_pr/github.rb +4 -0
- data/lib/git_pr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 500d2550b8280131e32a0c1eff8e2057df2191d9
|
4
|
+
data.tar.gz: 5d7efd26e444627c7f9f335a6d5751022bc0c182
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9135813b87b365b3fba2f2728eed74d4490ac57c26270f3fa6fbda853667a2ddce57d2932176e7fea45f5f828d034726438edbc2de32ef7c2f24b9f33ba589c7
|
7
|
+
data.tar.gz: 6bbd1731bf4ca6fc4fff49bc6fc63065b9dde359c0a26e5be3f7bb38e9523d1806b0b9cf53367c05d37183a9b02cb54c0a8ac64bc0d8ef9b41090e8f0f136cbb
|
data/bin/git-pr
CHANGED
@@ -43,7 +43,9 @@ eos
|
|
43
43
|
"--project [REMOTE|PROJECT]",
|
44
44
|
"The GitHub project to access. Can be a named remote, or a GitHub project in",
|
45
45
|
"<user>/<project> form. Defaults to the GitHub project that the \"origin\"",
|
46
|
-
"or \"upstream\" remote points to.
|
46
|
+
"or \"upstream\" remote points to. You can override the default remote",
|
47
|
+
"with git config. Run: 'git config --add pr.defaultremote <remote_name>'"
|
48
|
+
) do |project|
|
47
49
|
options.project = project
|
48
50
|
end
|
49
51
|
opts.on("-h", "--help", "Show help") do
|
@@ -60,6 +62,8 @@ eos
|
|
60
62
|
opts.separator <<eos
|
61
63
|
|
62
64
|
Valid subcommands:
|
65
|
+
diff: Use "git diff" to display a diff for a pull request
|
66
|
+
difftool: Like "diff", but uses "git difftool" instead
|
63
67
|
merge: Merge and close a pull request
|
64
68
|
list: List open pull requests
|
65
69
|
|
data/lib/git_pr/github.rb
CHANGED
@@ -81,8 +81,12 @@ module GitPr
|
|
81
81
|
def self.determine_project_name_from_command_line git, project_name, default_remotes
|
82
82
|
# Figure out what GitHub project we're dealing with. First, did they pass us a name of
|
83
83
|
# an existing remote, or did they pass a GitHub project?
|
84
|
+
default_remote_from_gitconfig = git.config "pr.defaultremote"
|
84
85
|
if project_name
|
85
86
|
project_remote = git.remotes.find { |x| x.name == project_name }
|
87
|
+
elsif default_remote_from_gitconfig
|
88
|
+
puts "Using pr.defaultremote setting '#{default_remote_from_gitconfig}' from gitconfig" if $verbose
|
89
|
+
project_remote = git.remotes.find { |x| x.name == default_remote_from_gitconfig }
|
86
90
|
else
|
87
91
|
project_remote = git.remotes.find { |x| default_remotes.include? x.name }
|
88
92
|
end
|
data/lib/git_pr/version.rb
CHANGED