Skip to content

Commit

Permalink
only compare Api.ts, use git difftool as shortcut to preferred diff tool
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Nov 26, 2023
1 parent fe1cc0c commit c3d2f32
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/deno/api-diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ async function genForCommit(commit: string) {

if (!$.commandExistsSync('gh')) throw Error('Need gh (GitHub CLI)')

const diffTool = $.commandExistsSync('difft') ? 'difft' : 'diff'

const prNum = await pickPr()

if (!/^\d+$/.test(prNum)) {
Expand All @@ -74,4 +72,5 @@ const { base, head } = await getPrRange(prNum)
const tmpDirBase = await genForCommit(base)
const tmpDirHead = await genForCommit(head)

await $`${diffTool} ${tmpDirBase} ${tmpDirHead} || true`
// git difftool is a trick to diff with whatever you have git set to use
await $`git --no-pager difftool ${tmpDirBase}/Api.ts ${tmpDirHead}/Api.ts || true`

0 comments on commit c3d2f32

Please sign in to comment.