Fossil SCM

added "clonly" command as alternate form of "clone --no-open"

scott 2022-01-14 16:34 trunk
Commit 3598e3ae53d0a7238988e39a0e05431f0fc231c5c672a20551a389fd0f23a674
1 file changed +5
--- src/clone.c
+++ src/clone.c
@@ -79,10 +79,11 @@
7979
}
8080
8181
8282
/*
8383
** COMMAND: clone
84
+** COMMAND: clonly
8485
**
8586
** Usage: %fossil clone ?OPTIONS? URI ?FILENAME?
8687
**
8788
** Make a clone of a repository specified by URI in the local
8889
** file named FILENAME. If FILENAME is omitted, then an appropriate
@@ -152,10 +153,14 @@
152153
int noOpen = find_option("no-open",0,0)!=0;
153154
int allowNested = find_option("nested",0,0)!=0; /* Used by open */
154155
const char *zRepo = 0; /* Name of the new local repository file */
155156
const char *zWorkDir = 0; /* Open in this directory, if not zero */
156157
158
+ /* Support alt command that is less verbose than clone --no-open */
159
+ if(0==fossil_strcmp("clonly", g.zCmdName)){
160
+ noOpen = 1;
161
+ }
157162
158163
/* Also clone private branches */
159164
if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
160165
if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
161166
if( find_option("save-http-password",0,0)!=0 ){
162167
--- src/clone.c
+++ src/clone.c
@@ -79,10 +79,11 @@
79 }
80
81
82 /*
83 ** COMMAND: clone
 
84 **
85 ** Usage: %fossil clone ?OPTIONS? URI ?FILENAME?
86 **
87 ** Make a clone of a repository specified by URI in the local
88 ** file named FILENAME. If FILENAME is omitted, then an appropriate
@@ -152,10 +153,14 @@
152 int noOpen = find_option("no-open",0,0)!=0;
153 int allowNested = find_option("nested",0,0)!=0; /* Used by open */
154 const char *zRepo = 0; /* Name of the new local repository file */
155 const char *zWorkDir = 0; /* Open in this directory, if not zero */
156
 
 
 
 
157
158 /* Also clone private branches */
159 if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
160 if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
161 if( find_option("save-http-password",0,0)!=0 ){
162
--- src/clone.c
+++ src/clone.c
@@ -79,10 +79,11 @@
79 }
80
81
82 /*
83 ** COMMAND: clone
84 ** COMMAND: clonly
85 **
86 ** Usage: %fossil clone ?OPTIONS? URI ?FILENAME?
87 **
88 ** Make a clone of a repository specified by URI in the local
89 ** file named FILENAME. If FILENAME is omitted, then an appropriate
@@ -152,10 +153,14 @@
153 int noOpen = find_option("no-open",0,0)!=0;
154 int allowNested = find_option("nested",0,0)!=0; /* Used by open */
155 const char *zRepo = 0; /* Name of the new local repository file */
156 const char *zWorkDir = 0; /* Open in this directory, if not zero */
157
158 /* Support alt command that is less verbose than clone --no-open */
159 if(0==fossil_strcmp("clonly", g.zCmdName)){
160 noOpen = 1;
161 }
162
163 /* Also clone private branches */
164 if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
165 if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
166 if( find_option("save-http-password",0,0)!=0 ){
167

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button