Thread (22 messages) flat view 22 messages, 6 authors, 2016-06-15

Re: [PATCH v4] fast-import: treat filemodify with empty tree as delete

From: Peter Baumann <hidden>
Date: 2016-06-15 22:50:28

On Thu, Jan 27, 2011 at 12:07:49AM -0600, Jonathan Nieder wrote:
quoted hunk ↗ jump to hunk
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 50d5913..8487734 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -818,6 +818,48 @@ test_expect_success \
 	 compare_diff_raw expect actual'
 
+test_expect_success \
+	'N: delete directory by copying' \
+	'cat >expect <<-\EOF &&
+	OBJID
+	:100644 000000 OBJID OBJID D	foo/bar/qux
+	OBJID
+	:000000 100644 OBJID OBJID A	foo/bar/baz
+	:000000 100644 OBJID OBJID A	foo/bar/qux
+	EOF
+	 empty_tree=$(git mktree </dev/null) &&
[ Feel free to ignore me ... ]

Just a (stupid?) suggestion: Why not put a $EMPTY_TREE definiton in test-lib.sh
(or any other global file sourced in the tests) so if another caller needs this
definition it won't waste cpu cycles doing the calculation via mktree < /dev/null
again?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help