From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (May 2019, #01; Thu, 9)
Date: Thu, 9 May 2019 20:44:03 +0700 [thread overview]
Message-ID: <CACsJy8Ar8rCOhkXv6QUfEiOLOepfU6KNr34K7qFaQiMcgQCmLQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqlfzgg8s3.fsf@gitster-ct.c.googlers.com>
On Thu, May 9, 2019 at 12:23 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> * nd/merge-quit (2019-05-07) 2 commits
> - merge: add --quit
> - merge: remove drop_save() in favor of remove_merge_branch_state()
>
> "git merge" learned "--quit" option that cleans up the in-progress
> merge while leaving the working tree and the index still in a mess.
>
> Hmph, why is this a good idea?
The first reason is consistency, besides bisect, all other in-progress
commands have both --abort and --quit.
The second is because it's an escape hatch suggestion in git-switch.
And this goes back to the first reason because git-checkout will just
let you switch and do stuff. If you forget about the merge, at some
point continue the merge won't even make sense.
> * nd/switch-and-restore (2019-05-07) 43 commits
> - Declare both git-switch and git-restore experimental
> - help: move git-diff and git-reset to different groups
> - doc: promote "git restore"
> - user-manual.txt: prefer 'merge --abort' over 'reset --hard'
> - completion: support restore
> - t: add tests for restore
> - restore: support --patch
> - restore: replace --force with --ignore-unmerged
> - restore: default to --source=HEAD when only --staged is specified
> - restore: reject invalid combinations with --staged
> - restore: add --worktree and --staged
> - checkout: factor out worktree checkout code
> - restore: disable overlay mode by default
> - restore: make pathspec mandatory
> - restore: take tree-ish from --source option instead
> - checkout: split part of it to new command 'restore'
> - doc: promote "git switch"
> - completion: support switch
> - t: add tests for switch
> - switch: make --orphan switch to an empty tree
> - switch: reject if some operation is in progress
> - switch: no worktree status unless real branch switch happens
> - switch: implicit dwim, use --no-guess to disable it
> - switch: add short option for --detach
> - switch: only allow explicit detached HEAD
> - switch: reject "do nothing" case
> - switch: stop accepting pathspec
> - switch: remove -l
> - switch: add --discard-changes
> - switch: better names for -b and -B
> - checkout: split part of it to new command 'switch'
> - checkout: split options[] array in three pieces
> - checkout: move 'confict_style' and 'dwim_..' to checkout_opts
> - checkout: make "opts" in cmd_checkout() a pointer
> - checkout: factor out some code in parse_branchname_arg()
> - checkout: keep most #include sorted
> - checkout: inform the user when removing branch state
> - checkout: advice how to get out of detached HEAD mode
> - t: rename t2014-switch.sh to t2014-checkout-switch.sh
> - git-checkout.txt: fix monospace typeset
> - doc: document --overwrite-ignore
> - git-checkout.txt: fix one syntax line
> - git-checkout.txt: spell out --no-option
>
> Two new commands "git switch" and "git restore" are introduced to
> split "checking out a branch to work on advancing its history" and
> "checking out paths out of the index and/or a tree-ish to work on
> advancing the current history" out of the single "git checkout"
> command.
>
> The "switch" part seems more or less ready for testing. Perhaps
> we should split this back into two topics and merge it to 'next'.
> cf. <20190329103919.15642-1-pclouds@gmail.com> (switch v6)
> cf. <20190425094600.15673-1-pclouds@gmail.com> (restore v3)
No opinon here.
I do have three small patches to refine git-switch. But I think we can
do it on top. Probably best that way anyway to keep the justification
for the changes in commit message.
git-restore works quite nicely for me, by my opinion in this area does
not count. Besides Emily's usability issue with shell wildcard
expansion, intent-to-add support is still not there. And Phillip might
want to change --discard-changes behavior. That's all that's left.
--
Duy
next prev parent reply other threads:[~2019-05-09 13:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 17:23 What's cooking in git.git (May 2019, #01; Thu, 9) Junio C Hamano
2019-05-08 17:48 ` Denton Liu
2019-05-08 18:02 ` Elijah Newren
2019-05-09 13:24 ` Phillip Wood
2019-05-10 13:49 ` Johannes Schindelin
2019-05-13 13:29 ` Phillip Wood
2019-05-09 13:44 ` Duy Nguyen [this message]
2019-05-09 20:45 ` en/fast-export-encoding, was " Johannes Schindelin
2019-05-10 0:14 ` Elijah Newren
2019-05-10 6:21 ` Johannes Sixt
2019-05-10 13:54 ` Johannes Schindelin
2019-05-09 20:54 ` nd/merge-quit, " Johannes Schindelin
2019-05-10 9:42 ` Duy Nguyen
2019-05-13 14:02 ` Johannes Schindelin
2019-05-13 14:06 ` Johannes Schindelin
2019-05-13 14:20 ` Eric Sunshine
2019-05-13 14:53 ` Johannes Schindelin
2019-05-13 18:32 ` [PATCH] tests: add a special setup where prerequisites fail Ævar Arnfjörð Bjarmason
2019-05-14 8:53 ` Johannes Schindelin
2019-05-14 9:41 ` Ævar Arnfjörð Bjarmason
2019-05-14 12:37 ` Johannes Schindelin
2019-05-14 13:39 ` Ævar Arnfjörð Bjarmason
2019-05-14 14:04 ` Johannes Schindelin
2019-06-20 20:42 ` [PATCH] tests: mark two failing tests under FAIL_PREREQS Ævar Arnfjörð Bjarmason
2019-06-21 18:04 ` Johannes Schindelin
2019-06-21 18:26 ` Ævar Arnfjörð Bjarmason
2019-06-21 20:08 ` 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=CACsJy8Ar8rCOhkXv6QUfEiOLOepfU6KNr34K7qFaQiMcgQCmLQ@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).