Mislav Marohnić
9b013c8131
[compare] Allow slash in branch names
...
Ref. #1697
2019-10-01 17:07:26 +02:00
Mislav Marohnić
11f506b4dc
[compare] Improve documentation
2019-10-01 16:54:22 +02:00
Mislav Marohnić
1282f19c71
[compare] Improve upstream branch detection & error messages
...
- Correctly detect when the current branch is pushed to a fork
- Support upstream configuration with full remote URL
- More precise errors instead of just printing usage synopsis:
- no current branch
- the current branch doesn't seem pushed to a remote
- the current branch is the same as the default branch
- `--base` value is the same as current branch
2019-10-01 16:45:53 +02:00
Mislav Marohnić
f5df7cab9f
Passing values for long-form flags is now available without `=`
2019-01-21 21:35:15 +01:00
Mislav Marohnić
33eb313452
Switch `compare` to new args parser
2019-01-18 03:47:48 +01:00
Mislav Marohnić
85d58f9c68
Clarify some other long-form CLI options
2018-12-18 17:50:38 +01:00
Mislav Marohnić
258b700914
Indicate that long-form CLI flags are used like `--message=VALUE`
...
The previous format of documentation made it look like `--message VALUE`
(no equal sign) would be supported, which might be misleading.
2018-12-18 17:49:09 +01:00
Florian Thomas
ab4203ec05
fix `compare` command if not on any branch
...
There is no need to detect the current branch if a range is provided
as an argument.
Fixes #1584 .
2018-10-14 18:24:53 +01:00
Mislav Marohnić
a9a497c53c
Fix `hub compare` for Enterprise when `<USER>` is specified
...
Fixes #1758
2018-06-14 15:06:08 +02:00
Mislav Marohnić
9a2c379042
Allow single-character branches/tag names in `hub compare`
2018-06-14 15:01:49 +02:00
Mislav Marohnić
80a99b8182
Add `hub compare --copy` flag
2018-05-29 17:36:20 +02:00
Mohit Agarwal
b37ac4d5d6
document -b option for compare command
2018-02-15 19:10:42 +05:30
Mislav Marohnić
58ad61db27
Use a shared helper function to print or browse URLs
2016-09-11 04:38:13 +02:00
Mislav Marohnić
0c4689c673
Fix printing content on Windows after successful run
...
The old `args.After("echo", ...)` approach won't cut it on Windows since
there is no `echo` executable. Thus, nothing was printed on Windows.
Instead, expand Args type with extra functionality that allows Go
callbacks after all commands in the chain have been run.
Also, the new `args.NoForward()` is now preferred to `os.Exit()` since
it's more descriptive and allows `defer` in the calling function.
2016-09-10 23:49:58 +02:00
Mislav Marohnić
77a7b059cf
Remove dependecy of `github.Project` to `utils.DirName()`
2016-02-28 19:46:11 +09:00
Mislav Marohnić
fc9fbd4c38
Cross-references galore!
2016-01-25 02:50:01 +11:00
Mislav Marohnić
0a45aa8ddc
Reformat inline command help and expand usage options
2016-01-25 02:30:46 +11:00
Keenan Brock
5355655711
rename gh command to hub in docs
2016-01-19 13:31:47 -05:00
Mislav Marohnić
5d3a687bff
Fix `compare` crash when used on a non-GitHub repo
2015-09-28 16:22:34 +02:00
Mislav Marohnić
654ea9ac10
Update `hub compare` usage documentation
2015-09-26 19:39:32 +02:00
Darin Minamoto
ca2ebbc4e1
Add base option to compare
2015-06-28 16:04:02 -07:00
Mislav Marohnić
60096a263a
URI-encode most characters in branch names for `compare` command
...
It's especially important to encode the `#` character, because it would
get interpreted as a URI fragment identifier. However, we let
`url.QueryEscape` encode any other unsafe characters, except allowing
special characters like `/!:^~` to appear raw. Most of these characters
aren't allowed in branch names anyway, but they can appear as git
revision expressions such as `feature^` or `mislav:feature~3`.
2014-12-24 20:49:21 -08:00
Mislav Marohnić
51979bc6b9
Don't escape slashes in branch names with `;`
2014-07-25 15:02:05 -07:00
Jingwen Owen Ou
0d47b2b45b
Introduce lookup order for origin names
2014-04-09 09:22:20 -07:00
Jingwen Owen Ou
aa9cd23838
Compare compatible
2014-04-07 22:59:56 -07:00
Jingwen Owen Ou
a7badc8c84
Validate git dir when getting local repo
2014-04-01 13:40:02 -07:00
Jingwen Owen Ou
498789a999
Change namespace to github/hub
2014-02-10 08:29:03 -08:00
Jingwen Owen Ou
c18c227af4
Escape slashes in compare URLs with semicolon
...
Pull in Hub compatible fixes in f60fb89274
2014-01-19 06:49:16 -08:00
David Calavera
109fb85818
Use a POSIX compatible flag parser.
...
So we can use flags before and after arguments, and we can group boolean flags, just like git does.
2013-12-29 15:07:58 -08:00
David Calavera
371ae8b432
Add global commands to the runner.
...
- Use a hash to lookup for commands.
- Add more tests for the command and runner execution.
2013-12-29 14:18:14 -08:00
Jingwen Owen Ou
ba6363328e
Pull in cucumber tests from Hub
...
Since 31a85e519e
...master
Some tests are ignored either because they don't make sense or WIP
2013-12-28 01:14:07 -08:00
Jingwen Owen Ou
14b7a0e2ee
Refactor to command.FormattedUsage()
2013-12-14 07:22:23 -08:00
Jingwen Owen Ou
e9df11cd87
Compare is compatible with Hub
2013-12-14 07:13:53 -08:00
Jingwen Owen Ou
5ddd2d45c7
Load multiple configs
2013-12-10 13:42:53 -08:00
Jingwen Owen Ou
76e15dd6a3
Remove PrependParams
2013-07-05 13:51:54 -07:00
Jingwen Owen Ou
61bbf079a8
Fix all comands to aware of noop
2013-07-05 13:45:22 -07:00
Jingwen Owen Ou
87430090a9
Enable noop
2013-07-05 11:10:24 -07:00
Jingwen Owen Ou
e3d6319fa5
Rename to Args#Params
2013-07-02 11:56:45 -07:00
Jingwen Owen Ou
ff5b5ce6d7
Fallthrough to git if no commands match
2013-06-28 16:49:49 -07:00
Jingwen Owen Ou
c294d2b615
Use Args for arguments
2013-06-28 16:49:49 -07:00
Jingwen Owen Ou
73c2877f9b
Run golint
2013-06-10 21:49:45 -07:00
Jingwen Owen Ou
b4c56217ee
Implement gh compare
2013-06-02 17:04:25 -07:00