Commit 7c3834d12485f146450cf5d7c3ceff3c8430e7ef

Carlos Martín Nieto 2015-03-24T10:18:44

Merge pull request #3010 from ethomson/checkout_invalid_path_err checkout: report correct invalid path

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/checkout.c b/src/checkout.c
index b106c11..0b6e298 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -1197,7 +1197,7 @@ static int checkout_verify_paths(
 
 	if (action & ~CHECKOUT_ACTION__REMOVE) {
 		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;
 		}
 	}