git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ralf Ebert <ralf@ralfebert.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Miles Bader" <miles@gnu.org>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	git@vger.kernel.org, "Ralf Ebert" <info@ralfebert.de>
Subject: Re: [PATCH] reset: Better warning message on git reset --mixed <paths>
Date: Sun, 15 Aug 2010 23:05:04 +0200	[thread overview]
Message-ID: <1281906304.32195.26.camel@lucy.SSG5-Serial-WLAN> (raw)
In-Reply-To: <7vr5hzg1u1.fsf@alter.siamese.dyndns.org>

> Regarding the various modes that are forbidden with "reset", I've been
> wondering if we can do things differently.

After being very happy about finding the
'soft-mixed-hard-path-cheat-sheet' table in 0e5a7fa (mentioned in Ævars
message that triggered the discussion)

reset:  --soft  --mixed  --hard  -- <paths>
HEAD       X       X        X        -
index      -       X        X        X
files      -       -        X        -

I was wondering:

Wouldn't the common reset soft/mixed/hard with path/commit operations
become a lot more intuitive by separating the "(1) copy [partially] from
HEAD to index [to working tree]" operation and the "(2) change HEAD and
do (1)" operation? Just as a very rough scribble of what I mean, like
this:

git wipe [<path>]            # git reset [<file>]; git checkout [<file>]
git wipe [<path>] --index-only           # git reset [--mixed] [<path>]

git set-head <commit>                    # git reset --soft [<commit>]
git set-head <commit> --wipe             # git reset --hard [<commit>]
git set-head <commit> --wipe-index-only  # git reset --mixed [<commit>]

(I know that git reset can do more than that, but this is everything I
ever wanted as porcelain-only user from git reset, thought maybe the
idea could be of use without being fully elaborated)

--
Ralf

  parent reply	other threads:[~2010-08-15 21:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-14 19:34 [PATCH] reset: Better warning message on git reset --mixed <paths> Ævar Arnfjörð Bjarmason
2010-08-14 21:05 ` Jonathan Nieder
2010-08-15  1:47   ` Junio C Hamano
2010-08-15  2:43     ` Miles Bader
2010-08-15  8:38       ` Ævar Arnfjörð Bjarmason
2010-08-15 18:36         ` Junio C Hamano
2010-08-15 19:49           ` Jonathan Nieder
2010-08-15 22:18             ` Junio C Hamano
2010-08-15 20:51           ` Ævar Arnfjörð Bjarmason
2010-08-15 22:22             ` Junio C Hamano
2010-08-16  0:59             ` Miles Bader
2010-08-16  1:13               ` Ævar Arnfjörð Bjarmason
2010-08-15 21:05           ` Ralf Ebert [this message]
2010-08-16  0:12             ` Jonathan Nieder
2010-08-15 13:02       ` David Fries
2010-08-15  8:43   ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2010-08-16  3:39     ` Junio C Hamano
2010-08-16  4:23       ` Ævar Arnfjörð Bjarmason

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=1281906304.32195.26.camel@lucy.SSG5-Serial-WLAN \
    --to=ralf@ralfebert.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=info@ralfebert.de \
    --cc=jrnieder@gmail.com \
    --cc=miles@gnu.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).