Skip to content

Commit

Permalink
Switch sync_distributed_folder to use non-reverse order (pytorch#131683)
Browse files Browse the repository at this point in the history
`git` on GHA seems to use the reverse commit ordering that I see locally O_o
Pull Request resolved: pytorch#131683
Approved by: https://github.com/seemethere
  • Loading branch information
bigfootjon authored and pytorchmergebot committed Jul 25, 2024
1 parent fe2e6f0 commit 605dfd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/sync_distributed_folder_prototype.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ git checkout "$SYNC_BRANCH"

# Using a hardcoded SHA here is a massive speedup as we can skip the entire history of the pytorch GitHub repo.
# This specific SHA was chosen as it was before the "branch point" of the stable branch
for SHA in $(git log ba3b05fdf37ddbc3c301294d6a560a816335e717..origin/main --pretty="%h" --reverse -- torch/distributed torch/csrc/distributed test/distributed test/cpp/c10d benchmarks/distributed)
for SHA in $(git log ba3b05fdf37ddbc3c301294d6a560a816335e717..origin/main --pretty="%h" -- torch/distributed torch/csrc/distributed test/distributed test/cpp/c10d benchmarks/distributed)
do
# `git merge-base --is-ancestor` exits with code 0 if the given SHA is an ancestor, and non-0 otherwise
if git merge-base --is-ancestor $SHA HEAD || [[ $(git log --grep="(cherry picked from commit $SHA") ]]
Expand Down

0 comments on commit 605dfd8

Please sign in to comment.