-
Notifications
You must be signed in to change notification settings - Fork 340
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 a variable for showing repo name #65
base: master
Are you sure you want to change the base?
Conversation
IMHO this is kind of useless; it uses the local file system to assume that you checked it out in a way that matches the repo name. Personally, I almost never do that. I think it would be much more useful if it used this instead: (The quotes are if, for some reason I can't think of, they undefined 'origin'; it will return blank.) |
Hi @AaronDMarasco-VSI, thanks for looking at this. I guess everyone has their own way of using Git. Personally, I always check out repositories using git clone so the local directory name does match, but my remote isn't always called "origin". However, we should be able to make it robust to both use cases. How about something like this:
|
@paulaltin that sounds good to me if you add some inline comments to each concerning what you're trying to compute (I know That said, I'm just a bystander here; I have no special privs on this repo. |
OK, I've updated it and added some inline comments. Thanks for your input @AaronDMarasco-VSI |
@paulaltin No need it, if repo name is huge then its gonna annoy. Ignore, nor add into alternate preferences, do not suggest it to make it default. Default: |
|
I find that when working with multiple repositories – or especially with git submodules – it can be useful to see in the prompt which one I'm currently in. (This will often be the current working directory, but not always.)