From: Catalin Marinas <catalin.marinas@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: git@vger.kernel.org
Subject: [PATCH] Display (empty) when appropriate for the goto command
Date: Sun, 23 Nov 2008 21:23:18 +0000 [thread overview]
Message-ID: <20081123212318.9835.53505.stgit@localhost.localdomain> (raw)
This is a fix for bug #11810. The original implementation of goto used
to display (empty patch) when a patch became empty during a push + merge
operation. This patch adds this feature again.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
stgit/lib/transaction.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/stgit/lib/transaction.py b/stgit/lib/transaction.py
index de62a8c..6623645 100644
--- a/stgit/lib/transaction.py
+++ b/stgit/lib/transaction.py
@@ -290,7 +290,6 @@ class StackTransaction(object):
conflicts to them."""
orig_cd = self.patches[pn].data
cd = orig_cd.set_committer(None)
- s = ['', ' (empty)'][cd.is_nochange()]
oldparent = cd.parent
cd = cd.set_parent(self.top)
base = oldparent.data.tree
@@ -298,6 +297,7 @@ class StackTransaction(object):
theirs = cd.tree
tree, self.temp_index_tree = self.temp_index.merge(
base, ours, theirs, self.temp_index_tree)
+ s = ''
merge_conflict = False
if not tree:
if iw == None:
@@ -324,6 +324,8 @@ class StackTransaction(object):
else:
comm = None
s = ' (unmodified)'
+ if not merge_conflict and cd.is_nochange():
+ s = ' (empty)'
out.info('Pushed %s%s' % (pn, s))
def update():
if comm:
next reply other threads:[~2008-11-23 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 21:23 Catalin Marinas [this message]
2008-11-24 11:19 ` [PATCH] Display (empty) when appropriate for the goto command Karl Hasselström
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=20081123212318.9835.53505.stgit@localhost.localdomain \
--to=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=kha@treskal.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox