git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] enhance "git restore --worktree --staged" behavior
@ 2020-05-01  8:27 Eric Sunshine
  2020-05-01  8:27 ` [PATCH 1/2] restore: require --source when combining --worktree and --staged Eric Sunshine
  2020-05-01  8:27 ` [PATCH 2/2] restore: default to HEAD " Eric Sunshine
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Sunshine @ 2020-05-01  8:27 UTC (permalink / raw)
  To: git; +Cc: Harri Mehtälä, Duy Nguyen, Eric Sunshine

This series addresses a shortcoming or two when git-restore's --worktree
and --staged options are combined. The first patch tightens the
implementation to match the documentation. The second patch loosens the
documented restriction by adding a bit of DWIMing to make it more
convenient to combine the two options.

Although the second patch effectively throws away the changes of the
first patch, I kept them separate in case someone comes up with a good
objection to the new DWIMing (which escaped me), in which case the first
patch can be kept and the second thrown away.

Eric Sunshine (2):
  restore: require --source when combining --worktree and --staged
  restore: default to HEAD when combining --worktree and --staged

 Documentation/git-restore.txt | 13 +++++++------
 builtin/checkout.c            |  6 +++---
 t/t2070-restore.sh            | 11 +++++++++++
 3 files changed, 21 insertions(+), 9 deletions(-)

-- 
2.26.2.526.g744177e7f7


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-05-05  4:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01  8:27 [PATCH 0/2] enhance "git restore --worktree --staged" behavior Eric Sunshine
2020-05-01  8:27 ` [PATCH 1/2] restore: require --source when combining --worktree and --staged Eric Sunshine
2020-05-01  8:49   ` Eric Sunshine
2020-05-01 22:16   ` Taylor Blau
2020-05-01  8:27 ` [PATCH 2/2] restore: default to HEAD " Eric Sunshine
2020-05-01 15:32   ` Junio C Hamano
2020-05-05  3:53     ` Eric Sunshine
2020-05-01 22:19   ` Taylor Blau
2020-05-05  4:00     ` Eric Sunshine
2020-05-05  4:44       ` Taylor Blau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).