mirror of
				https://git.proxmox.com/git/libgit2
				synced 2025-11-04 14:08:17 +00:00 
			
		
		
		
	revparse: unfound partially-named ref returns ENOTFOUND
This commit is contained in:
		
							parent
							
								
									cbc02c1021
								
							
						
					
					
						commit
						4de89ce72a
					
				@ -107,7 +107,7 @@ static int revparse_lookup_object(git_object **out, git_repository *repo, const
 | 
			
		||||
	git_buf_free(&refnamebuf);
 | 
			
		||||
 | 
			
		||||
	giterr_set(GITERR_REFERENCE, "Refspec '%s' not found.", spec);
 | 
			
		||||
	return GIT_ERROR;
 | 
			
		||||
	return GIT_ENOTFOUND;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -38,10 +38,9 @@ void test_refs_revparse__cleanup(void)
 | 
			
		||||
	cl_setenv("TZ", g_orig_tz);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void test_refs_revparse__nonexistant_object(void)
 | 
			
		||||
{
 | 
			
		||||
	cl_git_fail(git_revparse_single(&g_obj, g_repo, "this doesn't exist"));
 | 
			
		||||
	cl_assert_equal_i(GIT_ENOTFOUND, git_revparse_single(&g_obj, g_repo, "this doesn't exist"));
 | 
			
		||||
	cl_git_fail(git_revparse_single(&g_obj, g_repo, "this doesn't exist^1"));
 | 
			
		||||
	cl_git_fail(git_revparse_single(&g_obj, g_repo, "this doesn't exist~2"));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user