c500eb92eb2a021af927f3c6f2ad00c7b29769a5 max Tue Sep 15 05:48:49 2026 -0700 snapshotSession: snapshotIsSnapshotName is file-local, refs #38353 Its only caller is the writer in the same file, checking its own argument, and its header comment warned everyone else off it. Making it static says that rather than asking. diff --git src/hg/inc/snapshotSession.h src/hg/inc/snapshotSession.h index a714cabc675..55fe03367dc 100644 --- src/hg/inc/snapshotSession.h +++ src/hg/inc/snapshotSession.h @@ -52,35 +52,30 @@ * reconstruct one of its views. Register one per feature and keep the list minimal. */ { char *name; /* type key sent by the client, e.g. "blat" */ char **vars; /* NULL-terminated cart variable names to persist (besides "db") */ char *requiredVar; /* if non-NULL, the snapshot is a dead link without this cart var, so the * save is rejected when it is absent (e.g. results not built yet) */ }; struct snapshotType *snapshotTypeFind(char *name); /* Return the registered snapshot type, or NULL if name is not a known type. */ boolean snapshotHasRequired(struct snapshotType *type, struct cart *cart); /* Return FALSE when type declares a requiredVar that is missing/empty in cart (saving it would make * a link that reopens to nothing), otherwise TRUE. */ -boolean snapshotIsSnapshotName(char *sessionName); -/* Return TRUE if sessionName is a snapshot name (starts with the "__" prefix). Only the snapshot - * writer/cleaner should care: a user's own session can carry the same prefix, so this must not be - * used to decide whether to show a row to its owner - see snapshotIsSnapshotSettings(). */ - char *snapshotTypeFromSettings(char *settings); /* Return the snapshot type recorded in a namedSessionDb settings string ("snapshotType blat" -> * "blat"), or NULL when there is none, i.e. the row is an ordinary saved session. The value is not * checked against the registry, so a type written by a newer build still reads back. Returns a * string to free. */ boolean snapshotIsSnapshotSettings(char *settings); /* Return TRUE if settings marks this row as a snapshot (a share token), rather than a session the * user saved. This is the test to use when deciding whether to list a row in My Sessions. */ char *snapshotNewName(struct sqlConnection *conn, char *encUserName); /* Alloc and return a fresh "__"-prefixed snapshot name, server-generated and checked against * namedSessionDb so it is guaranteed unique for encUserName (share tokens must never collide and * overwrite each other). The token is long (128 bits) and URL-safe, so it needs no CGI-encoding. */