tnesbitt210 / interactive-smartlog-issues

12 stars 0 forks source link

Feature request - split diffs functionality #8

Closed vuduchild closed 3 weeks ago

vuduchild commented 7 months ago

This was recently introduced to the OSS version of Sapling ISL. Perhaps it could be ported in as well?

tnesbitt210 commented 7 months ago

This is on my TODO list, along with interactive rebase! 🙂

tnesbitt210 commented 3 weeks ago

Currently, there isn’t a straightforward way to split commits by file with a single git command. Right now, each IGL button is designed to run one command (or occasionally two, in a way that ensures the repo state remains stable even if interrupted).

Implementing split diffs functionality would likely involve a sequence of commands, such as:

git reset HEAD~1
git add file1
git commit -m "Commit message for file1"
git add file2
git commit -m "Commit message for file2"

This kind of operation could potentially leave the repo in an inconsistent state if interrupted mid-sequence, which could be confusing or disruptive for users. Given these challenges, I’m not planning to implement this right now, but I'm open to exploring alternative approaches if there's a way to do it safely and smoothly. Let me know if you have any additional thoughts or suggestions!