[jhbuild] git: Add support for checking out an arbitrary commit
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] git: Add support for checking out an arbitrary commit
- Date: Wed, 9 Nov 2011 17:08:06 +0000 (UTC)
commit 78d52b55d4be487d8d6014b16012b8c754a306f5
Author: Colin Walters <walters verbum org>
Date: Wed Nov 9 12:05:58 2011 -0500
git: Add support for checking out an arbitrary commit
I want to back out cogl to a specific commit before a broken one.
jhbuild/versioncontrol/git.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index 80c6070..11c01e4 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -175,8 +175,11 @@ class GitBranch(Branch):
return True
def is_local_branch(self, branch):
- return self.execute_git_predicate( ['git', 'show-ref', '--quiet',
- '--verify', 'refs/heads/' + branch])
+ is_local_head = self.execute_git_predicate( ['git', 'show-ref', '--quiet',
+ '--verify', 'refs/heads/' + branch])
+ if is_local_head:
+ return True
+ return self.execute_git_predicate(['git', 'rev-parse', branch])
def is_inside_work_tree(self):
return self.execute_git_predicate(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]