Git development
 help / color / mirror / Atom feed
* [BUG] git ls-files -m --with-tree does double output
@ 2008-09-24 16:19 Anders Melchiorsen
  2008-09-26 22:50 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Anders Melchiorsen @ 2008-09-24 16:19 UTC (permalink / raw)
  To: git

I think that this is wrong? The combination of -m and --with-tree
shows duplicate entries. Git 1.6.0.2.


Cheers,
Anders.


and@dylle:~$ mkdir repo ; cd repo
and@dylle:~/repo$ git init
Initialized empty Git repository in /home/and/repo/.git/
and@dylle:~/repo$ date >a ; git add a ; git commit -m'Add 1'
Created initial commit c027435: Add 1
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
and@dylle:~/repo$ date >a
and@dylle:~/repo$ git ls-files -m --with-tree=HEAD
a
a

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [BUG] git ls-files -m --with-tree does double output
@ 2008-11-13 21:53 Anders Melchiorsen
  2008-11-13 22:35 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Anders Melchiorsen @ 2008-11-13 21:53 UTC (permalink / raw)
  To: gitster; +Cc: git

Junio, I am resending this one because I am not sure whether you ignored
it on purpose, or it got lost during your vacation.

The combination of -m and --with-tree shows duplicate entries:

and@dylle:~$ mkdir repo ; cd repo
and@dylle:~/repo$ git init
Initialized empty Git repository in /home/and/repo/.git/
and@dylle:~/repo$ date >a ; git add a ; git commit -m'Add 1'
Created initial commit c027435: Add 1
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
and@dylle:~/repo$ date >a
and@dylle:~/repo$ git ls-files -m --with-tree=HEAD
a
a


Jeff King added:

I have confirmed this, and it looks like it has always been that way. It
looks like overlay_tree_on_cache just does a read_tree to pull the tree
into the index, and then we end up with duplicate entries.

I'm not too familiar with the read_tree code, so I am cc'ing Junio (who
is out of touch for a little while) and Linus, who are much more clueful
in this area.

It isn't clear to me which code is _supposed_ to be pulling out such
duplicates here. That is, is read_tree broken, or is
overlay_tree_on_cache just calling it wrong?



Anders.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-16  9:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-24 16:19 [BUG] git ls-files -m --with-tree does double output Anders Melchiorsen
2008-09-26 22:50 ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2008-11-13 21:53 Anders Melchiorsen
2008-11-13 22:35 ` Junio C Hamano
2008-11-13 22:39   ` Junio C Hamano
2008-11-13 23:11   ` Anders Melchiorsen
2008-11-16  8:03     ` Junio C Hamano
2008-11-16  9:00       ` Anders Melchiorsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox