staging specific lines out of a hunk for a commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I know 'git gui' has this cool feature where you can stage one line at
a time. This is really handy, but also very annoying, if you have a
large piece of code you want to commit.

eg: I have a single hunk, which can't be split into smaller hunks
because it is all new code. But that hunk fixes a few bugs, or
introduces a few new features.

Is there a way to use 'git add -i' or 'git add -p' or 'git gui' and
tell it to add for example lines 5-20 of the hunk to the index?
Currently with 'git gui', I have to right click and select 'Stage line
for commit' 15+ times! :-(

Maybe 'gui gui' can be enhance (don't know if development work is
continuing on gui gui') to use the same feature as in the "unstaged
changes" area of the UI. There you can simply click the icon next to
the file name to add that file. Maybe the same could be implemented to
the "diff" area of the UI. Simply click the first column in the diff
area (where the '+' or '-' or ' ' appears), to add those lines to the
index. This will make adding or removing line to/from a commit so much
quicker and easier than the popup menu.

I'm using git-gui 0.12.0.64 and git version 1.7.0.4.

-- 
Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net:8080/fpgui/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]