[gnome-ostree] vcs: Strip trailing newline from submodule names
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] vcs: Strip trailing newline from submodule names
- Date: Wed, 27 Feb 2013 00:06:55 +0000 (UTC)
commit 6485af2bbf3437e54eeff4173d384f37ac5d5c20
Author: Colin Walters <walters verbum org>
Date: Tue Feb 26 19:05:56 2013 -0500
vcs: Strip trailing newline from submodule names
Ouch =( This bug must have been around since the JS port...
src/js/vcs.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/js/vcs.js b/src/js/vcs.js
index 236e8bb..543fce2 100644
--- a/src/js/vcs.js
+++ b/src/js/vcs.js
@@ -53,8 +53,8 @@ function _fixupSubmoduleReferences(mirrordir, cwd, cancellable) {
line = line.substr(1);
let [subChecksum, subName, rest] = line.split(' ');
let configKey = Format.vprintf('submodule.%s.url', [subName]);
- let subUrl = ProcUtil.runSyncGetOutputUTF8(['git', 'config', '-f', '.gitmodules', configKey],
- cancellable, {cwd: cwd});
+ let subUrl = ProcUtil.runSyncGetOutputUTF8Stripped(['git', 'config', '-f', '.gitmodules', configKey],
+ cancellable, {cwd: cwd});
let localMirror = getMirrordir(mirrordir, 'git', subUrl);
ProcUtil.runSync(['git', 'config', configKey, 'file://' + localMirror.get_path()],
cancellable, {cwd:cwd});
@@ -162,9 +162,9 @@ function _listSubmodules(mirrordir, mirror, keytype, uri, branch, cancellable) {
if (line == '') continue;
line = line.substr(1);
let [subChecksum, subName, rest] = line.split(' ');
- let subUrl = ProcUtil.runSyncGetOutputUTF8(['git', 'config', '-f', '.gitmodules',
- Format.vprintf('submodule.%s.url', [subName])],
cancellable,
- {cwd: tmpCheckout});
+ let subUrl = ProcUtil.runSyncGetOutputUTF8Stripped(['git', 'config', '-f', '.gitmodules',
+ Format.vprintf('submodule.%s.url', [subName])],
cancellable,
+ {cwd: tmpCheckout});
submodules.push([subChecksum, subName, subUrl]);
}
GSystem.shutil_rm_rf(tmpCheckout, cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]