John Keeping <> writes:

>> > +for f in file file2 sub/sub
>> > +do
>> > +  echo "$f"
>> > +  readlink "$2/$f"
>> > +done >actual
>> > +EOF
>> When you later want to enhance the test to check a combination of
>> difftool arguments where some paths are expected to become links and
>> others are expected to become real files, wouldn't this helper
>> become a bit awkward to use?  The element that expects a real file
>> could be an empty line to what corresponds to the output from
>> readlink, but still...
>> ...
> It looks like t3903 uses "ls -l" for this sort of test, perhaps
> something like this covers these cases better:
> ...
>     grep "-> $workdir/file" file.actual

Writing it without -e would confuse some implementations of grep
into thinking "-" introduces an option, realizing it does not
support the "->" option, and then barfing ;-)

What I had in mind was more along the lines of...

        for f
                echo "$f"
                readlink "$2/$f" || echo "# not a link $f"

so that your "expect" list can become

        # not a link modifiedone.txt

In any case, this "say blank if you expect a non symlink" is not an
urgent issue that needs to be fixed or anything like that, so let's
queue the v2 for now and see what happens.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to