From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Shawn O. Pearce" Subject: Re: [PATCH v2] Fix fetch/pull when run without --update-head-ok Date: Tue, 14 Oct 2008 08:02:27 -0700 Message-ID: <20081014150227.GC4856@spearce.org> References: <7vod1obmlh.fsf@gitster.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Daniel Barkalow , Junio C Hamano , git@vger.kernel.org To: Johannes Schindelin X-From: git-owner@vger.kernel.org Tue Oct 14 17:06:44 2008 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 1KplR1-0004R6-S1 for gcvg-git-2@gmane.org; Tue, 14 Oct 2008 17:03:44 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbYJNPC3 (ORCPT ); Tue, 14 Oct 2008 11:02:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752678AbYJNPC3 (ORCPT ); Tue, 14 Oct 2008 11:02:29 -0400 Received: from george.spearce.org ([209.20.77.23]:60433 "EHLO george.spearce.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667AbYJNPC2 (ORCPT ); Tue, 14 Oct 2008 11:02:28 -0400 Received: by george.spearce.org (Postfix, from userid 1001) id C06363835F; Tue, 14 Oct 2008 15:02:27 +0000 (UTC) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Johannes Schindelin wrote: > On Mon, 13 Oct 2008, Daniel Barkalow wrote: > > > On Mon, 13 Oct 2008, Johannes Schindelin wrote: > > > > > I actually understand now why the tests started failing: the change from > > > resolve_ref() to get_branch() as requested by Daniel are at fault: > > > get_branch() does not check if the branch has an initial commit. > > So, my vote is to revert back to resolve_ref(), even if it needs more > lines. Yes, I agree, resolve_ref() is the best thing to be using here, even if it is more code. get_branch() validates the commit and we don't want that. We really just want to know if the current branch is going to be updated, we don't care to what/why. -- Shawn.