Files
git/builtin
Eric Sunshine 088018e34d restore: default to HEAD when combining --staged and --worktree
By default, files are restored from the index for --worktree, and from
HEAD for --staged. When --worktree and --staged are combined, --source
must be specified to disambiguate the restore source[1], thus making it
cumbersome to restore a file in both the worktree and the index.

However, HEAD is also a reasonable default for --worktree when combined
with --staged, so make it the default anytime --staged is used (whether
combined with --worktree or not).

[1]: Due to an oversight, the --source requirement, though documented,
is not actually enforced.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-05-05 11:27:38 -07:00
..
2020-02-14 12:54:19 -08:00
2019-11-11 11:46:29 +09:00
2019-04-25 16:41:12 +09:00
2020-03-02 15:07:19 -08:00
2019-09-30 13:19:32 +09:00
2019-05-13 14:22:54 +09:00
2020-02-10 09:04:45 -08:00
2020-03-12 14:28:01 -07:00
2019-11-10 18:02:14 +09:00
2019-12-10 13:11:41 -08:00
2020-03-05 10:43:02 -08:00
2020-03-09 11:21:19 -07:00
2019-06-19 08:19:21 -07:00