Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/7569#issuecomment-123814178
As a user, I'd like it if the behavior returned me back to whatever
`__git_ps1` displays. Here's an excerpt from the relevant bash code:
```bash
local g="$(git rev-parse --git-dir 2>/dev/null)"
[...]
if ! b="$(git symbolic-ref HEAD 2>/dev/null)"
then
if ! b="$(git describe --exact-match HEAD 2>/dev/null)"
then
b="$(cut -c1-7 "$g/HEAD")..."
fi
fi
```
I think that `__git_ps1`'s policy is something like this:
- If you are checked out to a tag (which can be detected using `git
describe --exact-match HEAD`), then display that tag name.
- Otherwise, grab the identifier from `.git/HEAD`.
- If you are checked out to a branch like `master`, then this will
contain something like `ref: refs/heads/master`, so you'll have to strip off
the appropriate prefix.
- If you are checked out to a detached head, then this will contain only
a SHA.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]