Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add `hub show` for commits #382

Open
bantu opened this Issue · 7 comments

4 participants

@bantu
afischer@leonard:~$ hub show https://github.com/Prosk8er/phpbb3/commit/b1864431e1e123c71642f9f8378b908a5343bebd
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
afischer@leonard:/var/www/projects/phpbb3 (develop) $ hub show https://github.com/Prosk8er/phpbb3/commit/b1864431e1e123c71642f9f8378b908a5343bebd
fatal: Invalid object name 'https'.

The expected result would be having the commit show just like git show shows commits, i.e.

commit b1864431e1e123c71642f9f8378b908a5343bebd
Author: Prosk8er <prosk8er@gotskillslounge.com>
Date:   Mon Aug 19 10:49:47 2013 -0400

    [ticket/11801] removed some whitespace and added missing semi colon's in css

diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
...
@mislav
Owner

Not sure about this one. You expect this to work even when you don't have the "Prosk8er/phpbb3" repo cloned locally? hub is designed for operations pertaining to the local git repo, so this doesn't fit in that philosophy. The only commands that don't require a local repo are hub clone and hub browse USER/REPO.

And if you have the commit URL, then you just viewed that commit online. Why would you want to view it again in the terminal?

@bantu
@mislav
Owner

Good point about IRC. What happens if you paste a URL that doesn't match the current project?

Care to take a stab at the implementation? It shouldn't be hard.

@bantu

@mislav Not sure when I'll have the time to do this. It has rather low priority for me.

@mislav mislav added the feature label
@glittershark

What about hub show --browse? Way easier than hub browse -- commit/$(git rev-parse HEAD) for refs

@mislav
Owner

@glittershark That's not a bad idea. I wish it were shorter to type, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.