Check if commit is inside branch #24660
-
Hello I’m trying to find a better way to check if a commit is inside a branch the only solution I found is to use compare method from api v3 https://developer.github.com/v3/repos/commits/#compare-two-commits the only problem is that it will return all the diffs, which I don’t want, it could lead to performance issue for large repos. I tried to find a way with graphql too but without success. Have you an idea to how return just the ahead/behind stats or just true/false status like done with
? kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
does anyone has a solution for this ? |
Beta Was this translation helpful? Give feedback.
-
FWIW, I came here looking for the same answer. Is the only available option via CLI? |
Beta Was this translation helpful? Give feedback.
-
finally I used API v3 REST for this use case |
Beta Was this translation helpful? Give feedback.
-
In Git, a branch is a pointer to one specific commit, while a commit is a snapshot of your repository at a specific point in time. Your branch pointer moves along with each new commit you make. |
Beta Was this translation helpful? Give feedback.
-
let me know if you get the ans. thanks |
Beta Was this translation helpful? Give feedback.
finally I used API v3 REST for this use case
graphql is not good for recursive
both APIs are complementay