[jhbuild] [git] don't fail with git 1.7 on stashing of submodules (GNOME bug 608322)
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] [git] don't fail with git 1.7 on stashing of submodules (GNOME bug 608322)
- Date: Thu, 18 Feb 2010 12:12:42 +0000 (UTC)
commit fd11b736dc55b4d2447dc8b19bbbd218283fd51d
Author: Frédéric Péters <fpeters 0d be>
Date: Thu Feb 18 13:10:28 2010 +0100
[git] don't fail with git 1.7 on stashing of submodules (GNOME bug 608322)
jhbuild/versioncontrol/git.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index d5f6de0..cb6d818 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -263,8 +263,18 @@ class GitBranch(Branch):
if update_mirror:
self.update_dvcs_mirror(buildscript)
+ if check_version(['git', '--version'],
+ r'git version ([\d.]+)', '1.7.0',
+ extra_env=get_git_extra_env()):
+ git_diff_submodule = ['--submodule']
+ else:
+ git_diff_submodule = []
+
stashed = False
- if get_output(['git', 'diff'], **git_extra_args):
+ git_diff_output = get_output(['git', 'diff'] + git_diff_submodule, **git_extra_args)
+ git_diff_output = '\n'.join([x for x in git_diff_output.splitlines() \
+ if not x.startswith('Submodule ')])
+ if git_diff_output:
stashed = True
buildscript.execute(['git', 'stash', 'save', 'jhbuild-stash'],
**git_extra_args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]