From aa6573b77060655e2475f80675c19b2a59dd6eaa Mon Sep 17 00:00:00 2001 From: Anton Strogonoff Date: Wed, 1 Dec 2021 18:06:30 +0100 Subject: [PATCH] refactor: move SPEC_URL to util, reuse in preamble --- src/pointers.ts | 5 +---- src/util.ts | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pointers.ts b/src/pointers.ts index 5842b14..458cc25 100644 --- a/src/pointers.ts +++ b/src/pointers.ts @@ -1,8 +1,5 @@ import path from 'path'; -import { toHex } from './util'; - - -const SPEC_URL = 'https://git-lfs.github.com/spec/v1'; +import { SPEC_URL, toHex } from './util'; export interface PointerInfo { diff --git a/src/util.ts b/src/util.ts index 2e6a7ba..0564b9c 100644 --- a/src/util.ts +++ b/src/util.ts @@ -2,7 +2,10 @@ import fs from 'fs/promises'; import { constants as fsConstants } from 'fs'; import { BasicAuth } from './types'; -export const LFS_POINTER_PREAMBLE = 'version https://git-lfs.github.com/spec/v1\n'; + +export const SPEC_URL = 'https://git-lfs.github.com/spec/v1'; + +export const LFS_POINTER_PREAMBLE = `version ${SPEC_URL}\n`; /** Returns true if given blob represents an LFS pointer. */