Rename loom → norn
The project is now norn: .loom/ is .norn/, loomctl is nornctl (NORNCTL_* env vars, ~/.config/nornctl), and the Gitea org is norn. Event logs moved with the directory but their text is unchanged — they are a record of what was decided at the time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c6354c95fa
commit
dde7183528
36 files changed
+216
-216
No files matched your search
Vendored
+10
-10
@@ -19,26 +19,26 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/config"
|
||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/lock"
|
||||
"git.hypertheory-labs.dev/norn/norn-cli/internal/config"
|
||||
"git.hypertheory-labs.dev/norn/norn-cli/internal/lock"
|
||||
)
|
||||
|
||||
var client = &http.Client{Timeout: 30 * time.Second}
|
||||
|
||||
// FindRoot walks up from dir looking for the .loom directory that marks a
|
||||
// repository using loom.
|
||||
// FindRoot walks up from dir looking for the .norn directory that marks a
|
||||
// repository using norn.
|
||||
func FindRoot(dir string) (string, error) {
|
||||
d, err := filepath.Abs(dir)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
for {
|
||||
if fi, err := os.Stat(filepath.Join(d, ".loom")); err == nil && fi.IsDir() {
|
||||
if fi, err := os.Stat(filepath.Join(d, ".norn")); err == nil && fi.IsDir() {
|
||||
return d, nil
|
||||
}
|
||||
parent := filepath.Dir(d)
|
||||
if parent == d {
|
||||
return "", errors.New("no .loom directory found in this directory or any parent")
|
||||
return "", errors.New("no .norn directory found in this directory or any parent")
|
||||
}
|
||||
d = parent
|
||||
}
|
||||
@@ -47,7 +47,7 @@ func FindRoot(dir string) (string, error) {
|
||||
// localPath derives where an adopted document is kept from the URL it came from.
|
||||
//
|
||||
// The path is for a person: <host>/<owner>/<repo>/<basename>. It deliberately
|
||||
// does not encode the route, the branch, or .loom/published/ — which is why it
|
||||
// does not encode the route, the branch, or .norn/published/ — which is why it
|
||||
// cannot be turned back into a URL, and why the lock records the origin.
|
||||
func localPath(raw string) (string, error) {
|
||||
u, err := url.Parse(raw)
|
||||
@@ -109,7 +109,7 @@ func Add(root, raw, override string, out io.Writer) error {
|
||||
_, isLocked := locks.Get(rel)
|
||||
|
||||
if isLocked {
|
||||
return fmt.Errorf("%s is already adopted — `loomctl external check` is what notices it moving", rel)
|
||||
return fmt.Errorf("%s is already adopted — `nornctl external check` is what notices it moving", rel)
|
||||
}
|
||||
|
||||
body, etag, err := fetch(cfg, raw, "")
|
||||
@@ -250,7 +250,7 @@ func warnIfNotPublic(root, raw, vis string, out io.Writer) {
|
||||
fmt.Fprintf(out, " readable than the repository you are adopting into.\n")
|
||||
fmt.Fprintf(out, " Two ways out: ask them to publish it — usually the thing you\n")
|
||||
fmt.Fprintf(out, " needed was not the confidential part — or keep no copy and\n")
|
||||
fmt.Fprintf(out, " record only the dependency, which loomctl cannot do yet.\n")
|
||||
fmt.Fprintf(out, " record only the dependency, which nornctl cannot do yet.\n")
|
||||
}
|
||||
|
||||
// NotFoundError is a 404, which over HTTP carries more than one reading.
|
||||
@@ -407,7 +407,7 @@ func checkUnlocked(cfg *config.Config, root, rel string, locks *lock.Set, open b
|
||||
// Without a lock we have no origin, and the path does not round-trip to a
|
||||
// URL, so there is nothing to ask and nowhere to ask it. Supplying the URL
|
||||
// through add is the only way out.
|
||||
return Status{rel, "unlocked", "no origin recorded — `loomctl external add <url>` supplies it without rewriting this copy"}, 0
|
||||
return Status{rel, "unlocked", "no origin recorded — `nornctl external add <url>` supplies it without rewriting this copy"}, 0
|
||||
}
|
||||
|
||||
func usagesNote(root, rel string) string {
|
||||
|
||||
Reference in new issue
Block a user