t1405: explictly delete reflogs for reftable
Deleting a ref in reftable just records a (ObjectID => ZeroID) transaction in the reflog. To ensure 'for_each_reflog()' test below works, explictly delete reflogs for deleted refs. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
		 Han-Wen Nienhuys
					Han-Wen Nienhuys
				
			
				
					committed by
					
						 Junio C Hamano
						Junio C Hamano
					
				
			
			
				
	
			
			
			 Junio C Hamano
						Junio C Hamano
					
				
			
						parent
						
							5d01301f2b
						
					
				
				
					commit
					5e00514745
				
			| @ -40,6 +40,12 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' ' | ||||
| 	test_must_fail git rev-parse refs/tags/new-tag -- | ||||
| ' | ||||
|  | ||||
| # In reftable, we keep the reflogs around for deleted refs. | ||||
| test_expect_success !REFFILES 'delete-reflog(FOO, refs/tags/new-tag)' ' | ||||
| 	$RUN delete-reflog FOO && | ||||
| 	$RUN delete-reflog refs/tags/new-tag | ||||
| ' | ||||
|  | ||||
| test_expect_success 'rename_refs(main, new-main)' ' | ||||
| 	git rev-parse main >expected && | ||||
| 	$RUN rename-ref refs/heads/main refs/heads/new-main && | ||||
|  | ||||
		Reference in New Issue
	
	Block a user