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

Show commits of current branch #293

Closed
borekb opened this issue Feb 22, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@borekb
Copy link

commented Feb 22, 2018

Use case: I want to see a list of commits in my current branch, and just those. Both Show Current Branch History and the branch view in the sidebar list all commits reachable from HEAD which is technically correct but I'm often interested only in "my commits".

The Git command that produces the desired output is

git log $(git merge-base master HEAD)..HEAD

(Most commonly, it can be just git log master..HEAD.)

In the UI, I think this could be another top-level node in the sidebar, something like Current branch.

BTW, it could also be useful for content comparison as there are some usability issues with it current, see e.g. "Compare selected ancestor with working tree" needs "select for compare" #279.

So the sidebar could look like this:

- Current branch
    - Diff
       - ... here is a file tree, introduced in #240 ...
    - Commits
       - [avatar] My second commit
       - [avatar] My first commit
- Branches
- Remotes
- Stashes
- Tags
@eamodio

This comment has been minimized.

Copy link
Owner

commented Feb 22, 2018

Ah interesting, I think the biggest challenge here, is picking the branch that is the base -- here you are always using master, but that isn't always the case.

@borekb

This comment has been minimized.

Copy link
Author

commented Feb 22, 2018

You're right. git-tree-compare deals with that using Change Base...:

image

@jabacchetta

This comment has been minimized.

Copy link

commented Feb 1, 2019

For reference, the "commits behind master" view that Bitbucket gives is helpful, and I believe this feature would essentially be the equivalent.

@eamodio

This comment has been minimized.

Copy link
Owner

commented May 16, 2019

@borekb I've added a new experimental new Compare with... node to each repository. It will let you pick the comparison and it persists based on the workspace/repo/branch. You must set "gitlens.insiders": true before it will show up.

gitlens-9.7.4.vsix.zip

Could you try it out and let me know if this will solve this issue for you? Thanks!

@eamodio eamodio self-assigned this May 16, 2019

@eamodio eamodio added this to the Soon™ milestone May 16, 2019

@borekb

This comment has been minimized.

Copy link
Author

commented May 16, 2019

Thanks, I like the contents of that node but I'd prefer if this was just directly under the branch. Here's how I see it:

Screenshot 2019-05-16 at 09 06 14

I understand the challenge with the "base branch" but still think this can be a global setting as per #293 (comment).

@eamodio

This comment has been minimized.

Copy link
Owner

commented May 22, 2019

While I see what you are saying, I find the branch history regularly quite valuable. In 9.8 I've add the new comparison node similar to the above. Hopefully that meets your need closely enough.

@eamodio eamodio closed this May 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.