johan / github-improved

Incremental UI improvements for github.com, in the form of useful user scripts (Google Chrome or Firefox + Greasemonkey), a Chrome and Opera extension.
https://chrome.google.com/webstore/detail/nkbnmpfpclijlllipmfbkkednidgngaa
40 stars 9 forks source link

Label merge base with master when on another branch #1

Open johan opened 13 years ago

johan commented 13 years ago

When on https://github.com/greasemonkey/greasemonkey/commits/0.8 it would be neat to show 533df63175e234ddc61f (its parent commit, actually) as the intersection between the 0.8 branch and master. Maybe a label "master × 0.8" in some colour of its own would look nice.

johan commented 13 years ago

http://developer.github.com/v3/git/ might allow finding the merge-base, and https://github.com/git/git/blob/master/Documentation/git-merge-base.txt plus the https://github.com/git/git/blob/master/builtin/merge-base.c source code, and the get_merge_bases_many https://github.com/git/git/blob/master/commit.c implementation.

git source changes re: get_merge_bases_many, by the way.

johan commented 12 years ago

http://developer.github.com/v3/repos/commits/#compare-two-commits specifically reports the common merge base of two commits (or that one doesn't exist), taking away the need for the above manual procedures.