1 auto repo = initRepo(_userRepo, OpenBare.yes);
2 scope(exit) rmdirRecurse(_userRepo);
3
4 string[] fetchHeadItems = [
5 "23c3c6add8162693f85b3b41c9bf6550a71a57d3 branch 'master' of git://github.com/D-Programming-Language/dmd\n",
6 "aaf64112624abab1f6cc8f610223f6e12b525e09 branch 'master' of git://github.com/D-Programming-Language/dmd\n"
7 ];
8
9 std.file.write(buildPath(repo.path, "FETCH_HEAD"), fetchHeadItems.join());
10
11 foreach (string line, FetchHeadItem item; lockstep(fetchHeadItems, repo.getFetchHeadItems()))
12 {
13 string commitHex = line.split[0];
14
15 assert(item.refName == "refs/heads/master");
16 assert(item.remoteURL == "git://github.com/D-Programming-Language/dmd");
17 assert(item.oid == GitOid(commitHex));
18 }
Return the list of items in the FETCH_HEAD file as an array of FetchHeadItem's.