Skip to content

Commit

Permalink
[BOLT][UTILS] Stash including untracked in nfc-check-setup
Browse files Browse the repository at this point in the history
The command to detect whether the stash is needed is `git status --porcelain`
which includes untracked files by default. We want to stash untracked files
as well as they may affect compilation (LLVM CMake checks that all source files
should be included in CMakeLists).

Update the stash command to include untracked files as well.

Reviewed By: #bolt, rafauler

Differential Revision: https://reviews.llvm.org/D132610
  • Loading branch information
aaupov committed Aug 27, 2022
1 parent 5284cf0 commit 62a034c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bolt/utils/nfc-check-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def main():
text=True).stdout
if stash:
# save local changes before checkout
subprocess.run(shlex.split("git stash"), cwd=source_dir)
subprocess.run(shlex.split("git stash push -u"), cwd=source_dir)
# check out the previous commit
subprocess.run(shlex.split("git checkout -f HEAD^"), cwd=source_dir)
# get the parent commit hash for logging
Expand Down

0 comments on commit 62a034c

Please sign in to comment.