Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON output and support for all refs/ to +refs #43

Open
GoogleCodeExporter opened this issue Mar 20, 2015 · 4 comments
Open

Add JSON output and support for all refs/ to +refs #43

GoogleCodeExporter opened this issue Mar 20, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link
Collaborator

The current refs listing provided by +refs appears to be limited to refs/heads/ 
and refs/tags/, and doesn't support JSON output. It would be useful to also be 
able to list other refs/. Maybe +refs could default to the current listing, but 
could be extended with an 'ls-remote'-style filter pattern as the path. If the 
JSON output could also include the commit hash of each ref, like ls-remote, 
that would be perfect.

For instance, https://chromium.googlesource.com/external/msysgit/git/+refs only 
shows the branches that we copy into refs/heads/ but there are actually a lot 
more branches that are mirrored from upstream into refs/remotes/upstream/, so 
to get all upstream branches:
https://chromium.googlesource.com/external/msysgit/git/+refs/remotes/upstream/*

or all 'master' branches (both refs/heads/ and refs/remotes/upstream/):
https://chromium.googlesource.com/external/msysgit/git/+refs/*/master

(FWIW, this is needed by some Chrome scripts which currently shell out to a 
local git to run ls-remote, which prevents us from running those scripts on 
appengine.)

Original issue reported on code.google.com by mmoss@chromium.org on 27 Feb 2014 at 5:08

@GoogleCodeExporter
Copy link
Collaborator Author

Already available with format=TEXT:
$ curl -s 
'https://chromium.googlesource.com/external/msysgit/git/+refs?format=TEXT' | 
grep -c refs/remotes
36

I guess we could do JSON if you really want.

Original comment by dborowitz@google.com on 27 Feb 2014 at 5:30

@GoogleCodeExporter
Copy link
Collaborator Author

Ah, thanks, I didn't try that format. That's sufficient for my purposes.

Original comment by mmoss@chromium.org on 27 Feb 2014 at 5:45

@GoogleCodeExporter
Copy link
Collaborator Author

Works great. Feel free to close.

Original comment by mmoss@chromium.org on 27 Feb 2014 at 6:47

@GoogleCodeExporter
Copy link
Collaborator Author

I'll leave this bug open as the description is still accurate, we have neither 
JSON output nor a way to list all refs from the HTML view :)

Original comment by dborowitz@google.com on 27 Feb 2014 at 6:54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant