All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Duelli <duelli@melosgmbh.de>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: spearce@spearce.org, git@vger.kernel.org
Subject: Re: Is a given file known to git?
Date: Tue, 11 Mar 2008 10:41:32 +0100	[thread overview]
Message-ID: <47D653CC.3070306@melosgmbh.de> (raw)
In-Reply-To: <47D652A9.4090304@viscovery.net>

Johannes Sixt schrieb:
> Christoph Duelli schrieb:
>> Yes, thank you, Johannes and Shawn, this works.
>> (A bit slow, though: with this test enabled my script takes 77 secs;
>> without it it takes 0.3 secs. The time is spent in 9000 calls to the
>> above test (the rev-parse version). (ok, the fact that there is a Perl
>> system call around it might take some time, too).)
> 
> Oh, you said "a particular path from a bash script". If you had said "9000
> particular paths, and I have perl wrapped around it", then there might be
> (much) better solutions. Like parsing the output of "git ls-files
> --others" or "git ls-tree -r" into a hash and then lookup therein.
> 
> -- Hannes
Right you are ;-)
I just assumed that such a test would be quick, so I didn't worry about 
speed back then. But yes, parsing the output of "igt ls-files" would 
solve that nicely.

Thank you.

-- 
Christoph Duelli

  reply	other threads:[~2008-03-11  9:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11  7:15 Is a given file known to git? Christoph Duelli
2008-03-11  7:24 ` Shawn O. Pearce
2008-03-11  7:38 ` Johannes Sixt
2008-03-11  9:27   ` Christoph Duelli
2008-03-11  9:36     ` Johannes Sixt
2008-03-11  9:41       ` Christoph Duelli [this message]
2008-03-11  9:45     ` Junio C Hamano

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=47D653CC.3070306@melosgmbh.de \
    --to=duelli@melosgmbh.de \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=spearce@spearce.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.