Subject: Re: diff-tree -r and new directories

From: Johannes Sixt <[email-masked]>
Date: Thu, 10 Apr 2008 09:24:59 +0200

Junio C Hamano schrieb:
> Johannes Sixt <[email-masked]> writes:
> 
>> In one of my scriptlets I have this:
>>
>>    git diff-tree -r --name-only --diff-filter=AM -z "$rev" HEAD --
>>
>> and I had assumed that only files would ever be listed because of the -r
>> switch. But this is not true: If there is a new directory, it lists only
>> the directory's name instead of the files. Is this the intent? Is it worth
>> changing?
> 
> Hmm. you would need a better reproduction recipe than that.

Heh. It turns out that the questionable directory is actually versioned by
git. My scriptlets have added it as a submodule while I looked in the
other direction:

  $ git diff --summary $rev.. -- . | cat
  create mode 160000 D/Project/foo

:-) Problem solved. Thank you.

-- Hannes