From: Junio C Hamano Date: Thu, 31 Oct 2013 18:26:11 GMT Subject: Re: [PATCH v5 06/10] fast-export: add new --refspec option Message-ID: In-Reply-To: <1383212197-14259-6-git-send-email-felipe.contreras@gmail.com> Felipe Contreras writes: > +test_expect_success 'use refspec' ' > + git fast-export --refspec refs/heads/master:refs/heads/foobar master | \ > + grep "^commit " | sort | uniq > actual && It feels somewhat redundant that you have to twice say that you are pushing your "master", once with --refspec and then the branch name. Is this the best we can do? If the answer is "yes", I guess it is OK to leave the external interface to fast-export of this patch as-is, but if we can do better, then we'd be better off without redundancy. There are quite a few shell script style violations in this test, by the way. You do not want the trailing " \" after a pipe (the shell, when seeing a line that ends with "|", knows you haven't finished giving it the pipeline). Also we do not put extra space between a redirection operator and the target filename. > + echo "commit refs/heads/foobar" > expected && > + test_cmp expected actual > +' > + > test_done