Coder Social home page Coder Social logo

Comments (4)

j4yk avatar j4yk commented on June 24, 2024 1

Especially the latter two points would consume quite an amount of screen real estate, and the branch list is rather narrow by default today. It might require another tool that gives more details about branches.

Also note that Git has zero knowledge about "parent" branches because commits do not carry the information on which branch they were created. So all that would be conceivable is a heuristic to guess which of the following branches might be the "correct" parent branch: main, release/1.0.0, release/1.1.0, feature/the-next-big-thing, or anything else that was "forked" after the feature branch but has a common history with it.

Yes, I also call those "uncommitted" changes "stashed changes" even though it might confuse somebody else because this does not use the Git stash.

from squot.

LinqLover avatar LinqLover commented on June 24, 2024

Especially the latter two points would consume quite an amount of screen real estate, and the branch list is rather narrow by default today. It might require another tool that gives more details about branches.

What about a simple tooltip, plus maybe an icon indicating that there is at least one different commit?

Also note that Git has zero knowledge about "parent" branches because commits do not carry the information on which branch they were created. So all that would be conceivable is a heuristic to guess which of the following branches might be the "correct" parent branch: main, release/1.0.0, release/1.1.0, feature/the-next-big-thing, or anything else that was "forked" after the feature branch but has a common history with it.

Sure, you're right ... probably too many heuristics ... GitHub does have this information (PR target branch), but that's a different story. Maybe let's ignore this point. :-)

from squot.

j4yk avatar j4yk commented on June 24, 2024

GitHub also only knows the destination branch because you tell it which one to use, or otherwise the "main" branch as configured in the GitHub project (for this Squot project, it is the develop branch). But a plain Git repository does not know which branch is the "main" one.

A tooltip would get around the real estate issue, right. So what remains is an indication that there are stashed changes on a branch, an indication that there are any commits that the upstream branch (if any!) does not have, and in the tooltip how many commits these are.

from squot.

LinqLover avatar LinqLover commented on June 24, 2024

Exactly! :-)

Last comment:

an indication that there are any commits that the upstream branch (if any!) does not have, and in the tooltip how many commits these are.

I would be interested in both the number of commits ahead (that only the local branch has) and behind (that only the upstream branch has). I like the representation of these numbers in VS Code:

image

... so maybe, three new icons would be required. And some of them should be combinable. Maybe prepend an asterisk (*) to branches with uncommitted changes instead of using a true icon for them?

from squot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.