From: Petr Baudis Subject: Re: [PATCH 6/8] ls-tree: work from subdirectory. Date: Sun, 27 Nov 2005 19:22:44 +0100 Message-ID: <20051127182244.GK22159@pasky.or.cz> References: <7vmzjtn3h1.fsf@assigned-by-dhcp.cox.net> <7vy83cdu7r.fsf@assigned-by-dhcp.cox.net> <7voe477n4i.fsf_-_@assigned-by-dhcp.cox.net> <7vpson4tqi.fsf@assigned-by-dhcp.cox.net> <7vr792fnta.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Junio C Hamano , Git Mailing List X-From: git-owner@vger.kernel.org Sun Nov 27 19:23:47 2005 Return-path: Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgRAW-0000ib-UQ for gcvg-git@gmane.org; Sun, 27 Nov 2005 19:22:33 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751140AbVK0SW3 (ORCPT ); Sun, 27 Nov 2005 13:22:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751139AbVK0SW3 (ORCPT ); Sun, 27 Nov 2005 13:22:29 -0500 Received: from w241.dkm.cz ([62.24.88.241]:16560 "EHLO machine.or.cz") by vger.kernel.org with ESMTP id S1751135AbVK0SW3 (ORCPT ); Sun, 27 Nov 2005 13:22:29 -0500 Received: (qmail 11343 invoked by uid 2001); 27 Nov 2005 19:22:44 +0100 To: Linus Torvalds Content-Disposition: inline In-Reply-To: X-message-flag: Outlook : A program to spread viri, but it can do mail too. User-Agent: Mutt/1.5.11 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Dear diary, on Sun, Nov 27, 2005 at 07:01:37PM CET, I got a letter where Linus Torvalds said that... > If you use "-r", it acts the way you'd expect. If you _don't_ use "-r", it > acts strangely, but very consistently with git-diff-tree: it only ever > shows the _first_ part of a pathname. So > > git-ls-tree HEAD drivers/char/ > > should show just one entry: "drivers". While adding a "-r" should show all > files under drivers (and the trees leading up to it). > > And yes, you're right. That's a much bigger change by my suggested diff, > and more likely to cause confusion. Ugh. That's really weird. Wouldn't a better approach be to fix git-ls-files to behave more sanely? (That is, listing the entry for drivers/char instead of drivers?) -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ VI has two modes: the one in which it beeps and the one in which it doesn't.