On Mon, Jan 18, 2010 at 11:51:36AM +0200, Ilari Liusvaara wrote: > Add --namespace=<namespace> option to rev-parse and everything that > accepts its options. This option matches all refs in some subnamespace > of refs hierarchy. Thanks, I think the code in this version looks good, but: > --- /dev/null > +++ b/t/t6018-rev-list-namespace.sh > [...] > +compare () { > + # Split arguments on whitespace. > + git $1 $2 | sort >expected && > + git $1 $3 | sort >actual && > + cmp expected actual > +} Please use test_cmp instead of regular cmp. Also, do you really need to sort? The internal ref code keeps the ref lists sorted by name, and we merge-sort the packed and loose lists in do_for_each_ref. So your --namespace should always operate on the refs in sorted order, producing predictable results. > +test_expect_success 'setup' ' > + > + commit master && > + git checkout -b subspace/one master > + commit one && > + git checkout -b subspace/two master > + commit two && > + git checkout -b subspace-x master > + commit subspace-x && > + git checkout -b other/three master > + commit three && > + git checkout -b someref master > + commit some && > + git checkout master && > + commit master2 > +' You are still missing some '&&' here to detect setup failures. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html