diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-04-25 16:45:52 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-07 13:04:47 +0900 |
commit | 3a733ce5237570460bbb63e20002b92e903ad65f (patch) | |
tree | 14e5cd0e77b763e3fd4187bd025fea66c23bcc74 /builtin/rerere.c | |
parent | restore: reject invalid combinations with --staged (diff) | |
download | tgif-3a733ce5237570460bbb63e20002b92e903ad65f.tar.xz |
restore: default to --source=HEAD when only --staged is specified
"git restore --staged" without --source does not make much sense since
by default we restore from the index. Instead of copying the index to
itself, set the default source to HEAD in this case, yielding behavior
that matches "git reset -- <paths>".
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 'builtin/rerere.c')
0 files changed, 0 insertions, 0 deletions