git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Check for differents trees

From
MCMarco Costalba <mcostalba@yahoo.it>
Date
Nov 6, 2005, 15:38 UTC
Message-ID
<20051106153830.18963.qmail@web26312.mail.ukl.yahoo.com>
Hi all,
   I need to check as fast as possible if two given trees (sha1 and sha2) have the same files.
What I use now is:
git-diff-tree -r --name-status sha1 sha2

An then I parse the output for 'A' or 'D' as first char of each line. When I found one of that two chars I kwnow trees have different files set.

The problem is that if sha1 and sha2 correspond to very "distant" revision the output of git-diff-tree can be very long and also usless as long as I stop searching at first match.

My question is if there is a better way, with the constrain of _not_ use a pipe of commands like git-diff-tree....| grep something.

The constrain belong from Qt process class that is not very friendly with shells.
Thanks for any help
Marco
 
		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
Next: Junio C Hamano
Message 1 of 3 in “Check for differents trees”
  1. Marco CostalbaNov 6, 2005
  2. Junio C HamanoNov 6, 2005
  3. Johannes SchindelinNov 6, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.