View Ticket
Not logged in
Ticket UUID: 5e624dbfca4c3735394a9fc88a35f93460926b95
Title: branch doesn't obey clearsign setting
Status: Open Type: Code_Defect
Severity: Minor Priority:
Subsystem: Resolution: Open
Last Modified: 2010-04-07 18:04:09
Version Found In: 599e6abfb1
Description & Comments:
The 'branch new' command always attempts to use gpg signing, even if the clearsign setting is off.

The code appears to check for the "omitsign" setting rather than the "clearsign" setting. (checkin also checkd for the omitsign option; nothing appears to set it anywhere -- is this a relic of an older version?)

The --nosign option works to bypass signing; however this is not listed in the usage.


anonymous added on 2010-04-07 18:04:09:
It seems like the preferred/expected way to create a branch is by specifying --branch on the checkin command. Still, this command is here, and it should work the right way (or be removed altogether). Here's a 1-line patch for this:

Index: src/branch.c
===================================================================
--- src/branch.c
+++ src/branch.c
@@ -53,10 +53,11 @@
   if( g.argc<5 ){
     usage("new BRANCH-NAME BASE-CHECK-IN ?-bgcolor COLOR?");
   }
   db_find_and_open_repository(1);
   noSign = db_get_int("omitsign", 0)|noSign;
+  if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
 
   /* fossil branch new name */
   zBranch = g.argv[3];
   if( zBranch==0 || zBranch[0]==0 ){
     fossil_panic("branch name cannot be empty");