Merge pull request #3010 from ethomson/checkout_invalid_path_err

checkout: report correct invalid path
This commit is contained in:
Carlos Martín Nieto 2015-03-24 10:18:44 +01:00
commit 7c3834d124

View File

@ -1197,7 +1197,7 @@ static int checkout_verify_paths(
if (action & ~CHECKOUT_ACTION__REMOVE) { if (action & ~CHECKOUT_ACTION__REMOVE) {
if (!git_path_isvalid(repo, delta->new_file.path, flags)) { if (!git_path_isvalid(repo, delta->new_file.path, flags)) {
giterr_set(GITERR_CHECKOUT, "Cannot checkout to invalid path '%s'", delta->old_file.path); giterr_set(GITERR_CHECKOUT, "Cannot checkout to invalid path '%s'", delta->new_file.path);
return -1; return -1;
} }
} }