Changeset 1273101 in Klonkt
- Timestamp:
- 06/29/2026 11:38:17 PM (2 months ago)
- Branches:
- main
- Children:
- aedc00d
- Parents:
- 09a2061
- File:
-
- 1 edited
-
scripts/install.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scripts/install.sh
r09a2061 r1273101 142 142 git -C "$KLONKT_DIR" remote set-url origin "$KLONKT_REPO" 143 143 git -C "$KLONKT_DIR" fetch --depth 1 origin "$KLONKT_BRANCH" 144 git -C "$KLONKT_DIR" reset --hard "origin/$KLONKT_BRANCH" 144 # Reset to FETCH_HEAD, not origin/$KLONKT_BRANCH: a single-branch/shallow clone (or one 145 # originally on a different branch, e.g. main → stable) has no origin/<branch> tracking ref, 146 # so `reset --hard origin/stable` fails with "ambiguous argument". FETCH_HEAD always points 147 # at what we just fetched, regardless of refspec or which branch the clone started on. 148 git -C "$KLONKT_DIR" reset --hard FETCH_HEAD 145 149 else 146 150 [ -e "$KLONKT_DIR" ] && [ -n "$(ls -A "$KLONKT_DIR" 2>/dev/null)" ] && die "$KLONKT_DIR already exists and is not a git checkout. Pick --dir, or clean it up." … … 236 240 B=\$(runuser -u ${KLONKT_USER} -- git -C "\$D" rev-parse HEAD 2>/dev/null || true) 237 241 runuser -u ${KLONKT_USER} -- git -C "\$D" fetch --depth 1 origin ${KLONKT_BRANCH} 238 runuser -u ${KLONKT_USER} -- git -C "\$D" reset --hard origin/${KLONKT_BRANCH}242 runuser -u ${KLONKT_USER} -- git -C "\$D" reset --hard FETCH_HEAD 239 243 A=\$(runuser -u ${KLONKT_USER} -- git -C "\$D" rev-parse HEAD) 240 244 if [ "\$B" = "\$A" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)