[PATCH] D132610: [BOLT][UTILS] Stash including untracked in nfc-check-setup

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 14:26:05 PDT 2022


Amir created this revision.
Amir added a reviewer: bolt.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132610

Files:
  bolt/utils/nfc-check-setup.py


Index: bolt/utils/nfc-check-setup.py
===================================================================
--- bolt/utils/nfc-check-setup.py
+++ bolt/utils/nfc-check-setup.py
@@ -59,7 +59,7 @@
                            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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132610.455375.patch
Type: text/x-patch
Size: 595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220824/7bad8128/attachment.bin>


More information about the llvm-commits mailing list