commit fc2225adf10d92baa1e52d02e9dcafa196a740a1 from: Stefan Sperling via: Thomas Adam date: Tue May 28 12:01:21 2024 UTC fix confusing error message from 'got commit' upon uncommitable paths commit - 5ae14b292cd623e5706b501d92a926c2308ba1b6 commit + fc2225adf10d92baa1e52d02e9dcafa196a740a1 blob - 1e9dcbabbf610fad4051df25fb2ef9897b3ac524 blob + ab956a423f92182b7297fd6ffdd761931a25fc5d --- lib/worktree.c +++ lib/worktree.c @@ -6532,7 +6532,7 @@ check_path_is_commitable(const char *path, } if (cpe == NULL) - return got_error_path(path, GOT_ERR_BAD_PATH); + return got_error_path(path, GOT_ERR_COMMIT_NO_CHANGES); return NULL; } blob - 5f92bc4c5f41eaab6b2619e4a75bc863402edc0c blob + c8651ab26909a5ce8ff104fcc69b1029cc18605e --- regress/cmdline/commit.sh +++ regress/cmdline/commit.sh @@ -638,7 +638,8 @@ test_commit_selected_paths() { test_done "$testroot" "1" return 1 fi - echo "got: nonexistent: bad path" > $testroot/stderr.expected + echo "got: nonexistent: no changes to commit" \ + > $testroot/stderr.expected cmp -s $testroot/stderr.expected $testroot/stderr ret=$?