Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stage single lines #21

Closed
realtimeprojects opened this issue Nov 24, 2011 · 10 comments
Closed

stage single lines #21

realtimeprojects opened this issue Nov 24, 2011 · 10 comments

Comments

@realtimeprojects
Copy link

The feature i miss most in tig is the ability to stage single lines (no hunks) from the stage view.

@jonas
Copy link
Owner

jonas commented Dec 6, 2011

Can git-apply(1) do single lines?

@realtimeprojects
Copy link
Author

To be honest.. i don't know exactly. I took a look at the man page and .. i
think not.

But: From the "users point of view" i don't care about this. I did not even
know that tig is using git-apply for doing that stuff. I just know other
tools like "git gui" etc. and this tools are able to do this and i'm
missing this feature in my favorite tool "tig". :-)

Best regards,
Claudio

2011/12/6 Jonas Fonseca <
reply@reply.github.com

Can git-apply(1) do single lines?


Reply to this email directly or view it on GitHub:
#21 (comment)

@aksrikanth
Copy link

I would love to have this feature as well. I think that the tools that allow this use git-add -e in some form.

jonas pushed a commit that referenced this issue Jan 9, 2012
Unstaging single lines from the index is not supported.
@jonas
Copy link
Owner

jonas commented Jan 9, 2012

Initial support for staging of single lines is now available. [edited]

Anyway, please test. It is bound to Ctrl-u by default. Hitting that combo after selecting a line in the stage view should do the trick.

jonas pushed a commit that referenced this issue Jan 9, 2012
Use git-apply(1)s --unidiff-zero option to simplify how changes are
expressed.
@jonas
Copy link
Owner

jonas commented Jan 9, 2012

Any preferences regarding the default keybinding?

@realtimeprojects
Copy link
Author

ctrl-u is fine for me. I tested it and it works well! Thanks a lot!

I just recognized that it does (obviously) not work on new files which are not added to git yet. But i think nobody needs that really.

Again, many thanks!

@jonas
Copy link
Owner

jonas commented Jan 10, 2012

Good catch, I've added logic to catch those cases (untracked and newly added files) and display a message.

@realtimeprojects
Copy link
Author

I just tested it. Well done!

jonas added a commit that referenced this issue Jan 14, 2012
Ctrl-u was conflicting with page up. Suggested by Heiko.
@jonas jonas closed this as completed Apr 10, 2012
@Giszmo
Copy link

Giszmo commented Jan 23, 2018

What might be the reason for the key binding to have stopped working? "1" doesn't do anything now and a quick search looks less than helpful.

Edit: Can't quickly find where the key bindings went. REQ_EDIT neither has the key binding defined as before it seams.

@jonas
Copy link
Owner

jonas commented Jan 24, 2018

@Giszmo Try to run Tig with TIGRC_USER=none set to not read any user config file. Also please create a new issue if this persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants