Comments (14)
but it's a start :)
No it's not. It's nowhere near the consistency and quality to the current version at all. There is no step from a modest solution like that to a pleasant UI like lazygit is currently.
Please don't poison a great project with a bad solution like that. Accept it that it takes time or rather don't do it please.
from lazygit.
@kissgyorgy hey, now. It's no worse than the current alternative, which is to switch to a different program for this functionality. This is just a shortcut for that. I'm sure that @jesseduffield also wants to find a way to integrate this into the UI, but I for one would rather not have nothing in the meantime.
from lazygit.
I've got a PR up for this feature now. Please feel free to test the PR, I'll be merging it soon :)
from lazygit.
+1 I think this would get me to switch from git kraken.
from lazygit.
Closing :)
I want to add more to this feature in the future, namely the ability to easily un-stage lines and even delete lines, but this specific issue is addressed
from lazygit.
Yeah that's something I very much want to add. I tried doing an interactive shell session with git add -p
but couldn't quite get it working. It's definitely something I want in the app
from lazygit.
I would definitely try to switch from tig if I could stage lines, lazygit looks much nicer.
from lazygit.
@kissgyorgy @v3rm0n @from-nibly I've just pushed a commit to master which allows you to hit 't' and get redirected to a subprocess of git add --patch
for the selected file. It's not as good as a UI in the app itself, but it's a start :)
from lazygit.
@kissgyorgy we differ in our ideologies here. As I originally made lazygit to help me with git, the mentality has always been to iteratively improve without breaking any existing features. Switching to the git add -p
subprocess is not as good as having a subprocess communicated to via the UI, as I stated in my above comment, but I have already made use of it in my own use of the app, and the switching-to-subprocess pattern will be around for various other things like committing when a password is required, or switching to vi, for some time until we work out how to integrate properly with the subprocesses. Though I want lazygit to be a tool with a highly polished UI, it's still in early days (not v1.0.0 yet) and so tradeoffs like this will happen as we iron out the kinks.
Having said that, if you ever post a comment with a tone like that again (removed swear word notwithstanding) I'm blocking you from the repo. It's not a nice thing to wake up to.
from lazygit.
Yea, sorry about the tone, it was not very nice, and I removed it immediately when I realized.
But as I told earlier, I was searching for a long time for something like this and would be sad to see quality diminish after a great start.
I didn't looked into it before, but I see you are running git commands with os/exec, but wouldn't it be easier using a libgit2 wrapper? It's also more efficient for sure because you don't have the subprocess and text parsing overhead.
it's still in early days (not v1.0.0 yet)
Please don't make that an excuse. Why couldn't it be great from the start?
from lazygit.
but wouldn't it be easier using a libgit2 wrapper
Ok, I see that go-git is a pure-Go Git manipulator library, but I'm just curious then, why do you need os/exec calls? Are there missing commands from go-git?
from lazygit.
All good, and yeah I see your perspective as well. Regarding go-git, pretty much all the calls to git right now can be swapped out for go-git (I only became aware of that project recently). I've gotten started on that process, e.g. in this commit 4832d36
But some things will take a little more time because the code depends on the format of the output. Looking at the go-git examples, it seems like there's some good stuff for the async operations that we could use. Having said that, their support for git add is limited, so we'd need to come up with a solution that involves making a patch file based on user input and then applying that.
from lazygit.
process, e.g. in this commit 4832d36
Very nice!
from lazygit.
@jesseduffield I think the #338 concludes this issue.
from lazygit.
Related Issues (20)
- Excluding a file in a worktree does not work HOT 3
- Editing a gpg signed commit message via a Editor crashes HOT 1
- Better global error handling
- Unable to update lazygit - Invalid cross-device link
- Possible memory leak HOT 1
- Installing Lazygit with Go, dependency download failed HOT 4
- Jittering and laggy scrolling in the latest version HOT 1
- lazygit is not starting HOT 2
- crash if opened from a .git folder
- Additional reset shortcut HOT 3
- Lazygit crashed on adding github SSH remote
- error "expected section name" HOT 3
- Emoji in commit log cause extra characters right after the emoji HOT 1
- Disable split when Staged/Unstaged is empty HOT 1
- externalDiffCommand doesn't work when diffing between 2 refs HOT 2
- PowerShell's limitation on 4bit basic 16 colours
- Nil pointer on *RemoteBranch.FullName
- Error when creating Pull Requests with Bitbucket HOT 1
- Cannot moving commit in tmux HOT 7
- Tell Lazygit not to set the terminal title
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazygit.