-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
219 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (c) 2023, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
import path from 'node:path'; | ||
import { WORKDIR, HEAD } from './localShadowRepo'; | ||
import { FILE } from './localShadowRepo'; | ||
|
||
import { StatusRow } from './types'; | ||
|
||
// filenames were normalized when read from isogit | ||
|
||
export const toFilenames = (rows: StatusRow[]): string[] => rows.map((row) => row[FILE]); | ||
export const isDeleted = (status: StatusRow): boolean => status[WORKDIR] === 0; | ||
export const isAdded = (status: StatusRow): boolean => status[HEAD] === 0 && status[WORKDIR] === 2; | ||
export const ensureWindows = (filepath: string): string => path.win32.normalize(filepath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.