From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: Re: [PATCH] Introduce "reset type" flag to "git reset" Date: Wed, 24 Aug 2005 09:13:21 +0900 Message-ID: <87y86s2nvi.wl@mail2.atmark-techno.com> References: <7vu0hhzcj1.fsf@assigned-by-dhcp.cox.net> <20050823202637.GA8061@mars.ravnborg.org> <7vacj8nw5v.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Sam Ravnborg , git@vger.kernel.org, Linus Torvalds X-From: git-owner@vger.kernel.org Wed Aug 24 02:14:00 2005 Return-path: Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E7itT-0006on-6N for gcvg-git@gmane.org; Wed, 24 Aug 2005 02:13:27 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932503AbVHXANY (ORCPT ); Tue, 23 Aug 2005 20:13:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932504AbVHXANY (ORCPT ); Tue, 23 Aug 2005 20:13:24 -0400 Received: from shop.atmark-techno.com ([210.191.215.173]:46787 "EHLO mail2.atmark-techno.com") by vger.kernel.org with ESMTP id S932503AbVHXANY (ORCPT ); Tue, 23 Aug 2005 20:13:24 -0400 Received: from smtp.local-network (dns1.atmark-techno.com [210.191.215.170]) by mail2.atmark-techno.com (Postfix) with ESMTP id 47803213CA; Wed, 24 Aug 2005 09:13:22 +0900 (JST) Received: from wat.atmark-techno.com (unknown [192.168.10.81]) by smtp.local-network (Postfix) with ESMTP id 6DFBDB61F; Wed, 24 Aug 2005 09:16:30 +0900 (JST) To: Junio C Hamano In-Reply-To: <7vacj8nw5v.fsf@assigned-by-dhcp.cox.net> User-Agent: Wanderlust/2.14.0 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: At Tue, 23 Aug 2005 15:08:44 -0700, Junio C Hamano wrote: > > Sam Ravnborg 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