revert: use a `continue` to reduce indentation
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 28 Mar 2022 10:43:06 -0700
changeset 49031 9be7da341885
parent 49030 75794847ef62
child 49032 3f6ef67e7a60
revert: use a `continue` to reduce indentation I'm about to add more code in the block I'm modifying here. Differential Revision: https://phab.mercurial-scm.org/D12415
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Fri Mar 25 08:33:03 2022 -0700
+++ b/mercurial/cmdutil.py	Mon Mar 28 10:43:06 2022 -0700
@@ -3749,10 +3749,12 @@
 
     for f in actions[b'add'][0]:
         # Don't checkout modified files, they are already created by the diff
-        if f not in newlyaddedandmodifiedfiles:
-            prntstatusmsg(b'add', f)
-            checkout(f)
-            repo.dirstate.set_tracked(f)
+        if f in newlyaddedandmodifiedfiles:
+            continue
+
+        prntstatusmsg(b'add', f)
+        checkout(f)
+        repo.dirstate.set_tracked(f)
 
     for f in actions[b'undelete'][0]:
         if interactive: