Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

Repo name #14

Closed
Korporal opened this issue Apr 24, 2017 · 3 comments
Closed

Repo name #14

Korporal opened this issue Apr 24, 2017 · 3 comments

Comments

@Korporal
Copy link

Hi,

Do you think its possible to also get the name of the repo? we have multiple repos and sometimes branch/commit ID is not always obvious to some staff who want to get to our code.

Being able to include repo name would be HUGE for us!

Thx

@ygoe
Copy link
Owner

ygoe commented Apr 24, 2017

For SVN you can determine the repository URL, that's all there is. For Git, you'd first have to specify a remote name to get its URL. Git repositories don't have such a thing as names. Maybe you could use the build machine name instead? That was added in v2.6.

@Korporal
Copy link
Author

Hi @ygoe

Yes you're right but I'd like to at least use the name of the repos root folder, in our team every developer calls their local repos the same name as the upstream repo.

For example this command gives us the path of the repo root folder:

git rev-parse --show-toplevel

if we then stripped off everything but the last component of that path, we'd have the repo folder name.

Is this easy (I've not looked at the code recently, so apologies if this is an easy chg)

@Korporal
Copy link
Author

Hi @ygoe

I created a PR that shows how I made the change in my fork, there may be a better way, but this does the trick for us.

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

No branches or pull requests

2 participants