Differences From:
File
src/checkin.c
part of check-in
[22552fb803]
- Extend the commit command so that specific files can be committed. There are still some problems with doing this after a merge.
by
dan on
2007-08-03 15:31:33.
[view]
To:
File
src/checkin.c
part of check-in
[6aff11f03f]
- Show an error if unrecognized command-line options appear on the commit
command. Also add the (undocumented) "omit-ci-sig" configuration option
on the database. Setting omit-ci-sig omits the PGP signature on check-in.
by
drh on
2007-08-03 23:30:52.
[view]
@@ -267,15 +267,18 @@
Blob comment;
Stmt q;
Stmt q2;
char *zUuid, *zDate;
+ int noSign = 0; /* True to omit signing the manifest using GPG */
char *zManifestFile; /* Name of the manifest file */
Blob manifest;
Blob mcksum; /* Self-checksum on the manifest */
Blob cksum1, cksum2; /* Before and after commit checksums */
Blob cksum1b; /* Checksum recorded in the manifest */
db_must_be_within_tree();
+ noSign = db_get_int("omit-ci-sig", 0);
+ verify_all_options();
/* There are two ways this command may be executed. If there are
** no arguments following the word "commit", then all modified files
** in the checked out directory are committed. If one or more arguments
@@ -378,9 +381,9 @@
blob_appendf(&manifest, "U %F\n", g.zLogin);
md5sum_blob(&manifest, &mcksum);
blob_appendf(&manifest, "Z %b\n", &mcksum);
zManifestFile = mprintf("%smanifest", g.zLocalRoot);
- if( clearsign(&manifest, &manifest) ){
+ if( !noSign && clearsign(&manifest, &manifest) ){
Blob ans;
blob_zero(&ans);
prompt_user("unable to sign manifest. continue [y/N]? ", &ans);
if( blob_str(&ans)[0]!='y' ){