cpack_repository/commit

FIXED: Pull new version from alternate repostitory or branch

authorJan Wielemaker
Thu Apr 17 16:45:36 2014 +0200
committerJan Wielemaker
Thu Apr 17 16:45:36 2014 +0200
commit27f1abcba7701f73dbcbb76ce58d649ee0a91a0b
treebbcef2e3a59c510268a71dcb3bcf24f5406780b1
parent4cd2dc00aaca0800da5ac8d2d3a8a84a58c67738
Diff style: patch stat
diff --git a/lib/cpack/repository.pl b/lib/cpack/repository.pl
index 0db48a8..c49a000 100644
--- a/lib/cpack/repository.pl
+++ b/lib/cpack/repository.pl
@@ -149,9 +149,10 @@ cpack_update_repository(User, URL, Options) :-
 	file_name_extension(PackageName, git, BareGit),
 	setting(cpack:mirrors, MirrorDir),
 	directory_file_path(MirrorDir, BareGit, BareGitPath),
-	git_hash(BareGitPath, Branch, Hash0),
-	git([fetch, origin], [directory(BareGitPath)]),
-	git_hash(BareGitPath, Branch, Hash1),
+	git_hash(BareGitPath, master, Hash0),
+	atomic_list_concat([Branch, master], :, BranchSpec),
+	git([fetch, URL, BranchSpec], [directory(BareGitPath)]),
+	git_hash(BareGitPath, master, Hash1),
 	print_message(informational, cpack(updated(Graph, Hash0, Hash1))),
 	(   (   Hash1 \== Hash0
 	    ;	option(update_metadata(always), Options, always)