Re: [PATCH] diff: add tests for --relative without optional prefix value

2 messages, 2 authors, 2017-12-07 · open the first message on its own page

Re: [PATCH] diff: add tests for --relative without optional prefix value

From: Junio C Hamano <hidden>
Date: 2017-12-07 19:17:45

Jacob Keller [off-list ref] writes:
 for type in diff numstat stat raw; do
-	check_$type file2 --relative=subdir/
-	check_$type file2 --relative=subdir
-	check_$type dir/file2 --relative=sub
+	check_$type . file2 --relative=subdir/
+	check_$type . file2 --relative=subdir
+	check_$type . dir/file2 --relative=sub
+	check_$type subdir file2 --relative
OK, I didn't think it would be sensible to unconditionally pass the
directory and use "-C ." as a no-op.  It looks good.

I think the new one should go before the dir/file2 test; all three
earlier tests (including this new one) are about taking a patch
relative to subdir/ spelled in different ways, and the one about
dir/file2 alone is different.

Re: [PATCH] diff: add tests for --relative without optional prefix value

From: Jacob Keller <hidden>
Date: 2017-12-07 19:54:29

On Thu, Dec 7, 2017 at 11:17 AM, Junio C Hamano [off-list ref] wrote:
Jacob Keller [off-list ref] writes:
quoted
 for type in diff numstat stat raw; do
-     check_$type file2 --relative=subdir/
-     check_$type file2 --relative=subdir
-     check_$type dir/file2 --relative=sub
+     check_$type . file2 --relative=subdir/
+     check_$type . file2 --relative=subdir
+     check_$type . dir/file2 --relative=sub
+     check_$type subdir file2 --relative
OK, I didn't think it would be sensible to unconditionally pass the
directory and use "-C ." as a no-op.  It looks good.

I think the new one should go before the dir/file2 test; all three
earlier tests (including this new one) are about taking a patch
relative to subdir/ spelled in different ways, and the one about
dir/file2 alone is different.
Yea, your patch looked fine to me, minus the use of subshells where we
could avoid it.

I'm fine taking your version.

Thanks,
Jake
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help