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

Prefer commit IDs over branch names when generating URLs? #2

Open
mjcheetham opened this issue Aug 1, 2018 · 1 comment
Open

Prefer commit IDs over branch names when generating URLs? #2

mjcheetham opened this issue Aug 1, 2018 · 1 comment
Labels
question Further information is requested

Comments

@mjcheetham
Copy link
Owner

Should we prefer generating URLs with a specific commit ID rather than a branch name?

A branch isn't stable over time and old generated links (especially those with selection information) will therefore break as the file's contents changes.

If we decided to do this (prefer commit ID) do we also want to provide an option "try and resolve to branch name" for those users who do want a link to the branch?

@mjcheetham mjcheetham added the question Further information is requested label Aug 1, 2018
@ipmsteven
Copy link
Contributor

Hi Matthew, I prefer commit SHA over branch name when locating a change in git, as you mentioned that branch is more like pointer that is always changing(like master branch), while SHA is a unique identifier.

BTW: do you have a use case which a branch name have to be used instead of SHA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants