I have a file with a series of changes (11) . All of the the hunk buttons are enabled apart from the last one which is greyed out. Please can you explain why.
David Chilvers
On windows, If you go to Tools->Options->Diff, there is a property "Max Diff Line Count",
Increasing cap to suit your needs will make Sourcetree show the entire diff, and ungrey the buttons.
Wow, that's handy. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It may not be unduly large, but it appears to be larger that SourceTree is willing to handle. You can obviously choose to stage the entire file, or try to figure out how to stage hunks via command line. Other than that, I've updated my answer with a possible alternative.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BTW I am using Windows 7, SourceTree 1.6.11.0 and git version 1.9.0.msysgit.0 Seth, I tried your suggestion but to no avail. The last hunk of about 500 lines, a pure insertion, still had the stage hunk button greyed out. 500 lines does not seem unduly large for a hunk. David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SourceTree limits how much of a diff it displays. If there are too many changes, SourceTree will eventually truncate the display in the middle of a hunk. It does not let you stage or discard that hunk because it is not showing you the entire hunk.
If you choose to stage or discard earlier hunks, it should reduce your diff content enough to display that entire hunk, which would let you use the buttons.
It's an annoying feature, but I assume it is necessary to keep SourceTree responsive when viewing large changesets.
EDIT: If your hunk is still too large, you can try highlighting large portions of it by clicking and shift-clicking within the large hunk, then staging or discarding "selected lines". I have never tried this in a partially displayed hunk, so I'm not sure if you'll be allowed or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.