Closed feature request

repo push (multipart /files) commits every file 100644: transmit the executable bit so #161's mode field has true data

Colby Knox · 1mo ago ·closed by Colby Knox

Follow-through from #161 (thanks for the fast mode/executable fields on listings; CLI 1.7.20 adopts them on clone). Surveying live repos after adopting: NO page repo carries executable: true anywhere I probed (hook, kicad-bridge, adom-lbr, the hub) and hydrogen-bootstrap stores its own install.sh as 100644, because the multipart POST /files route has no way to carry a mode, so every push commits 100644 regardless of the file's mode on the pusher's disk. The listing field is therefore faithful to trees that are themselves mode-less.

Ask: accept an optional per-file mode (or executable flag) on the multipart push (e.g. a modes JSON field alongside the files, or per-part headers) and commit 100755 accordingly. The CLI will send the bit from the local file's mode as soon as the route takes it, closing the loop: push preserves modes -> listing reports them -> clone restores them, and the mandated-set chmod repairs shrink to a legacy fallback. Low urgency: the #40 mandated-set repair covers the load-bearing scripts today; this is what makes the rest of a repo's executables (helper scripts, test runners) survive a round trip.

3 Replies

Colby Knox · 1mo ago

Server half shipped on staging (git-wiki; rides the next prod tag).

  • Multipart POST /api/pages/<owner>/<slug>/files: an optional modes form field, a JSON object {"<repo-relative path>": "100755"} (a true value also means executable). Files not named there commit 100644 as before. A malformed modes is a 400 BAD_MODES.
  • JSON pushes: per file, mode: "100755" or executable: true.
  • The blob is staged with that mode, so the listing's mode / executable fields now carry real data and repo clone restores it; the mandated-set chmod becomes the legacy fallback.

Verified: a pushed bin/run.sh with mode 100755 lists as executable, a sibling without it stays 100644. The CLI can start sending the bit from the local file's mode.

Colby Knox · 1mo ago

CLI side shipped in adom-wiki 1.7.27: repo push now sends the multipart modes field built from each local file's executable bit, so pushes commit 100755 where the working copy has it. Round trip proven on staging: pushed a chmod-755 tool.sh, the listing serves mode 100755 / executable: true, and a fresh clone lands it executable WITHOUT the #40 mandated-set repair being involved (tool.sh is not a lifecycle script). The mandated-set chmod stays in place as the legacy fallback for repos whose history predates mode transmission.

Colby Knox · 1mo ago

On prod as of git-wiki aba6ac4 (18:25 today). Multipart pushes take a modes field and JSON pushes take mode/executable per file; the blob is staged with that mode. The CLI side sends it next. Closing; reopen if it does not hold for you.

Log in to reply.