Git Product home page Git Product logo

Comments (4)

toupeira avatar toupeira commented on June 9, 2024 3

@rhysd you don't need to iteratively call git blame, you can get a count directly with e.g. git rev-list --count HEAD <path>. This should match the chain you get from following the blames, though you might also need --no-merges to skip merge commits.

There's still a small performance concern, but it should be fine if this could be called asynchronously, so it doesn't delay the popup. You could also limit the runtime with e.g. --max-count 1001 and display that as 1000+.

from git-messenger.vim.

rhysd avatar rhysd commented on June 9, 2024 3

@toupeira

Nice. (I'm sorry for the delay. I missed to catch the comment) I'll consider to add this functionality.

from git-messenger.vim.

rhysd avatar rhysd commented on June 9, 2024

Thank you for the suggestion.

Yeah, it would be nice to have. However, with current implementation, it requires large code changes and tradeoff.

The history of revisions is a chain of git blame. Based on first source location, git-messenger.vim gets previous revision and source location using git blame. And based on the source location, git-messenger.vim gets older revision and source location using git blame. So it's something like iterating uni-direction linked list.

So git-messenger.vim cannot know the number of revisions under the cursor until it reaches 'no previous revision'. It's possible to fetch all revisions at first :GitMessenger, but it spawns many shell commands and would take time. For those who don't want revisions history, it is a pure overhead.

from git-messenger.vim.

petobens avatar petobens commented on June 9, 2024

Ohh I see. If it's too complicated then feel free to close.

from git-messenger.vim.

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.