Hunk
1813, "large piece cut off," of uncertain origin; according to OED "not frequent in literature before 1850." Possibly from West Flemish hunke (used of bread and meat), which is perhaps related to Dutch homp "lump, hump" (see hump (n.)). Meaning "attractive, sexually appealing man" is first attested 1945 in jive talk (in Australian slang, it is recorded from 1941).
hunk
also honkey, derogatory word for "white person," by 1967, African-American vernacular, of unknown origin, perhaps from late 19c. hunky "East-Central European immigrant," which probably is a colloquial shortening of Hungarian (compare hunk (n.2)). Honky in the sense of "factory hand" is attested by 1946 in blues slang. A connection to honky-tonk also is possible.
Hunk is the executable file format of tools and programs of the Amiga Operating System based on Motorola 68000 CPU and other processors of the same family. This kind of executable got its name from the fact that the software programmed on Amiga is divided in its internal structure into many pieces called hunks, in which every portion could contain either code or data.
Types of hunks were standardized in AmigaOS, and well documented in The AmigaDOS Manual edited by Commodore to explain to programmers how to code on the Amiga, during the years in which Commodore manufactured Amiga computers. Their structure was officially codified and could be changed only by a Commodore committee, which then communicated the modifications to the developers for new releases of the Amiga operating system.
The structure of an Amiga hunk is very simple: There is a header at the beginning of the hunk indicating that that kind of "portion of code" is a known and valid Amiga hunk type, then follows an ID which indicates the length of the hunk itself, and at the bottom is the segment of the hunk which contains the real code or data.
The internal structure of an Amiga executable file is very simple. In the beginning of the file there is the magic cookie, then is declared the total number of hunks in the executable, and just after this is the progressive numbers of hunks starting from "0" (zero).
The first hunk is always numbered zero, so if the executable is (for example) subdivided into three hunks, they will be numbered "0" for the first one, "1" the second and "2" the third hunk, and so on.
Just before the real hunks start is a table containing information about the length of any hunks present in the executable, and in the last part of the file are positioned the real hunks, each one described by its type name: HUNK_CODE, HUNK_DATA, et cetera.
The Amiga could save metadata into hunks, as the hunk structure could be easily adapted to support this feature, but the hunk format of executables was abandoned in favour of ELF and there is no central authority (as the dismissed Commodore) which could implement this feature as one of the Amiga standards.
In 1997 Haage & Partner developer WarpUp PowerPC kernel for PowerUP accelerator boards. Instead of ELF binary format they had chosen to expand existing hunk format. Problem with ELF binary format was that users had to patch their system to load ELF executables and mixing PPC/68k code was not possible. Extended Hunk Format (EHF), developed by Haage & Partner, allowed mixing PPC and 68k code to single executable without modifying the existing system if PowerPC accelerator was not installed.[1][2].
When comparing two files, diff finds sequences of lines common toboth files, interspersed with groups of differing lines calledhunks. Comparing two identical files yields one sequence ofcommon lines and no hunks, because no lines differ. Comparing twoentirely different files yields no common lines and one large hunk thatcontains all lines of both files. In general, there are many ways tomatch up lines between two given files. diff tries to minimizethe total hunk size by finding large sequences of common linesinterspersed with small hunks of differing lines.
There's a question on SO about splitting hunks using magit, and the two solutions given are to either stage the region (mark a region, hit stage), or to shrink/grow all hunks using + & -. That's not what I'm after.
Similar to the last point, say a 20 line commit contains a single line the middle that should not be staged. It'd be easier to split & stage the top and bottom two hunks ignoring the middle one than use the region.
Update: What Magit does not support is to display the sort of tiny hunks that are used as examples in the question. This is how I understood that question: "how do I make Magit display such smaller hunks instead of the hunks it is actually displaying?" The correct answer to that is still "that's not possible" and below I give that answer using more words.
However, Magit does support "applying" only parts of a displayed hunk. To do that one has to use the region to mark the part that one wants to apply before invoking the apply command.
As mentioned in the comments above, Magit does not support splitting a hunk into multiple hunks beyond what is possible by using git diff -U. That's because Magit relies on that Git command to create the diffs. That isn't going to change, Magit will always use the diffs it gets from Git as-is.
(Actually Magit does strip some headers which are not really relevant to humans, but does restore them when applying changes. But splitting a hunk further than what -U supports is a whole different story, it would lead down a rabbit hole - there's a reason why Git doesn't allow "smaller hunks", it wouldn't be able to apply them).
While Magit does not support displaying smaller hunks as asked for here, it does support applying just parts of a hunk. When the region is active while staging, then only that part of the hunk is applied.
That doesn't help much when the part which should not be staged is right in the middle of the text which should be staged. As others have suggested, what you should do in this case is to stage the whole hunk, and then unstage the line which you don't want to commit in a second step.
That could of course be automated. The only way I can see in which this could be automated is to "stage the current hunk except for the region. But I do have some doubts about how often that would actually be useful and fear that it would not be easy to implement that robustly. And so I do not currently intend to implement this.
Instead of just leaving the cursor inside the hunk, select the lines you want to stage from the hunk and press s.Only the selected part of the hunk will be staged, whereas the rest of the hunk still sits in the unstaged area.
Big Hunk Chocolate is the real deal when it comes to a candy bar. You will enjoy a Big Hunk candy bar in any scenario because each bite reveals a rich, chewy nougat taste with a legendary serving of delicious whole roasted peanuts. The Big hunk is a generous portion that can satisfy your need for chewy, sweet and salty all in one bite. 041b061a72