summaryrefslogtreecommitdiff
path: root/test-date.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-04-16 03:14:15 -0400
committerJunio C Hamano <gitster@pobox.com>2009-04-16 01:06:52 -0700
commit0392513fdc7e98f5ca5dff1ad80962c28029267b (patch)
treeb454e05586cd214c9551bb317b74ed52d3a76f1e /test-date.c
parent9a7a1e03d5e530cdad98c41c109e3319c008ce69 (diff)
downloadgit-0392513fdc7e98f5ca5dff1ad80962c28029267b.tar.gz
add-interactive: refactor mode hunk handling
The original implementation considered the mode separately from the rest of the hunks, asking about it outside the main hunk-selection loop. This patch instead places a mode change as the first hunk in the loop. This has two advantages: 1. less duplicated code (since we use the main selection loop). This also cleans up an inconsistency, which is that the main selection loop separates options with a comma, whereas the mode prompt used slashes. 2. users can now skip the mode change and come back to it, search for it (via "/mode"), etc, as they can with other hunks. To facilitate this, each hunk is now marked with a "type". Mode hunks are not considered for splitting (which would make no sense, and also confuses the split_hunk function), nor are they editable. In theory, one could edit the mode lines and change to a new mode. In practice, there are only two modes that git cares about (0644 and 0755), so either you want to move from one to the other or not (and you can do that by staging or not staging). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-date.c')
0 files changed, 0 insertions, 0 deletions