summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-12-09 10:14:38 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2019-12-09 10:15:05 +0100
commit23c5ebff796ff8d43ccc2f33e54434f33ea92b3d (patch)
treed2748dc2252713f0615f488448f59ef1208daef3 /org.eclipse.jgit.lfs
parent8a633bde8aa7a1596c99088cb5ff159ca5c70820 (diff)
parent23125abc20758f06aae9877306ceca6651750b3c (diff)
downloadjgit-23c5ebff796ff8d43ccc2f33e54434f33ea92b3d.tar.gz
jgit-23c5ebff796ff8d43ccc2f33e54434f33ea92b3d.zip
Merge branch 'stable-5.6'
* stable-5.6: Add ability to redirect stderr from git hooks Add possibility to get pure stderr output from AbortedByHookException Change-Id: Ifc02675542dad6ced25fdd8b9fae80b5736db688 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.lfs')
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java10
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java14
2 files changed, 24 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java
index 3c5826362c..e90d92976a 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/BuiltinLFS.java
@@ -106,6 +106,16 @@ public class BuiltinLFS extends LfsFactory {
return null;
}
+ @Override
+ @Nullable
+ public PrePushHook getPrePushHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ if (isEnabled(repo)) {
+ return new LfsPrePushHook(repo, outputStream, errorStream);
+ }
+ return null;
+ }
+
/**
* @param db
* the repository
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
index 3e6a26159b..b3e304fea2 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
@@ -107,6 +107,20 @@ public class LfsPrePushHook extends PrePushHook {
super(repo, outputStream);
}
+ /**
+ * @param repo
+ * the repository
+ * @param outputStream
+ * not used by this implementation
+ * @param errorStream
+ * not used by this implementation
+ * @since 5.6
+ */
+ public LfsPrePushHook(Repository repo, PrintStream outputStream,
+ PrintStream errorStream) {
+ super(repo, outputStream, errorStream);
+ }
+
@Override
public void setRefs(Collection<RemoteRefUpdate> toRefs) {
this.refs = toRefs;