refactor: move SPEC_URL to util, reuse in preamble

This commit is contained in:
Anton Strogonoff 2021-12-01 18:06:30 +01:00
parent 5bb85d3bd7
commit aa6573b770
2 changed files with 5 additions and 5 deletions

View file

@ -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 {

View file

@ -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. */