Fossil SCM

Make -f an alias for --force on "fossil open".

drh 2020-08-18 13:54 trunk
Commit 17c244de219d29621eb67ee24ad92769be74b556c5e0eda7c40f4d671d57c4ee
1 file changed +3 -3
+3 -3
--- src/db.c
+++ src/db.c
@@ -3111,11 +3111,11 @@
31113111
**
31123112
** Options:
31133113
** --empty Initialize checkout as being empty, but still connected
31143114
** with the local repository. If you commit this checkout,
31153115
** it will become a new "initial" commit in the repository.
3116
-** --force Continue with the open even if the working directory is
3116
+** -f|--force Continue with the open even if the working directory is
31173117
** not empty.
31183118
** --force-missing Force opening a repository with missing content
31193119
** --keep Only modify the manifest and manifest.uuid files
31203120
** --nested Allow opening a repository inside an opened checkout
31213121
** --repodir DIR If REPOSITORY is a URI that will be cloned, store
@@ -3149,11 +3149,11 @@
31493149
forceMissingFlag = find_option("force-missing",0,0)!=0;
31503150
allowNested = find_option("nested",0,0)!=0;
31513151
setmtimeFlag = find_option("setmtime",0,0)!=0;
31523152
zWorkDir = find_option("workdir",0,1);
31533153
zRepoDir = find_option("repodir",0,1);
3154
- bForce = find_option("force",0,0)!=0;
3154
+ bForce = find_option("force","f",0)!=0;
31553155
zPwd = file_getcwd(0,0);
31563156
31573157
31583158
/* We should be done with options.. */
31593159
verify_all_options();
@@ -3188,11 +3188,11 @@
31883188
fossil_fatal("unable to make %s the working directory", zWorkDir);
31893189
}
31903190
}
31913191
if( keepFlag==0 && bForce==0 && file_directory_size(".", 0, 1)>0 ){
31923192
fossil_fatal("directory %s is not empty\n"
3193
- "use the --force option to override", file_getcwd(0,0));
3193
+ "use the -f or --force option to override", file_getcwd(0,0));
31943194
}
31953195
31963196
if( db_open_local_v2(0, allowNested) ){
31973197
fossil_fatal("there is already an open tree at %s", g.zLocalRoot);
31983198
}
31993199
--- src/db.c
+++ src/db.c
@@ -3111,11 +3111,11 @@
3111 **
3112 ** Options:
3113 ** --empty Initialize checkout as being empty, but still connected
3114 ** with the local repository. If you commit this checkout,
3115 ** it will become a new "initial" commit in the repository.
3116 ** --force Continue with the open even if the working directory is
3117 ** not empty.
3118 ** --force-missing Force opening a repository with missing content
3119 ** --keep Only modify the manifest and manifest.uuid files
3120 ** --nested Allow opening a repository inside an opened checkout
3121 ** --repodir DIR If REPOSITORY is a URI that will be cloned, store
@@ -3149,11 +3149,11 @@
3149 forceMissingFlag = find_option("force-missing",0,0)!=0;
3150 allowNested = find_option("nested",0,0)!=0;
3151 setmtimeFlag = find_option("setmtime",0,0)!=0;
3152 zWorkDir = find_option("workdir",0,1);
3153 zRepoDir = find_option("repodir",0,1);
3154 bForce = find_option("force",0,0)!=0;
3155 zPwd = file_getcwd(0,0);
3156
3157
3158 /* We should be done with options.. */
3159 verify_all_options();
@@ -3188,11 +3188,11 @@
3188 fossil_fatal("unable to make %s the working directory", zWorkDir);
3189 }
3190 }
3191 if( keepFlag==0 && bForce==0 && file_directory_size(".", 0, 1)>0 ){
3192 fossil_fatal("directory %s is not empty\n"
3193 "use the --force option to override", file_getcwd(0,0));
3194 }
3195
3196 if( db_open_local_v2(0, allowNested) ){
3197 fossil_fatal("there is already an open tree at %s", g.zLocalRoot);
3198 }
3199
--- src/db.c
+++ src/db.c
@@ -3111,11 +3111,11 @@
3111 **
3112 ** Options:
3113 ** --empty Initialize checkout as being empty, but still connected
3114 ** with the local repository. If you commit this checkout,
3115 ** it will become a new "initial" commit in the repository.
3116 ** -f|--force Continue with the open even if the working directory is
3117 ** not empty.
3118 ** --force-missing Force opening a repository with missing content
3119 ** --keep Only modify the manifest and manifest.uuid files
3120 ** --nested Allow opening a repository inside an opened checkout
3121 ** --repodir DIR If REPOSITORY is a URI that will be cloned, store
@@ -3149,11 +3149,11 @@
3149 forceMissingFlag = find_option("force-missing",0,0)!=0;
3150 allowNested = find_option("nested",0,0)!=0;
3151 setmtimeFlag = find_option("setmtime",0,0)!=0;
3152 zWorkDir = find_option("workdir",0,1);
3153 zRepoDir = find_option("repodir",0,1);
3154 bForce = find_option("force","f",0)!=0;
3155 zPwd = file_getcwd(0,0);
3156
3157
3158 /* We should be done with options.. */
3159 verify_all_options();
@@ -3188,11 +3188,11 @@
3188 fossil_fatal("unable to make %s the working directory", zWorkDir);
3189 }
3190 }
3191 if( keepFlag==0 && bForce==0 && file_directory_size(".", 0, 1)>0 ){
3192 fossil_fatal("directory %s is not empty\n"
3193 "use the -f or --force option to override", file_getcwd(0,0));
3194 }
3195
3196 if( db_open_local_v2(0, allowNested) ){
3197 fossil_fatal("there is already an open tree at %s", g.zLocalRoot);
3198 }
3199

Keyboard Shortcuts

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