diff --git a/tools/u_boot_pylib/command.py b/tools/u_boot_pylib/command.py
index 54a7ee8e672..c44bed6acc0 100644
--- a/tools/u_boot_pylib/command.py
+++ b/tools/u_boot_pylib/command.py
@@ -66,7 +66,8 @@ class CommandResult:
 
 def run_pipe(pipe_list, infile=None, outfile=None, capture=False,
              capture_stderr=False, oneline=False, raise_on_error=True, cwd=None,
-             binary=False, output_func=None, stdin_data=None, **kwargs):
+             binary=False, output_func=None, stdin_data=None,
+             merge_stderr=False, **kwargs):
     """
     Perform a command pipeline, with optional input/output filenames.
 
@@ -87,6 +88,9 @@ def run_pipe(pipe_list, infile=None, outfile=None, capture=False,
         output_func (function): Output function to call with each output
             fragment (if it returns True the function terminates)
         stdin_data (str or None): Data to send to the first command's stdin
+        merge_stderr (bool): True to redirect stderr to stdout so that both
+            streams are interleaved in order. Use this for interactive
+            processes where output ordering matters.
         **kwargs: Additional keyword arguments to cros_subprocess.Popen()
     Returns:
         CommandResult object
@@ -123,7 +127,9 @@ def run_pipe(pipe_list, infile=None, outfile=None, capture=False,
                 kwargs['stdout'] = cros_subprocess.PIPE
         elif outfile:
             kwargs['stdout'] = open(outfile, 'wb')
-        if capture_stderr:
+        if merge_stderr:
+            kwargs['stderr'] = cros_subprocess.STDOUT
+        elif capture_stderr:
             kwargs['stderr'] = cros_subprocess.PIPE
 
         try:
diff --git a/tools/u_boot_pylib/gitutil.py b/tools/u_boot_pylib/gitutil.py
index 22414d250a9..8e45727b47a 100644
--- a/tools/u_boot_pylib/gitutil.py
+++ b/tools/u_boot_pylib/gitutil.py
@@ -563,7 +563,7 @@ send --cc-cmd cc-fname" cover p1 p2', 0)
 
         result = command.run_pipe(
             [cmd], capture=True, output_func=echo_output,
-            raise_on_error=False, cwd=cwd)
+            raise_on_error=False, cwd=cwd, merge_stderr=True)
         num_sent = result.stdout.count('Result: ')
     cmd_str = ' '.join([f'"{x}"' if ' ' in x and '"' not in x else x
                         for x in cmd])
