Differences From:
File
src/branch.c
part of check-in
[66b13f1015]
- typo fix
by
bch on
2008-02-07 10:33:45.
[view]
To:
File
src/branch.c
part of check-in
[ce08928aaa]
- Fix the branch subcommand so that the branch name tags it creates begin
with "sym-".
by
drh on
2008-02-08 21:50:31.
[view]
@@ -45,9 +45,9 @@
verify_all_options();
/* fossil branch new name */
if( g.argc<3 ){
- usage("branch new ?-bgcolor COLOR BRANCH-NAME");
+ usage("branch new ?-bgcolor COLOR? BRANCH-NAME");
}
zBranch = g.argv[3];
if( zBranch==0 || zBranch[0]==0 ){
fossil_panic("branch name cannot be empty");
@@ -85,17 +85,12 @@
blob_appendf(&manifest, "P %s\n", zUuid);
blob_appendf(&manifest, "R %b\n", &cksum1);
if( zColor!=0 ){
- if( strcmp("bgcolor",zBranch)>=0 ){
- blob_appendf(&manifest, "T *%F *\n", zBranch);
- blob_appendf(&manifest, "T *bgcolor * %F\n", zColor);
- }else{
- blob_appendf(&manifest, "T *bgcolor * %F\n", zColor);
- blob_appendf(&manifest, "T *%F *\n", zBranch);
- }
+ blob_appendf(&manifest, "T *bgcolor * %F\n", zColor);
+ blob_appendf(&manifest, "T *sym-%F *\n", zBranch);
}else{
- blob_appendf(&manifest, "T *%F *\n", zBranch);
+ blob_appendf(&manifest, "T *sym-%F *\n", zBranch);
}
/* Cancel any tags that propagate */
db_prepare(&q,
@@ -170,9 +165,9 @@
**
** Run various subcommands on the branches of the open repository or
** of the repository identified by the -R or --repository option.
**
-** %fossil branch new ?-bgcolor COLOR BRANCH-NAME
+** %fossil branch new ?-bgcolor COLOR? BRANCH-NAME
**
** Create a new branch BRANCH-NAME. You can optionally give
** a commit message and branch color.
**