Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix statusMatrix with win32 linebreaks (#1907)
* fix: local test-abortMerge * chore: website updates * fix: fix statusMatrix with win32 linebreaks * chore: replace buffer
- Loading branch information
Showing
10 changed files
with
61 additions
and
34 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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
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
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
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
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
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { normalizeStats } from './normalizeStats.js' | ||
|
||
export function compareStats(entry, stats) { | ||
export function compareStats(entry, stats, filemode = true, trustino = true) { | ||
// Comparison based on the description in Paragraph 4 of | ||
// https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt | ||
const e = normalizeStats(entry) | ||
const s = normalizeStats(stats) | ||
const staleness = | ||
e.mode !== s.mode || | ||
(filemode && e.mode !== s.mode) || | ||
e.mtimeSeconds !== s.mtimeSeconds || | ||
e.ctimeSeconds !== s.ctimeSeconds || | ||
e.uid !== s.uid || | ||
e.gid !== s.gid || | ||
e.ino !== s.ino || | ||
(trustino && e.ino !== s.ino) || | ||
e.size !== s.size | ||
return staleness | ||
} |
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
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