__git: impossible to update after first-use #47

Open
opened 2021-11-20 11:25:09 +00:00 by ungleich-gitea · 2 comments

Expectation:
after using something like __git stuff --branch production for the first time, I'd expect subsequent runs of a manifest with that to keep the stuff repository up to date with the remote production branch.

Actual behaviour:
a fetch of the repository never happens if the repository is already cloned.

Proposal:
I can think of two options:

  1. Have a __git/explorer/needs-update explorer that: if the repository is already cloned, does a git fetch and compares the current HEAD with the remote HEAD, then echoes YES if they differ and NO if they are equal. Afterwards in gencode-remote we would git pull if and only if necessary.
  2. Always generate code in gencode-remote that does the fetching and comparing (wouldn't be necessary on first run).

Thoughts?

As with #818, I am currently working with __git so it'd be relatively low effort to fix this.

Expectation: after using something like `__git stuff --branch production` for the first time, I'd expect subsequent runs of a manifest with that to keep the `stuff` repository up to date with the remote `production` branch. Actual behaviour: a fetch of the repository never happens if the repository is already cloned. Proposal: I can think of two options: 1. Have a `__git/explorer/needs-update` explorer that: if the repository is already cloned, does a `git fetch` and compares the current HEAD with the remote HEAD, then echoes `YES` if they differ and `NO` if they are equal. Afterwards in `gencode-remote` we would `git pull` if and only if necessary. 2. Always generate code in `gencode-remote` that does the fetching and comparing (wouldn't be necessary on first run). Thoughts? As with #818, I am currently working with `__git` so it'd be relatively low effort to fix this.
evilham was assigned by ungleich-gitea 2021-11-20 11:25:09 +00:00
Author
Owner

mentioned in merge request !894

mentioned in merge request !894
Author
Owner

assigned to @evilham

assigned to @evilham
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#47
No description provided.