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/lib/snapshotSession.c src/hg/lib/snapshotSession.c
index c2a2aa728c8..17df5388123 100644
--- src/hg/lib/snapshotSession.c
+++ src/hg/lib/snapshotSession.c
@@ -41,32 +41,35 @@
 int i;
 for (i = 0;  i < ArraySize(snapshotTypes);  i++)
     if (sameString(name, snapshotTypes[i].name))
         return &snapshotTypes[i];
 return NULL;
 }
 
 boolean snapshotHasRequired(struct snapshotType *type, struct cart *cart)
 /* Return FALSE when type declares a requiredVar that is missing/empty in cart. */
 {
 if (type == NULL || isEmpty(type->requiredVar))
     return TRUE;
 return isNotEmpty(cartOptionalString(cart, type->requiredVar));
 }
 
-boolean snapshotIsSnapshotName(char *sessionName)
-/* Return TRUE if sessionName is a snapshot name (starts with the "__" prefix). */
+static boolean snapshotIsSnapshotName(char *sessionName)
+/* Return TRUE if sessionName is a snapshot name (starts with the "__" prefix).  File-local:
+ * the only thing that may ask is the writer below, checking its own argument.  A user's own
+ * session can carry the same prefix, so this must never be used to decide whether to show a
+ * row to its owner - snapshotIsSnapshotSettings() is the one for that. */
 {
 return sessionName != NULL && startsWith(snapshotNamePrefix, sessionName);
 }
 
 char *snapshotTypeFromSettings(char *settings)
 /* See snapshotSession.h.  Reads the one tag by walking the lines rather than calling
  * raFromString(): this runs once per row in the My Sessions listings, and building a hash there
  * costs ~600ns and three allocations per session that has any settings at all, against ~30ns and
  * none for the walk.  Same line semantics as raFromString - leading blanks skipped, tag is the
  * first word, value is the rest of the line. */
 {
 if (isEmpty(settings))
     return NULL;
 int tagLen = strlen(snapshotTypeSetting);
 char *s = settings;