Re: [PATCH 1/2] files_read_raw_ref: avoid infinite loop on broken symlinks

2016-10-06 Thread Johannes Sixt
Am 06.10.2016 um 18:48 schrieb Jeff King: +test_expect_success SYMLINKS 'ref resolution not confused by broken symlinks' ' + ln -s does-not-exist .git/broken && + test_must_fail git rev-parse --verify broken Hm, lower-case named refs directly in .git are frowned upon, no? If we eve

[PATCH 1/2] files_read_raw_ref: avoid infinite loop on broken symlinks

2016-10-06 Thread Jeff King
Our ref resolution first runs lstat() on any path we try to look up, because we want to treat symlinks specially (by resolving them manually and considering them symrefs). But if the results of `readlink` do _not_ look like a ref, we fall through to treating it like a normal file, and just read the