commit eb59b6d4903198c69021bb80110c5dea0f7a7bc2 from: Stefan Sperling date: Thu Jul 23 14:21:28 2020 UTC show path in error message when blaming a symlink pointing to a directory commit - 0587e10c4c4e054f8aeda2bd499b76c0ec60dc40 commit + eb59b6d4903198c69021bb80110c5dea0f7a7bc2 blob - ab4db7cd394dd2226cb63800aa4dc8c0d517c846 blob + d2353a4d430b6ae349341d2bfac864d65c2a9a7a --- got/got.c +++ got/got.c @@ -4230,7 +4230,8 @@ cmd_blame(int argc, char *argv[]) goto done; if (obj_type != GOT_OBJ_TYPE_BLOB) { - error = got_error(GOT_ERR_OBJ_TYPE); + error = got_error_path(link_target ? link_target : in_repo_path, + GOT_ERR_OBJ_TYPE); goto done; } blob - d3a3bf3015086c89a0e41790e267184927b15cee blob + 171849c46606421d957f9db7406193faf834319f --- regress/cmdline/blame.sh +++ regress/cmdline/blame.sh @@ -831,7 +831,7 @@ function test_blame_symlink { fi # blame dereferences symlink to a directory - echo "got: wrong type of object" > $testroot/stderr.expected + echo "got: /epsilon: wrong type of object" > $testroot/stderr.expected cmp -s $testroot/stderr.expected $testroot/stderr ret="$?" if [ "$ret" != "0" ]; then