aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitConfigTest.java
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2022-02-21 00:20:52 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2022-03-23 18:55:31 -0400
commita171360292cedde6f05a40069e36946a8045a6a1 (patch)
tree8fb9bfb5ad3dfd13c5e9f5ba447c0aff073405ad /org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitConfigTest.java
parent30a137dfe5cfa02c8b8001e451148a183c79c19b (diff)
downloadjgit-a171360292cedde6f05a40069e36946a8045a6a1.tar.gz
jgit-a171360292cedde6f05a40069e36946a8045a6a1.zip
[push, lfs] Tell the pre-push hook whether the push is a dry run
This is a feature that does not exist in C git: an external pre-push hook doesn't know whether the push is run as a dry run. But for internal hooks written in Java it is entirely possible to give a hook this information. In JGit with its internal LFS implementation, this enables us to not perform LFS uploads in a dry run. This is kind of important because EGit frequently does a dry-run before doing the actual push to give the user a way to review what would be pushed before it actually happens. Doing an LFS upload of potentially huge files during a dry-run is wasteful, makes the dry run not actually a dry run, and leads to uploading the same file twice if followed by a real push. Use the information in the LfsPrePushHook to only do the initial call to the LFS server, but then skipping the actual upload if the push is a dry run. That way, a failure to contact the LFS server leads to an error in the dry run, as it should. Bug: 546567 Change-Id: I155430f27c4979d91096ba72fd95c3775dd3f28b Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitConfigTest.java')
0 files changed, 0 insertions, 0 deletions