Got viewing files and diffing files (arbitrary commits) to work.
[Widgit.git] / Git / Branch.cs
blobc1eeaa2acc81fc262a6e505b23320cba28d1dc2d
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
5 namespace Git
7 public class Branch : Treeish
9 protected string m_name;
10 public override string Name { get { return m_name; } internal set { m_name = value; } }
12 protected string m_hash;
13 public override string ID { get { return m_hash; } internal set { m_hash = value; } }
15 public Branch(string path, string name) : base(path)
17 m_name = name;
20 public override bool Verify()
22 Executioner e = Executioner.GetExecutioner(m_path, false);
23 string output, error;
24 bool retval = 0 == e.Execute("git-show-ref", "-s --heads " + Name, "", out output, out error);
25 m_hash = output.Trim();
26 return retval;
29 public override string ToString()
31 return Name;