git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 0/4] Some more on top of nd/switch-and-restore
Date: Thu, 20 Jun 2019 16:55:19 +0700	[thread overview]
Message-ID: <20190620095523.10003-1-pclouds@gmail.com> (raw)

This is small refinements (except 4/4).

2/4 relaxes the 'in-progress' check for bisect because switching while
bisecting is normal _and_ safe. 3/4 makes 'switch -d' completion much
more useful. 4/4 adds the last missing piece in 'git restore', records
new files in worktree as i-t-a.

Still on the agenda (but may take some or much more time to do):

- submodule support in 'git restore'
- handling "git restore *.c" where *.c is expanded by shell

One item I have a patch for but decided not to send, is to imply
--detach in 'git switch' if you are already in detached HEAD mode and
want to switch to a non-branch. In other words, it behaves just like
git-checkout.

No more protection is needed in that case because you're in trouble
already if you don't know about detached HEAD. And if you do know,
then adding '-d' is just annoyance.

But I don't find myself using it and I'm a pretty heavy detached user.
So while it kinda makes sense to do, I don't think it's worth the
complication.

Nguyễn Thái Ngọc Duy (4):
  t2027: use test_must_be_empty
  switch: allow to switch in the middle of bisect
  completion: disable dwim on "git switch -d"
  restore: add --intent-to-add (restoring worktree only)

 Documentation/git-restore.txt          |  7 +++
 builtin/checkout.c                     | 82 +++++++++++++++++++++++++-
 contrib/completion/git-completion.bash |  4 ++
 t/t2070-restore.sh                     | 22 ++++++-
 4 files changed, 109 insertions(+), 6 deletions(-)

-- 
2.22.0.rc0.322.g2b0371e29a


             reply	other threads:[~2019-06-20  9:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  9:55 Nguyễn Thái Ngọc Duy [this message]
2019-06-20  9:55 ` [PATCH 1/4] t2027: use test_must_be_empty Nguyễn Thái Ngọc Duy
2019-06-20  9:55 ` [PATCH 2/4] switch: allow to switch in the middle of bisect Nguyễn Thái Ngọc Duy
2019-06-20 14:02   ` Derrick Stolee
2019-06-20 15:06     ` Duy Nguyen
2019-06-20  9:55 ` [PATCH 3/4] completion: disable dwim on "git switch -d" Nguyễn Thái Ngọc Duy
2019-06-20  9:55 ` [PATCH 4/4] restore: add --intent-to-add (restoring worktree only) Nguyễn Thái Ngọc Duy
2019-06-20 14:34   ` Derrick Stolee
2019-06-20 14:58     ` Duy Nguyen
2019-06-26 19:58 ` [PATCH 0/4] Some more on top of nd/switch-and-restore Junio C Hamano
2019-06-27  2:53   ` Duy Nguyen
2019-06-27  8:53     ` Duy Nguyen
2019-06-27 17:53       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190620095523.10003-1-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).