Files
git/Documentation
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-04-19 16:32:24 -07:00
2019-05-09 00:37:27 +09:00
2018-06-25 13:22:36 -07:00
2019-12-06 16:31:39 +01:00
2019-08-07 12:37:33 -07:00
2019-01-23 11:37:29 -08:00
2019-08-11 17:40:07 -07:00
2019-08-11 17:40:07 -07:00
2019-04-02 13:57:00 +09:00
2019-08-11 17:40:07 -07:00
2019-01-23 11:37:29 -08:00
2019-03-18 14:45:21 +09:00
2020-02-12 12:41:36 -08:00
2018-12-26 14:59:37 -08:00
2019-05-07 13:04:48 +09:00
2019-05-07 13:04:48 +09:00
2019-05-07 13:04:48 +09:00
2019-04-02 13:57:00 +09:00
2019-11-10 18:02:11 +09:00
2019-10-21 12:02:39 +09:00