Git Product home page Git Product logo

Comments (5)

z0al avatar z0al commented on August 10, 2024 1

Calling find_similar in diff_staged here did the trick:

diff.find_similar(Some(&mut DiffFindOptions::new().renames(true)))?;

Using git status

image

Using gitu

image

I tried to adjust the rendering to match the git status output e.g. renamed old_file -> new_file but my non-existent Rust experience failed me. I couldn't find the responsible code. Any pointers @altsem 😅? also, the misalignment of the columns is super annoying.

from gitu.

z0al avatar z0al commented on August 10, 2024 1

Thanks @altsem. I will open a PR shortly

Edit: PR is live

from gitu.

meseck avatar meseck commented on August 10, 2024

Sorry that I accidentally opened multiple duplicates of this issue. I really don't know how it happened. 🤷 😅
I hope it's easy to remove them.

from gitu.

altsem avatar altsem commented on August 10, 2024

Np! This is something I've been wanting to get right. Think there's some "move detection" you can configure in libgit2 to make it work. Haven't looked into it too deep.

from gitu.

altsem avatar altsem commented on August 10, 2024

Cool! 🙌
@z0al this should be the piece of code responsible for formatting those lines:

https://github.com/altsem/gitu/blob/master/src/items.rs#L55

from gitu.

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.