From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Schindelin Subject: Re: [PATCH v2 1/4] builtin-add.c: restructure the code for maintainability Date: Mon, 21 Jul 2008 02:56:35 +0200 (CEST) Message-ID: References: <1216534144-23826-1-git-send-email-gitster@pobox.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: git@vger.kernel.org To: Junio C Hamano X-From: git-owner@vger.kernel.org Mon Jul 21 02:56:49 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 1KKjhl-0007Ue-MG for gcvg-git-2@gmane.org; Mon, 21 Jul 2008 02:56:46 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754475AbYGUAzq (ORCPT ); Sun, 20 Jul 2008 20:55:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755136AbYGUAzq (ORCPT ); Sun, 20 Jul 2008 20:55:46 -0400 Received: from mail.gmx.net ([213.165.64.20]:49951 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753653AbYGUAzp (ORCPT ); Sun, 20 Jul 2008 20:55:45 -0400 Received: (qmail invoked by alias); 21 Jul 2008 00:55:43 -0000 Received: from 88-107-142-10.dynamic.dsl.as9105.com (EHLO eeepc-johanness.st-andrews.ac.uk) [88.107.142.10] by mail.gmx.net (mp017) with SMTP; 21 Jul 2008 02:55:43 +0200 X-Authenticated: #1490710 X-Provags-ID: V01U2FsdGVkX1+ES/l4+oaE74zehyRW26FO43axhwlhxl7gePPkIx 6Ut/e2JKcQ3NEo X-X-Sender: user@eeepc-johanness In-Reply-To: <1216534144-23826-1-git-send-email-gitster@pobox.com> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.7 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Hi, On Sat, 19 Jul 2008, Junio C Hamano wrote: > diff --git a/builtin-add.c b/builtin-add.c > index bf13aa3..9b2ee8c 100644 > --- a/builtin-add.c > +++ b/builtin-add.c > [...] > + /* > + * If we are adding new files, we need to scan the working > + * tree to find the ones that match pathspecs; this needs > + * to be done before we read the index. > + */ This comment left me scratching my head. While I do see a breakage when reading the index first, I had the impression that it should not. I can only imagine that the other users of read_directory() depend on some funny interaction between the index and treat_directory(). Ciao, Dscho