From: Yann Dirson <ydirson@altern.org>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [PATCH 3/3] Do not return 'origin' as parent remote when there is no such remote.
Date: Fri, 02 Feb 2007 00:48:10 +0100 [thread overview]
Message-ID: <20070201234810.3313.72720.stgit@gandelf.nowhere.earth> (raw)
In-Reply-To: <20070201234534.3313.10426.stgit@gandelf.nowhere.earth>
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
stgit/stack.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/stgit/stack.py b/stgit/stack.py
index dbdda01..729b77e 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -408,7 +408,15 @@ class Series(StgitObject):
self._set_field('description', line)
def get_parent_remote(self):
- return config.get('branch.%s.remote' % self.__name) or 'origin'
+ value = config.get('branch.%s.remote' % self.__name)
+ if value:
+ return value
+ elif 'origin' in git.remotes_list():
+ # FIXME: this is for compatibility only. Should be
+ # dropped when all relevant commands record this info.
+ return 'origin'
+ else:
+ raise StackException, 'Cannot find a parent remote for "%s"' % self.__name
def __set_parent_remote(self, remote):
value = config.set('branch.%s.remote' % self.__name, remote)
@@ -418,6 +426,8 @@ class Series(StgitObject):
if value:
return value
elif git.rev_parse('heads/origin'):
+ # FIXME: this is for compatibility only. Should be
+ # dropped when all relevant commands record this info.
return 'heads/origin'
else:
raise StackException, 'Cannot find a parent branch for "%s"' % self.__name
prev parent reply other threads:[~2007-02-01 23:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-01 23:47 [PATCH 0/3] Update to stgit parent tracking Yann Dirson
2007-02-01 23:48 ` [PATCH 1/3] The user does not want to mess with the refspecs Yann Dirson
2007-02-01 23:48 ` [PATCH 2/3] Rebase to parent branch after git-fetch in "stg pull" Yann Dirson
2007-02-02 9:58 ` Catalin Marinas
2007-02-02 18:07 ` Yann Dirson
2007-02-02 22:42 ` Yann Dirson
2007-02-02 23:01 ` Catalin Marinas
2007-02-02 23:25 ` Catalin Marinas
2007-02-03 21:46 ` Yann Dirson
2007-02-03 23:01 ` Junio C Hamano
2007-02-04 0:23 ` Junio C Hamano
2007-02-04 0:24 ` Yann Dirson
2007-02-04 1:49 ` Jeff King
2007-02-04 2:10 ` Junio C Hamano
2007-02-04 2:38 ` Jeff King
2007-02-02 23:56 ` git-clone wrongly setting branch.*.merge ? (Was: [PATCH 2/3] Rebase to parent branch after git-fetch in "stg pull".) Yann Dirson
2007-02-03 0:14 ` Yann Dirson
2007-02-03 0:17 ` Jakub Narebski
2007-02-03 12:16 ` Catalin Marinas
2007-02-03 14:47 ` Yann Dirson
2007-02-01 23:48 ` Yann Dirson [this message]
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=20070201234810.3313.72720.stgit@gandelf.nowhere.earth \
--to=ydirson@altern.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).