summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-08-10 20:29:42 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2014-08-12 18:07:41 +0100
commit2e5d8664920453ede30b450c7b39ac3a0bc141bb (patch)
treee0954f648bba232b654d86bfc96e8d644c88c237 /yarns
parent4d794d475e01363928916f7667a63eed6071f5e2 (diff)
downloadmorph-2e5d8664920453ede30b450c7b39ac3a0bc141bb.tar.gz
Make morph show-branch-root print the path
The help for the show-branch-root command said it returns a path, but the command and the yarns just showed the aliased url it was cloned from. Given I found myself needing the path in some scripts, not the repo url, I think it's more useful to reconcile the difference this way.
Diffstat (limited to 'yarns')
-rw-r--r--yarns/branches-workspaces.yarn10
-rw-r--r--yarns/implementations.yarn2
2 files changed, 6 insertions, 6 deletions
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn
index 2f617ce4..25ea7365 100644
--- a/yarns/branches-workspaces.yarn
+++ b/yarns/branches-workspaces.yarn
@@ -142,19 +142,19 @@ current directory, things should fail.
AND the user attempts to report the system branch from the directory .
THEN morph failed
-`morph show-branch-root` reports the URL (possibly aliases) of the
-system branch root repository. It can be run inside a checkout, or
-somewhere outside a checkout, where exactly one checkout exists below.
+`morph show-branch-root` reports the path of the system branch root
+repository. It can be run inside a checkout, or somewhere outside a
+checkout, where exactly one checkout exists below.
SCENARIO morph reports system branch root repository
GIVEN a workspace
AND a git server
WHEN the user checks out the system branch called master
AND the user reports the system branch root repository from the directory master
- THEN the system branch root repository is reported as test:morphs
+ THEN the system branch root repository is reported as workspace/master/test/morphs
WHEN the user reports the system branch root repository from the directory .
- THEN the system branch root repository is reported as test:morphs
+ THEN the system branch root repository is reported as workspace/master/test/morphs
However, it fails if run outside a checkout and there's no system
branches checked out.
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index 66dd9d57..d2e72ccf 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -419,7 +419,7 @@ Report system branch root repository.
else attempt_morph show-branch-root > "$@"; fi
IMPLEMENTS THEN the system branch root repository is reported as (.*)
- echo "$MATCH_1" > "$DATADIR/branch-root.actual"
+ echo "$DATADIR/$MATCH_1" > "$DATADIR/branch-root.actual"
diff -u "$DATADIR/branch-root.actual" "$DATADIR/branch-root.reported"
Editing morphologies with `morph edit`.