pinokiod 5.0.11 → 5.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "5.0.11",
3
+ "version": "5.0.13",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1398,6 +1398,23 @@ class Server {
1398
1398
  let statusMatrix = await git.statusMatrix({ dir, fs })
1399
1399
  statusMatrix = statusMatrix.filter(Boolean)
1400
1400
 
1401
+ let headOid = null
1402
+ const getHeadOid = async () => {
1403
+ if (headOid) return headOid
1404
+ headOid = await git.resolveRef({ fs, dir, ref: 'HEAD' })
1405
+ return headOid
1406
+ }
1407
+ const readNormalized = async (source, filepath) => {
1408
+ if (source === 'head') {
1409
+ const oid = await getHeadOid()
1410
+ const { blob } = await git.readBlob({ fs, dir, oid, filepath })
1411
+ return normalize(Buffer.from(blob).toString('utf8'))
1412
+ } else {
1413
+ const content = await fs.promises.readFile(path.join(dir, filepath), 'utf8')
1414
+ return normalize(content)
1415
+ }
1416
+ }
1417
+
1401
1418
  const changes = []
1402
1419
  for (const [filepath, head, workdir, stage] of statusMatrix) {
1403
1420
  if (!shouldIncludePath(filepath)) {
@@ -1422,6 +1439,19 @@ class Server {
1422
1439
  continue
1423
1440
  }
1424
1441
 
1442
+ // Skip entries where HEAD and worktree match after normalization
1443
+ if (status && status.startsWith('modified')) {
1444
+ try {
1445
+ const headContent = await readNormalized('head', filepath)
1446
+ const worktreeContent = await readNormalized('worktree', filepath)
1447
+ if (headContent === worktreeContent) {
1448
+ continue
1449
+ }
1450
+ } catch (_) {
1451
+ // fall through if comparison fails
1452
+ }
1453
+ }
1454
+
1425
1455
  const webpath = "/asset/" + path.relative(this.kernel.homedir, absolutePath)
1426
1456
 
1427
1457
  changes.push({
@@ -3225,8 +3225,9 @@ body.dark .pinokio-fork-dropdown-remote, body.dark .pinokio-publish-dropdown-rem
3225
3225
  }
3226
3226
  */
3227
3227
  .meta-icon {
3228
- width: 30px;
3229
- height: 30px;
3228
+ width: 25px;
3229
+ height: 25px;
3230
+ padding: 0 0 0 10px;
3230
3231
  }
3231
3232
  </style>
3232
3233
  <link href="/app.css" rel="stylesheet"/>