4 ms·
Some explanation of what's happening here: The initial poster posted this link: https://github.com/paritytech/parity/blob/master/js/src/contracts/snippets/enha
by git-pull 9y ago
Some explanation of what's happening here:
The initial poster posted this link: https://github.com/paritytech/parity/blob/master/js/src/contracts/snippets/enhanced-wallet.sol#L216 https://github.com/paritytech/parity/blob/master/js/src/cont...
Where "master" is the branch which normally has the latest code. And #L216 automatically scrolls down to the 216th line.
The issue is that line isn't permanent since the code in the master branch is subject to change. So in order to make a reliable link, you can link to the ref [1].
Like this: https://github.com/paritytech/parity/blob/4c32177ef3f4521c663113749400f5a8b6f0e0d4/js/src/contracts/snippets/enhanced-wallet.sol#L216 https://github.com/paritytech/parity/blob/4c32177ef3f4521c66...
You could also do it with the short ref (4c32177e): https://github.com/paritytech/parity/blob/4c32177e/js/src/contracts/snippets/enhanced-wallet.sol#L216 https://github.com/paritytech/parity/blob/4c32177e/js/src/co...
Normally you'd have to scroll up to the top right of the document and grab the short form it, e.g. "6b0e4f9" and replace it with master. Note that's only the ref of the last change for that blob (file) [2].
If you click the line number on a GitHub file, it will add the #LineNumber to your URL.
From there, press Y, this will replace master with the latest commit of the repo.
[1] https://git-scm.com/book/en/v2/Git-Internals-Git-References https://git-scm.com/book/en/v2/Git-Internals-Git-References
[2] https://git-scm.com/book/en/v2/Git-Internals-Git-Objects https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
- camel_Snake 9y agoThank you for that thorough explanation!
- d21d3q 9y agoBTW, how does y shortcut works? With what is bonded? What effects brings on other sites?
- roryokane 9y agoIt's only for GitHub. GitHub has custom JavaScript on their site that listens to every key press. If they detect you pressed 'y', they look up the commit hash of the version of the code you are looking at and then set the page URL to a page that shows the code for that version.