Skip to content

Commit 546295f

Browse files
committed
git-zclone: update help suggestion for file:///path/name cloning
1 parent 0b963c3 commit 546295f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

git-zclone

+6-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
### just the fresh repository.
2626
### Also note that this did not yet intend to support cloning of bare repos.
2727
###
28-
### Copyright (C) 2013-2020 by Jim Klimov <[email protected]>, License: MIT
28+
### Copyright (C) 2013-2022 by Jim Klimov <[email protected]>, License: MIT
2929
### https://github.com/jimklimov/git-scripts
3030

3131
do_git_zfs_clone() {
@@ -113,8 +113,11 @@ case "$FROM" in
113113
echo "Required: FROM must exist as a directory" >&2 && return 1
114114
[ ! -d "$FROM/.git" ] && \
115115
echo "Required: FROM must be a Git repository" >&2 && return 1
116-
[ ! -d "$FROM/.zfs/snapshot" ] && \
117-
echo "Required: FROM must be a ZFS POSIX dataset" >&2 && return 1
116+
[ ! -d "$FROM/.zfs/snapshot" ] && { \
117+
echo "Required: FROM must be a ZFS POSIX dataset"
118+
echo "To clone from arbitrary local directory, please use URL format, e.g.:"
119+
echo " $0 file://$FROM $*"
120+
} >&2 && return 1
118121

119122
FROMDS="`cd "$FROMPATH" && /bin/df -k . | GREP_OPTIONS= grep / | head -1 | awk '{print $1}'`" || \
120123
FROMDS=""

0 commit comments

Comments
 (0)