Thread (1 message) 1 message, 1 author, 2022-01-17

Re: [PATCH v3 02/21] git-p4: remove unneeded semicolons from statements

From: Junio C Hamano <hidden>
Date: 2022-01-17 02:19:46

Joel Holdsworth [off-list ref] writes:
quoted hunk
@@ -4119,9 +4119,9 @@ def run(self, args):
 
     def rebase(self):
         if os.system("git update-index --refresh") != 0:
-            die("Some files in your working directory are modified and different than what is in your index. You can use git update-index <filename> to bring the index up to date or stash away all your changes with git stash.");
-        if len(read_pipe(["git", "diff-index", "HEAD", "--"])) > 0:
-            die("You have uncommitted changes. Please commit them before rebasing or stash them away with git stash.");
+            die("Some files in your working directory are modified and different than what is in your index. You can use git update-index <filename> to bring the index up to date or stash away all your changes with git stash.")
+        if len(read_pipe("git diff-index HEAD --")) > 0:
+            die("You have uncommitted changes. Please commit them before rebasing or stash them away with git stash.")
 
         [upstream, settings] = findUpstreamBranchPoint()
         if len(upstream) == 0:
I think this is the most likely culprit behind the CI breakage at
https://github.com/git/git/runs/4834693517?check_suite_focus=true#step:5:1643

You made read_pipe() to refuse to take string-form of command in
another topic in 'next', and this series are built on what is in
'next', but apparently this hunk does MUCH MORE than "remove
unneeded semicolons"---at least here it reverts the "read_pipe() no
longer takes a string-form of external command".

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help