Skip to content

Commit febe5f9

Browse files
authored
Update update-dev to fetch entire git-history (#1248)
**Title:** Update update-dev to fetch entire git-history **Summary:** `actions/checkout` fetches only the most recent commit. But this caused merge conflicts as git was not aware of entire history between the bases. **Relevant references:** **Possible Drawbacks:** **Related GitHub Issues:** ---- If you are writing a demonstration, please answer these questions to facilitate the marketing process. * GOALS — Why are we working on this now? *Eg. Promote a new PL feature or show a PL implementation of a recent paper.* * AUDIENCE — Who is this for? *Eg. Chemistry researchers, PL educators, beginners in quantum computing.* * KEYWORDS — What words should be included in the marketing post? * Which of the following types of documentation is most similar to your file? (more details [here](https://www.notion.so/xanaduai/Different-kinds-of-documentation-69200645fe59442991c71f9e7d8a77f8)) - [ ] Tutorial - [ ] Demo - [ ] How-to
1 parent b69929b commit febe5f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/update-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
uses: actions/checkout@v4
3030
with:
3131
token: ${{ secrets.NIGHTLY_TOKEN }}
32+
fetch-depth: 0 # We want entire git-history to avoid any merge conflicts
3233

3334
- name: Nightly Merge
3435
env:
@@ -45,10 +46,10 @@ jobs:
4546
git config --global user.email "$CONFIG_EMAIL"
4647
4748
git fetch origin $MERGE_HEAD
48-
(git checkout $MERGE_HEAD && git pull)
49+
(git checkout $MERGE_HEAD && git pull origin $MERGE_HEAD)
4950
5051
git fetch origin $MERGE_BASE
51-
(git checkout $MERGE_BASE && git pull)
52+
(git checkout $MERGE_BASE && git pull origin $MERGE_BASE)
5253
5354
git merge $MERGE_ARGS $MERGE_HEAD
5455
git push origin $MERGE_BASE

0 commit comments

Comments
 (0)