projects
/
gitlive
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Uncommited changes synced
[gitlive]
/
Git.vala
diff --git
a/Git.vala
b/Git.vala
index
8141f8e
..
8c7235c
100644
(file)
--- a/
Git.vala
+++ b/
Git.vala
@@
-195,7
+195,8
@@
namespace GitLive {
this.loadLocalBranches();
GLib.debug("head rev = %s", this.head.get_name());
var head_oid = this.repo.revparse(this.head.get_name() ).get_id() ;
this.loadLocalBranches();
GLib.debug("head rev = %s", this.head.get_name());
var head_oid = this.repo.revparse(this.head.get_name() ).get_id() ;
- var master_oid = this.repo.revparse("refs/heads/master" ).get_id() ;
+ //var master_oid = this.repo.revparse("refs/heads/master" ).get_id() ;
+ var master_oid = this.repo.revparse("HEAD" ).get_id() ;
var master_commit = this.repo.lookup_commit(master_oid);;
var head_commit = this.repo.lookup_commit(head_oid);
var master_commit = this.repo.lookup_commit(master_oid);;
var head_commit = this.repo.lookup_commit(head_oid);
@@
-208,7
+209,11
@@
namespace GitLive {
var mo = new Ggit.MergeOptions();
var co = new Ggit.CheckoutOptions();
var mo = new Ggit.MergeOptions();
var co = new Ggit.CheckoutOptions();
- var commits = new Ggit.Commit[] { master_commit };
+ var the_ref = this.repo.lookup_reference_dwim("refs/heads/master");
+
+ var ac = new Ggit.AnnotatedCommit.from_ref(this.repo, the_ref);
+
+ var commits = new Ggit.AnnotatedCommit[] { ac };
this.repo.merge(commits, mo, co);
/*
this.repo.merge(commits, mo, co);
/*