File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
book/B-embedding-git/sections Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -69,21 +69,21 @@ ObjectId masterTip = master.getObjectId();
6969ObjectId obj = repo.resolve("HEAD^{tree}");
7070
7171// Load raw object contents
72- ObjectLoader loader = r .open(masterTip);
72+ ObjectLoader loader = repo .open(masterTip);
7373loader.copyTo(System.out);
7474
7575// Create a branch
76- RefUpdate createBranch1 = r .updateRef("refs/heads/branch1");
76+ RefUpdate createBranch1 = repo .updateRef("refs/heads/branch1");
7777createBranch1.setNewObjectId(masterTip);
7878createBranch1.update();
7979
8080// Delete a branch
81- RefUpdate deleteBranch1 = r .updateRef("refs/heads/branch1");
81+ RefUpdate deleteBranch1 = repo .updateRef("refs/heads/branch1");
8282deleteBranch1.setForceUpdate(true);
8383deleteBranch1.delete();
8484
8585// Config
86- Config cfg = r .getConfig();
86+ Config cfg = repo .getConfig();
8787String name = cfg.getString("user", null, "name");
8888----
8989
You can’t perform that action at this time.
0 commit comments