Re: git-annotate dies when a patch is missing trailing newline
- From
Junio C Hamano <junkio@cox.net>
- Date
- Mar 2, 2006, 02:07 UTC
- Message-ID
- <7vwtfdd2fu.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060302015303.GA27871@mythryan2.michonline.com>
Ryan Anderson <ryan@michonline.com> writes:
Show 7 quoted lines
>> git-annotate is dying when a patch is missing trailing newline. There >> _are_ valid situations where code files are not expected to have >> trailing newlines. Just thing of that glorious programming language, >> PHP. > > Can you point me at a tree that has this problem? I'll see what I can > do about fixing it tonight.
$ cat script #!/bin/sh
mkdir test-dir || exit cd test-dir git init-db echo 'A quick brown fox jumps over the' >file echo 'lazy dog' | tr -d '\012' >>file git add file git commit -a -m 'Initial.' echo 'A quick brown fox jumps over the' >file echo 'lazy dog' | tr -d '\012' >>file git commit -a -m 'Second.'
git annotate file $ rm -fr test-dir $ sh script defaulting to local storage area Committing initial tree 2850f9a320885b57bb410baffe972b19b17e9270 Use of uninitialized value in string ne at /home/junio/bin/Linux/git-annotate line 308, <$kid> line 10. Use of uninitialized value in sprintf at /home/junio/bin/Linux/git-annotate line 309, <$kid> line 10. Line 3 (3) does not match: | No newline at end of file | 1e698bcc5b142b542bf99a1a6f17864bc709dbf5 => 780bca516444e94219d4158b7fea97e763dcee6e $ echo $? 9 $ exit