5c213974bb28e98d1b10ad9a86063101e684e5e3
braney
  Mon Oct 31 12:16:52 2022 -0700
add Jim's track duplication code

diff --git src/hg/inc/cart.h src/hg/inc/cart.h
index 4aa4257..38dafc2 100644
--- src/hg/inc/cart.h
+++ src/hg/inc/cart.h
@@ -114,30 +114,34 @@
 void cartRemoveExcept(struct cart *cart, char **except);
 /* Remove variables except those in null terminated except array
  * from cart.  Except array may be NULL in which case all
  * are removed. */
 
 struct slPair *cartVarsLike(struct cart *cart, char *wildCard);
 /* Return a slPair list of cart vars that match the wildcard */
 
 struct slPair *cartVarsWithPrefix(struct cart *cart, char *prefix);
 /* Return a slPair list of cart vars that begin with prefix */
 
 struct slPair *cartVarsWithPrefixLm(struct cart *cart, char *prefix, struct lm *lm);
 /* Return list of cart vars that begin with prefix allocated in local memory.
  * Quite a lot faster than cartVarsWithPrefix. */
 
+void cartCloneVarsWithPrefix(struct cart *cart, char *prefix, char *newPrefix);
+/* Add a copy of all vars that start with prefix to cart.  The new vars will
+ * start with newPrefix instead of prefix */
+
 void cartRemoveLike(struct cart *cart, char *wildCard);
 /* Remove all variable from cart that match wildCard. */
 
 void cartRemovePrefix(struct cart *cart, char *prefix);
 /* Remove variables with given prefix from cart. */
 
 boolean cartVarExists(struct cart *cart, char *var);
 /* Return TRUE if variable is in cart. */
 
 boolean cartListVarExists(struct cart *cart, char *var);
 /* Return TRUE if a list variable is in cart (list may still be empty). */
 
 INLINE boolean cartVarExistsDb(struct cart *cart, char *db, char *var)
 /* Return TRUE if variable_$db is in cart. */
 {