git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yasushi SHOJI <yashi@atmark-techno.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] Introduce "reset type" flag to "git reset"
Date: Wed, 24 Aug 2005 09:13:21 +0900	[thread overview]
Message-ID: <87y86s2nvi.wl@mail2.atmark-techno.com> (raw)
In-Reply-To: <7vacj8nw5v.fsf@assigned-by-dhcp.cox.net>

At Tue, 23 Aug 2005 15:08:44 -0700,
Junio C Hamano wrote:
> 
> Sam Ravnborg <sam@ravnborg.org> writes:
> 
> > But --soft, --hard looks rather confusing to me.
> >
> > Something like --force or --prune may be a bit more intuitive, and let
> > default behaviour be the one you name --soft for now.
> 
> I do not have objections to removing --mixed, but I do not find
> --force/--prune any less confusing than --soft/--hard.  Its just
> a terminology so once people get used to it anything would do.
> But I agree that we need to come up with a good name for them.
> I do not think --force/--prune is it, though.

I think the point is "what is the target?".

I believe "git reset" is targeting at the index file and only the
index file and nothing more. it's that simple.

what we want instead is a command to sync/reset/revert both index and
tree to know working point.  so this isn't core plumbing but as a user
of git, i'm sure it's very handy to have it.

--soft one is simple to think, so i'm starting with this one. let's
assume that, as you described in the original post, this one is
intended to be used to rework on the work _you_ have before.  that
means that _you_ know exactly what you are doing.

there might be a case, and this happned to me quite some time when I
was working with quilt, which you don't want to automatically add all
the files you added on the privious commit. ie. moving defines from
header to .c, splitting a work to two commits.

so in this case, it's ideal to just use "git reset" if the command
lists files removed from the index.

for --hard option, what you want to do is to completely revert the
current state of your index file and work tree to known point.

for that, how about git-revert-script?  can we add --force option to
that command so that even if your working tree is dirty it reverts to
the specified point?
--
          yashi

  reply	other threads:[~2005-08-24  0:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-23  1:07 [PATCH] Introduce "reset type" flag to "git reset" Junio C Hamano
2005-08-23 20:26 ` Sam Ravnborg
2005-08-23 22:08   ` Junio C Hamano
2005-08-24  0:13     ` Yasushi SHOJI [this message]
2005-08-24  0:22       ` Junio C Hamano
2005-08-24  0:41         ` Yasushi SHOJI
2005-08-24 18:35     ` 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

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

  git send-email \
    --in-reply-to=87y86s2nvi.wl@mail2.atmark-techno.com \
    --to=yashi@atmark-techno.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=sam@ravnborg.org \
    --cc=torvalds@osdl.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.
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).