git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric Wong <normalperson@yhbt.net>,
	Anton Gyllenberg <anton@iki.fi>,
	git@vger.kernel.org
Subject: Re: [PATCH] tree_entry_interesting: Only recurse when the pathspec is a leading path component
Date: Thu, 2 Apr 2009 13:38:51 +0200	[thread overview]
Message-ID: <20090402113851.GA12675@atjola.homenet> (raw)
In-Reply-To: <7vbprfn0ai.fsf@gitster.siamese.dyndns.org>

On 2009.04.01 21:32:05 -0700, Junio C Hamano wrote:
> I'm planning to queue this.
> [Improved version of my patch]

Ah, thanks. Got busy with other stuff, and tried to fix another related
bug in ls-tree which made me forget to send the match_tree_entry fix :-/

That other ls-tree bug is with recursing into subdirectories, because
match_tree_entry matches even when the base is a subdirectory, but
ls-tree doesn't actually want that behaviour, I think. For example:

$ git ls-tree --abbrev HEAD git-gui/macosx/AppMain.tcl
100644 blob ddbe633	git-gui/macosx/AppMain.tcl

$ git ls-tree --abbrev HEAD  git-gui/
100644 blob f96112d	git-gui/.gitattributes
100644 blob 6483b21	git-gui/.gitignore
100755 blob b3f937e	git-gui/GIT-VERSION-GEN
100644 blob 3ad8a21	git-gui/Makefile
100755 blob 12e117e	git-gui/git-gui--askpass
100755 blob e018e07	git-gui/git-gui.sh
040000 tree f723285	git-gui/lib
040000 tree 73f3c34	git-gui/macosx
040000 tree 11cd1a0	git-gui/po
040000 tree 144728d	git-gui/windows

$ git ls-tree --abbrev HEAD git-gui/macosx/AppMain.tcl git-gui/
100644 blob f96112d	git-gui/.gitattributes
100644 blob 6483b21	git-gui/.gitignore
100755 blob b3f937e	git-gui/GIT-VERSION-GEN
100644 blob 3ad8a21	git-gui/Makefile
100755 blob 12e117e	git-gui/git-gui--askpass
100755 blob e018e07	git-gui/git-gui.sh
040000 tree f723285	git-gui/lib
100644 blob ddbe633	git-gui/macosx/AppMain.tcl
100644 blob b3bf15f	git-gui/macosx/Info.plist
100644 blob 77d88a7	git-gui/macosx/git-gui.icns
040000 tree 11cd1a0	git-gui/po
040000 tree 144728d	git-gui/windows

The last ls-tree shows all entries from git-gui/macosx/, beacuse the
first pattern makes it descend into that tree and all entries are
matched by the git-gui/ prefix. So the combined ls-tree shows more than
what the individual calls show. Seems wrong to me, but I'm unsure how to
tackle that, assuming that match_tree_entry is right in allowing any
base that's a subdirectory of a specified pathspec.

Björn

  parent reply	other threads:[~2009-04-02 11:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 10:31 svn clone Checksum mismatch question Gilbert Liddell
2009-03-26 13:02 ` Björn Steinbrink
2009-03-26 13:28   ` Gilbert Liddell
2009-03-26 13:54     ` Sverre Rabbelier
2009-03-26 14:18       ` Gilbert Liddell
2009-03-26 14:34       ` Johannes Schindelin
2009-03-26 14:35   ` Anton Gyllenberg
2009-03-27 11:18     ` Anton Gyllenberg
2009-03-29  6:08       ` Eric Wong
2009-03-29  6:10         ` [PATCH] git-svn: fix ls-tree usage with dash-prefixed paths Eric Wong
2009-03-29 20:33           ` Junio C Hamano
2009-03-29 21:56             ` Eric Wong
2009-03-30  6:44               ` Junio C Hamano
2009-03-30 17:41                 ` Eric Wong
2009-03-30 18:05                   ` Junio C Hamano
2009-03-30 22:58                     ` Eric Wong
2009-03-31  7:11                       ` Björn Steinbrink
2009-03-31  7:31                         ` Björn Steinbrink
2009-03-31  9:41                           ` Björn Steinbrink
2009-03-31 15:05                             ` [PATCH] tree_entry_interesting: Only recurse when the pathspec is a leading path component Björn Steinbrink
2009-04-02  4:32                               ` Junio C Hamano
2009-04-02  4:41                                 ` [PATCH] match_tree_entry(): a pathspec only matches at directory boundaries Junio C Hamano
2009-04-02 16:36                                   ` Linus Torvalds
2009-04-02 11:38                                 ` Björn Steinbrink [this message]
2009-04-03 16:25                                   ` [PATCH] tree_entry_interesting: Only recurse when the pathspec is a leading path component Junio C Hamano
2009-03-30  5:28             ` [PATCH] git-svn: fix ls-tree usage with dash-prefixed paths Björn Steinbrink
2009-03-30  7:26         ` svn clone Checksum mismatch question Anton Gyllenberg
2009-03-26 14:34 ` Peter Harris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090402113851.GA12675@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=anton@iki.fi \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).