From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Shawn O. Pearce" Subject: Re: [PATCH 2/4] fast-import: define a new option command Date: Thu, 13 Aug 2009 10:52:11 -0700 Message-ID: <20090813175211.GQ1033@spearce.org> References: <20090813150446.GM1033@spearce.org> <20090813152419.GN1033@spearce.org> <20090813172508.GO1033@spearce.org> <20090813174119.GP1033@spearce.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Johannes Schindelin , Git List , Junio C Hamano To: Sverre Rabbelier X-From: git-owner@vger.kernel.org Thu Aug 13 19:52:20 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 1MbeTL-00031g-O9 for gcvg-git-2@gmane.org; Thu, 13 Aug 2009 19:52:20 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704AbZHMRwL (ORCPT ); Thu, 13 Aug 2009 13:52:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752578AbZHMRwK (ORCPT ); Thu, 13 Aug 2009 13:52:10 -0400 Received: from george.spearce.org ([209.20.77.23]:59358 "EHLO george.spearce.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbZHMRwK (ORCPT ); Thu, 13 Aug 2009 13:52:10 -0400 Received: by george.spearce.org (Postfix, from userid 1001) id AF96E381FD; Thu, 13 Aug 2009 17:52:11 +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: Sverre Rabbelier wrote: > On Thu, Aug 13, 2009 at 10:41, Shawn O. Pearce wrote: > > Uh, no, if we have "option import-marks=..." and we can't find the > > file "..." and we have no --import-marks command line flag that > > would have overridden it, we need to abort with an error. > > Ah, then how about in option_import_marks() we only store the name of > the file, like in option_export_marks, and at the end, when we reach > the first non-option command (and we've parsed argv), we read the > file. That way it's only read once, and it deals with the above > scenario. That's better. :-) -- Shawn.