Giter Club home page Giter Club logo

git-graph-branch's People

Contributors

alicederyn avatar

Watchers

 avatar  avatar

git-graph-branch's Issues

Bug in pack.py

  File "git_graph_branch/git/pack.py", line 302, in packs
    return PackDir(git_dir() / "objects" / "pack")
  File "git-graph-branch/git_graph_branch/git/pack.py", line 283, in __init__
    packs.sort(reverse=True)
TypeError: '<' not supported between instances of 'Pack' and 'Pack'

packs.sort(reverse=True)

Grey out branches merged into upstream

Visually indicate branches that have been merged into their local upstream, ideally in grey.

Notes:

  • Branches merged into remote upstream of the same name do not count (these are assumed to be local replicas).
  • Any grey branch should be able to be passed to git branch -d without a warning.

Support git-worktree

git-worktree allows one to have multiple worktrees for the same repo. It works by creating a .git file instead of directory, which points back to the parent checkout. It would be great if git-graph-branch worked in a worktree (currently it has deep assumptions baked in about files living under .git/).

Hard to diagnose failures

Internal errors currently require a code change to understand, as the stack trace is removed. A debug flag to reenable the stack trace would help.

Fatal error if ref missing

Traceback (most recent call last):
  File "git_graph_branch/__init__.py", line 58, in main
    print_branch(art, b, config)
  File "git_graph_branch/display.py", line 72, in print_branch
    print(SYNC_STATUS_ICON[remote_sync_status(b)], end="")
                           ^^^^^^^^^^^^^^^^^^^^^
  File "git_graph_branch/display.py", line 50, in remote_sync_status
    if b.upstream.commit.commit_date > b.commit.commit_date:
       ^^^^^^^^^^^^^^^^^
  File "git_graph_branch/git/branch.py", line 45, in commit
    with open(self._ref, "r", encoding="ascii") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.../.git/refs/remotes/origin/main'

The underlying problem in this particular case appears to be #4, as refs/remotes/origin/main is present in .git/packed-refs, but in general we should be resilient to missing upstream refs.

Watch missing upstream changes

I've noticed that when adding a new branch with git checkout -b, the upstream link is missing until I kill and restart git-graph-branch. This is on a polled filesystem.

Support merge commits

While rebasing onto main is usually preferred, sometimes during github review cycles it's cleaner to instead merge in latest changes from main (there's even a button on the UI). It would be nice if the "N unmerged" notification took these into account, as currently it shows branches as being behind main even when they are not.

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.