I've created a plugin that drops a new page into the repository view. For this page I am retrieving commits with the "commitService.traverse" method.
I'm noticing a strange issue where once I approve a PR my new page shows a commit that is neither on the "commits" page nor in the "git log" of a fresh clone.
Here's the screenshot of my page using the "traverse" method.
Screen Shot 2015-02-14 at 12.24.22 PM.png
Here's the screenshot of the "commits" tab.
Screen Shot 2015-02-14 at 12.24.53 PM.png
Anyone know what's going on here?
Community moderators have prevented the ability to post new answers.
Chason,
Stash's traversal is the equivalent of git rev-list --all
. That means everything under refs
is considered, not just refs/heads/master
. In addition to the branches and tags, Stash repositories also have refs/pull-requests
entries, which includes merge
for pull requests that are able to be merged cleanly. The "Automatic merge" you're seeing is one of those. (If you do a git clone --mirror
of the repository, which will include the pull request refs, and run git rev-list --all --pretty=oneline --topo-order
you'll see the same "Automatic merge" in that list.)
On your TraversalRequest
you are not specifying any includes or excludes, which means every commit in the repository will be streamed, including those for open pull requests. If you only want a traversal of refs/heads/master
(or any other branch), you should specify the commit hash for it (not the name) as an explicit include.
Hope this helps,
Bryan Turner
Atlassian Stash
Chason, I'd love to help you improve your plugin. Please reach out to me at bturner-at-atlassian-dot-com.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you give more detail about your call to traverse? What are you passing in, exactly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.