 d9213e4716
			
		
	
	d9213e4716
	
	
	
		
			
			With the new "unsafe" SHA-1 build knob, it is convenient to have a test-tool that can exercise Git's unsafe SHA-1 wrappers for testing, similar to 't/helper/test-tool sha1'. Implement that helper by altering the implementation of that test-tool (in cmd_hash_impl(), which is generic and parameterized over different hash functions) to conditionally run the unsafe variants of the chosen hash function, and expose the new behavior via a new 'sha1-unsafe' test helper. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
		
			
				
	
	
		
			8 lines
		
	
	
		
			138 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
		
			138 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include "test-tool.h"
 | |
| #include "hash.h"
 | |
| 
 | |
| int cmd__sha256(int ac, const char **av)
 | |
| {
 | |
| 	return cmd_hash_impl(ac, av, GIT_HASH_SHA256, 0);
 | |
| }
 |