{"thread":{"id":"36738","subject":"[PATCH] git-remote-testgit.sh: cleaned up the logic for setting the refspec variable","startedAt":"2014-05-23T16:17:42Z","lastAt":"2014-05-23T16:17:42Z","messageCount":1,"participants":["Elia Pinto"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"242575","messageId":"1400861862-6963-1-git-send-email-gitter.spiros@gmail.com","threadId":"36738","inReplyTo":null,"subject":"[PATCH] git-remote-testgit.sh: cleaned up the logic for setting the refspec variable","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2014-05-23T16:17:42Z","receivedAt":"2014-05-23T16:17:42Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"This patch makes the code more readable for setting\nthe refspec variable\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n git-remote-testgit.sh |   14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/git-remote-testgit.sh b/git-remote-testgit.sh\nindex 1c006a0..fb8a003 100755\n--- a/git-remote-testgit.sh\n+++ b/git-remote-testgit.sh\n@@ -4,18 +4,20 @@\n alias=$1\n url=$2\n \n+if test -z \"${GIT_REMOTE_TESTGIT_REFSPEC-notEmpty}\"\n+then\n+\t# only if it is explicitly set to an empty string...\n+\tprefix=refs\n+else\n+\tprefix=\"refs/testgit/$alias\"\n+fi\n dir=\"$GIT_DIR/testgit/$alias\"\n-prefix=\"refs/testgit/$alias\"\n-\n default_refspec=\"refs/heads/*:${prefix}/heads/*\"\n-\n refspec=\"${GIT_REMOTE_TESTGIT_REFSPEC-$default_refspec}\"\n-\n-test -z \"$refspec\" && prefix=\"refs\"\n+force=\n \n export GIT_DIR=\"$url/.git\"\n \n-force=\n \n mkdir -p \"$dir\"\n \n-- \n1.7.10.4\n"}]}