summaryrefslogtreecommitdiff
path: root/hashmap.h
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-04-01 19:05:05 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-02 10:56:02 +0900
commitb5a0bd694c60338e68977c54a41470ce007b036f (patch)
treea0ebadc46696bc72e72399df856fe41a7c1c86f4 /hashmap.h
parentmingw: allow building with an MSYS2 runtime v3.x (diff)
downloadtgif-b5a0bd694c60338e68977c54a41470ce007b036f.tar.xz
read-tree.txt: clarify --reset and worktree changes
The description of --reset stays true to the first implementation in 438195cced (git-read-tree: add "--reset" flag, 2005-06-09). That is, --reset discards unmerged entries. Or at least true to the commit message because I can't be sure about read-tree's behavior regarding local changes. But in fcc387db9b (read-tree -m -u: do not overwrite or remove untracked working tree files., 2006-05-17), it is clear that "-m -u" tries to keep local changes, while --reset is singled out and will keep overwriting worktree files. It's not stated in the commit message, but it's obvious from the patch. I went this far back not because I had a lot of free time, but because I did not trust my reading of unpack-trees.c code. So far I think the related changes in history agree with my understanding of the current code, that "--reset" loses local changes. This behavior is not mentioned in git-read-tree.txt, even though old-timers probably can just guess it based on the "reset" name. Update git-read-tree.txt about this. Side note. There's another change regarding --reset that is not obviously about local changes, b018ff6085 (unpack-trees: fix "read-tree -u --reset A B" with conflicted index, 2012-12-29). But I'm pretty sure this is about the first function of --reset, to discard unmerged entries correctly. PS. The patch changes one more line than necessary because the first line uses spaces instead of tab. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hashmap.h')
0 files changed, 0 insertions, 0 deletions