summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux2022-02-24 09:53:04 +0100
committerQuentin Carbonneaux2022-02-24 09:55:31 +0100
commit8fe4eaa0fbfd2b92071ab1d4de7ef84adfa3db00 (patch)
treeddb88c028065069fb196c3a316b1f962bcbe97e3
parent4e9fa669b54f35634ca378d92666e7d6df755273 (diff)
[mx] be recursive by default
-rw-r--r--memex/main.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/memex/main.go b/memex/main.go
index 5c33385..8f220f5 100644
--- a/memex/main.go
+++ b/memex/main.go
@@ -374,7 +374,7 @@ type walkArgs struct {
cur string
rev string
paths []string
- deep bool
+ norec bool
verb bool
}
@@ -394,7 +394,7 @@ func walkCmd(args walkArgs) {
faile(err)
}
if len(p) > 0 && p[len(p)-1] == '/' {
- walkDir(wp, args.deep, args.verb)
+ walkDir(wp, !args.norec, args.verb)
} else {
walkEnt(wp, wp.Here(), args.verb)
}
@@ -482,7 +482,7 @@ type diffArgs struct {
arev string
brev string
paths []string
- deep bool
+ norec bool
shush bool
}
@@ -509,7 +509,7 @@ func diffCmd(args diffArgs) int {
wb = walkRevAt(rd, args.brev, args.cur)
}
- chgs, err := Diff(wa, wb, simpleDiff, args.deep)
+ chgs, err := Diff(wa, wb, simpleDiff, !args.norec)
if err != nil {
faile(err)
}
@@ -1056,23 +1056,23 @@ var docs = map[string][]UsageAlt{
-r starting revision, default is .`,
}},
"walk": {{
- "[-R] [-v] [-r REV] [PATH ...]",
+ "[-S] [-v] [-r REV] [PATH ...]",
`Dumps the archive contents at the given revision
and paths; if the path list is empty, it is taken
to be /
-r revision to walk, default is .
- -R recursively walk directories
+ -S shallow walk (stop on directories)
-v verbose output`,
}},
"diff": {{
- "[-R] [-s] [-a REVA] [-b REVB]",
+ "[-S] [-s] [-a REVA] [-b REVB]",
`Diffs revision '-a' against revision '-b';
if '-b' is missing, the file system is
compared; if '-a' is missing REVB^ is used;
if both are missing '-a' is taken to be .
- -R recursive diff
+ -S shallow diff (stop on directories)
-s silent mode, exit with code 1
if revisions differ, 0 if they
do not, and 2 if errors`,
@@ -1210,7 +1210,7 @@ func main() {
var args walkArgs
cmd := flag.NewFlagSet("walk", flag.ContinueOnError)
cmd.StringVar(&args.rev, "r", ".", "")
- cmd.BoolVar(&args.deep, "R", false, "")
+ cmd.BoolVar(&args.norec, "S", false, "")
cmd.BoolVar(&args.verb, "v", false, "")
parseArgs("walk", cmd)
@@ -1223,7 +1223,7 @@ func main() {
cmd := flag.NewFlagSet("diff", flag.ContinueOnError)
cmd.StringVar(&args.arev, "a", "", "")
cmd.StringVar(&args.brev, "b", "", "")
- cmd.BoolVar(&args.deep, "R", false, "")
+ cmd.BoolVar(&args.norec, "S", false, "")
cmd.BoolVar(&args.shush, "s", false, "")
parseArgs("diff", cmd)