fix: replace SHA comparison with file size for LFS compatibility + add NoChangesModal
Git LFS stores pointer files whose SHA differs from the actual blob SHA, causing false-positive diffs on every upload. Switching to file size comparison resolves this for LFS-enabled repos. Also replaces the inline error message with a dedicated NoChangesModal when no differences are detected, offering cancel (reset) or modify (close modal) actions.
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ export async function getRemoteFolder(
|
||||
if (Array.isArray(data)) {
|
||||
return {
|
||||
exists: true,
|
||||
files: data.map((f) => ({ name: f.name, sha: f.sha })),
|
||||
files: data.map((f) => ({ name: f.name, size: f.size })),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ export interface FileDiff {
|
||||
|
||||
export interface RemoteFile {
|
||||
name: string
|
||||
sha: string
|
||||
size: number
|
||||
}
|
||||
|
||||
export type UploadResponse =
|
||||
|
||||
Reference in New Issue
Block a user