Permalink
Browse files

Fix minor errors now that the build actually works.

  • Loading branch information...
1 parent 94dc759 commit 1349b5ec62493a99cbf95fb4f42e4bee9f66a92a @stephenh committed Dec 31, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/hudson/plugins/git/GitLastHashProperty.java
@@ -7,6 +7,7 @@
import hudson.model.Job;
import hudson.model.JobProperty;
import hudson.model.JobPropertyDescriptor;
+import hudson.scm.SCM;
import java.io.IOException;
@@ -28,8 +29,7 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
// Make sure we can cast to GitSCM; it's possible that this will be hudson.scm.NullSCM
if (!(genericScm instanceof GitSCM))
return true;
- GitSCM scm = (GitSCM)genericScm;
- GitSCM scm = (GitSCM) build.getProject().getScm();
+ GitSCM scm = (GitSCM) genericScm;
GitAPI git = new GitAPI(scm.getDescriptor(), launcher, build.getParent().getWorkspace(), listener);
String tipHash = git.revParse(scm.getRemoteBranch());

0 comments on commit 1349b5e

Please sign in to comment.