All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org, "Karl Hasselström" <kha@treskal.com>
Subject: [StGit PATCH] Make sure that the output of "stg status" is sorted
Date: Mon, 24 Sep 2007 01:52:23 +0200	[thread overview]
Message-ID: <20070923235212.26396.53222.stgit@yoghurt> (raw)

This simplifies testing, but also makes it easier for the user to find
specific files.

Signed-off-by: Karl Hasselström <kha@treskal.com>

---

 stgit/commands/status.py |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)


diff --git a/stgit/commands/status.py b/stgit/commands/status.py
index bbfb5df..b2835ab 100644
--- a/stgit/commands/status.py
+++ b/stgit/commands/status.py
@@ -91,12 +91,15 @@ def status(files = None, modified = False, new = False, deleted = False,
             filestat.append('?')
         cache_files = [x for x in cache_files if x[0] in filestat]
 
-    for fs in cache_files:
-        assert files == None or fs[1] in files
-        if not filtered:
-            out.stdout('%s %s' % (fs[0], fs[1]))
+    output = []
+    for st, fn in cache_files:
+        assert files == None or fn in files
+        if filtered:
+            output.append(fn)
         else:
-            out.stdout('%s' % fs[1])
+            output.append('%s %s' % (st, fn))
+    for o in sorted(output):
+        out.stdout(o)
 
 def func(parser, options, args):
     """Show the tree status

                 reply	other threads:[~2007-09-23 23:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070923235212.26396.53222.stgit@yoghurt \
    --to=kha@treskal.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.