From 5f575db36ff15d7007c85a8218a28d302ed2c428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1nos=20Veres?= Date: Thu, 4 Apr 2024 20:50:43 +0200 Subject: [PATCH] refactor: rename generic func --- packages/ogre/src/repository.ts | 4 ++-- packages/ogre/src/utils.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ogre/src/repository.ts b/packages/ogre/src/repository.ts index 1de5cd1..30c059e 100644 --- a/packages/ogre/src/repository.ts +++ b/packages/ogre/src/repository.ts @@ -21,7 +21,7 @@ import { createHeadRefValue, getLastRefPathElement, headValueRefPrefix, - immutableRefCopy, + immutableMapCopy, localHeadPathPrefix, mapPath, mutableMapCopy, @@ -109,7 +109,7 @@ export class Repository constructor(obj: Partial, options: RepositoryOptions) { // FIXME: move this to refs/remote as git would do? - this.remoteRefs = immutableRefCopy(options.history?.refs); + this.remoteRefs = immutableMapCopy(options.history?.refs); this.original = deepClone(obj); // store js ref, so obj can still be modified without going through repo.data this.data = obj as T; diff --git a/packages/ogre/src/utils.ts b/packages/ogre/src/utils.ts index 6be4067..b33714f 100644 --- a/packages/ogre/src/utils.ts +++ b/packages/ogre/src/utils.ts @@ -218,7 +218,7 @@ export const printChange = (chg: Operation) => { export const getLastRefPathElement = (thePath: string) => thePath.substring(thePath.lastIndexOf("/") + 1); -export const immutableRefCopy = ( +export const immutableMapCopy = ( map: Map | undefined, ) => { if (!map) {