From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Schindelin Subject: Re: [PATCH 2/2] git status: show relative paths when run in a subdirectory Date: Thu, 8 Nov 2007 01:00:16 +0000 (GMT) Message-ID: References: <9e4733910711071415i1729e277u6be19b72cd682a85@mail.gmail.com> <9e4733910711071445p7cfb6cffx83adb1d84d6bf9d8@mail.gmail.com> <9e4733910711071503va92a653s25fd978989d5917d@mail.gmail.com> <243E1E6E-4723-42D3-933C-D2A0D1ACE287@silverinsanity.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Brian Gernhardt , Jon Smirl , Git Mailing List , gitster@pobox.com To: David Symonds X-From: git-owner@vger.kernel.org Thu Nov 08 02:00:53 2007 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 1IpvlM-0006iw-HM for gcvg-git-2@gmane.org; Thu, 08 Nov 2007 02:00:53 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751023AbXKHBA0 (ORCPT ); Wed, 7 Nov 2007 20:00:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752999AbXKHBA0 (ORCPT ); Wed, 7 Nov 2007 20:00:26 -0500 Received: from mail.gmx.net ([213.165.64.20]:50218 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752663AbXKHBAZ (ORCPT ); Wed, 7 Nov 2007 20:00:25 -0500 Received: (qmail invoked by alias); 08 Nov 2007 01:00:23 -0000 Received: from unknown (EHLO openvpn-client) [138.251.11.103] by mail.gmx.net (mp020) with SMTP; 08 Nov 2007 02:00:23 +0100 X-Authenticated: #1490710 X-Provags-ID: V01U2FsdGVkX19r9Bo88mxrMLnqN7uhfZn8YLZ7TayiGyOWTshXFC gRFGKJtelZgvEa X-X-Sender: gene099@racer.site In-Reply-To: X-Y-GMX-Trusted: 0 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Hi, On Thu, 8 Nov 2007, David Symonds wrote: > On Nov 8, 2007 11:12 AM, Johannes Schindelin wrote: > > > > Signed-off-by: Johannes Schindelin > > --- > > > > This looks a bit ugly because quote_crlf() is now also called > > on the untracked files, which are not NUL terminated. > > > > Maybe someone has an idea how to do this more elegantly. > > > > builtin-runstatus.c | 1 + > > wt-status.c | 50 ++++++++++++++++++++++++++++++++++++++++++-------- > > wt-status.h | 1 + > > 3 files changed, 44 insertions(+), 8 deletions(-) > > Tested, and looks good. > > Now that I play with it, though, it seems that a few other bits of git > need updating to handle relative paths okay: > > $ cd gitweb/test > $ rm ../../wt-status.h > [oops, what a silly thing to do -- better checkout the latest > revision of it] > $ git status > # On branch next > # Changed but not updated: > # (use "git add/rm ..." to update what will be committed) > # > # deleted: ../../wt-status.h > no changes added to commit (use "git add" and/or "git commit -a") > $ git checkout HEAD ../../wt-status.h > fatal: git-ls-files: cannot generate relative filenames containing '..' > [grr....] > $ cd ../.. > $ git checkout HEAD . > [that works] Well, now that I did all the hard work with git-status, I leave this easy exercise for you ;-) Ciao, Dscho