From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH 3/3] rebase -i: use "git sequencer--helper --reset-hard" Date: Mon, 03 Aug 2009 01:03:54 -0700 Message-ID: <7vbpmxe32t.fsf@alter.siamese.dyndns.org> References: <20090803024023.3794.6487.chriscool@tuxfamily.org> <200908030829.21424.chriscool@tuxfamily.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christian Couder , git@vger.kernel.org, Johannes Schindelin , Stephan Beyer , Daniel Barkalow , Jakub Narebski To: Sverre Rabbelier X-From: git-owner@vger.kernel.org Mon Aug 03 10:04:25 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1MXsWu-0001Ff-9e for gcvg-git-2@gmane.org; Mon, 03 Aug 2009 10:04:24 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752843AbZHCIEP (ORCPT ); Mon, 3 Aug 2009 04:04:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753230AbZHCIEN (ORCPT ); Mon, 3 Aug 2009 04:04:13 -0400 Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:52205 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752843AbZHCIEL (ORCPT ); Mon, 3 Aug 2009 04:04:11 -0400 Received: from localhost.localdomain (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 645B01B14E; Mon, 3 Aug 2009 04:04:11 -0400 (EDT) Received: from pobox.com (unknown [68.225.240.211]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id E41041B14B; Mon, 3 Aug 2009 04:03:55 -0400 (EDT) In-Reply-To: (Sverre Rabbelier's message of "Sun\, 2 Aug 2009 23\:30\:57 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-Pobox-Relay-ID: 3A4924D0-8004-11DE-A39B-AEF1826986A2-77302942!a-pb-sasl-sd.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Sverre Rabbelier writes: > Heya, > > On Sun, Aug 2, 2009 at 23:29, Christian Couder wrote: >> This is part of my work to port git-rebase--interactive.sh to C using code >> from the sequencer project. So the advantage is that it introduces and uses >> the reset_almost_hard() function that will be used in the end when >> everything is done by C code. > > Hmmm, that almost makes sense, but I don't see the new C code > replacing any existing shell code, so what am I missing here? More importantly, I found the "almost_hard()" function way underexplained. What it does (e.g. does --hard when able but otherwise gives up and falls back to something else?), why it is necessary (e.g. when should callers use it, instead of calling unconditional "reset --hard"?), what kind of preparation is necessary by the caller (e.g. should it read the index before calling the function? should it discard the index before?), and what kind of result should it expect (e.g. is it safe to write a tree out of the resulting index, or does it screw up the cache-tree and the caller should discard it before writing a tree?), etc. etc....