summaryrefslogtreecommitdiff
path: root/t/t5515/fetch.br-branches-default
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2009-04-16 03:14:15 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-04-19 12:35:38 -0700
commit7535e5a16aa7167074ac74ee1342814767a83a82 (patch)
tree6c737817220eb001cf0844af02b536732bd16526 /t/t5515/fetch.br-branches-default
parentgit add -p: new "quit" command at the prompt. (diff)
downloadtgif-7535e5a16aa7167074ac74ee1342814767a83a82.tar.xz
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 't/t5515/fetch.br-branches-default')
0 files changed, 0 insertions, 0 deletions