All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] reset: parse rev as tree-ish in patch mode
@ 2019-11-23 19:55 Nika Layzell via GitGitGadget
  2019-11-23 19:55 ` [PATCH 1/1] " Nika Layzell via GitGitGadget
  2019-11-24 20:25 ` [PATCH v2 0/1] " Nika Layzell via GitGitGadget
  0 siblings, 2 replies; 8+ messages in thread
From: Nika Layzell via GitGitGadget @ 2019-11-23 19:55 UTC (permalink / raw)
  To: git; +Cc: Nika Layzell, Junio C Hamano

This allows passing a tree-ish git reset -p without specifying a pathspec.
Requiring a commit in this situation appears to be an oversight, and support
for a tree-ish is documented by git-reset's manpage. (
https://github.com/git/git/blob/d9f6f3b6195a0ca35642561e530798ad1469bd41/Documentation/git-reset.txt#L12
)

An alternative implementation of this change would move the if (patch_mode)
{ ... return; } check before the rev parsing logic, offloading validation of
the rev argument when in patch mode to the git-add--interactive logic. This
would be possible as the parsed oid is not passed to git-add--interactive. (
https://github.com/git/git/blob/d9f6f3b6195a0ca35642561e530798ad1469bd41/builtin/reset.c#L341-L346
)

Nika Layzell (1):
  reset: parse rev as tree-ish in patch mode

 builtin/reset.c        | 2 +-
 t/t7105-reset-patch.sh | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)


base-commit: 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-474%2Fmystor%2Freset-interactive-treeish-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-474/mystor/reset-interactive-treeish-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/474
-- 
gitgitgadget

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

end of thread, other threads:[~2019-11-25  2:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-23 19:55 [PATCH 0/1] reset: parse rev as tree-ish in patch mode Nika Layzell via GitGitGadget
2019-11-23 19:55 ` [PATCH 1/1] " Nika Layzell via GitGitGadget
2019-11-24  5:54   ` Junio C Hamano
2019-11-24 18:31     ` Nika Layzell
2019-11-25  1:58       ` Junio C Hamano
2019-11-24 20:25 ` [PATCH v2 0/1] " Nika Layzell via GitGitGadget
2019-11-24 20:25   ` [PATCH v2 1/1] " Nika Layzell via GitGitGadget
2019-11-25  2:03     ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.