repo: use the first commit hash as an id for the repo and use that as the channel name' did not match any files
This commit is contained in:
parent
5f36f8a9e0
commit
7235d9fa30
|
@ -186,7 +186,7 @@ namespace SparkleLib {
|
||||||
else
|
else
|
||||||
server_type = NotificationServerType.Own;
|
server_type = NotificationServerType.Own;
|
||||||
|
|
||||||
this.listener = new SparkleListenerIrc (Domain, RemoteName, server_type);
|
this.listener = new SparkleListenerIrc (Domain, Identifier, server_type);
|
||||||
|
|
||||||
// ...fetch remote changes every 60 seconds if that fails
|
// ...fetch remote changes every 60 seconds if that fails
|
||||||
this.remote_timer = new Timer () {
|
this.remote_timer = new Timer () {
|
||||||
|
@ -266,6 +266,22 @@ namespace SparkleLib {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public string Identifier {
|
||||||
|
get {
|
||||||
|
|
||||||
|
// Because git computes a hash based on content,
|
||||||
|
// author, and timestamp; it is unique enough to
|
||||||
|
// use the hash of the first commit as an identifier
|
||||||
|
// for our folder
|
||||||
|
SparkleGit git = new SparkleGit (LocalPath, "log --reverse -1 --format=%H");
|
||||||
|
git.Start ();
|
||||||
|
git.WaitForExit ();
|
||||||
|
|
||||||
|
return git.StandardOutput.ReadToEnd ().Trim ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void CheckForRemoteChanges ()
|
private void CheckForRemoteChanges ()
|
||||||
{
|
{
|
||||||
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Checking for remote changes...");
|
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Checking for remote changes...");
|
||||||
|
|
Loading…
Reference in a new issue