Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rindeal authored Sep 7, 2024
1 parent 40903f9 commit 9bf2c12
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,26 @@
* SPDX-License-Identifier: GPL-3.0-only OR GPL-2.0-only
*/

import { Repo , RefDiff } from './Repo'
import {
GitLsRemoteRefDiff,
} from './GitLsRemoteRefDiff'
import {
GitRemoteRefsCmp,
} from './GitRemoteRefsCmp'


export { Logger } from './Logger'
export { Repo , RefDiff , ZeroRefs , RefCountMismatch , RefNotFound , HashMismatch } from './Repo'
export type { GitLsRemoteRefDiff } from './GitLsRemoteRefDiff'
export type { GitRemoteRefsCmp } from './GitRemoteRefsCmp'
export type { Logger } from './Logger'


export async function refsDiffer(sourceUrl: string, targetUrl: string): Promise<RefDiff | null> {
const sourceRepo = new Repo(sourceUrl)
const targetRepo = new Repo(targetUrl)
return await sourceRepo.refsDiffer(targetRepo)
export {
gitRemoteRefsCmp,
}


async function gitRemoteRefsCmp(sourceRemote: string, targetRemote: string): Promise<GitLsRemoteRefDiff | null> {
const cmp = new GitRemoteRefsCmp()
await cmp.init()
return cmp.compare(sourceRemote, targetRemote)
}

0 comments on commit 9bf2c12

Please sign in to comment.