Example usage for org.eclipse.jgit.storage.pack PackConfig setDeltaCompress

List of usage examples for org.eclipse.jgit.storage.pack PackConfig setDeltaCompress

Introduction

In this page you can find the example usage for org.eclipse.jgit.storage.pack PackConfig setDeltaCompress.

Prototype

public void setDeltaCompress(boolean deltaCompress) 

Source Link

Document

Set whether or not the writer will create new deltas on the fly.

Usage

From source file:net.antoniy.gidder.beta.ssh.Upload.java

License:Apache License

@Override
protected void runImpl() throws IOException {
    if (!hasPermission()) {
        err.write(MSG_REPOSITORY_PERMISSIONS.getBytes());
        err.flush();//from w w w .j av a  2s  . com
        onExit(CODE_OK, MSG_REPOSITORY_PERMISSIONS);
        return;
    }

    Config config = new Config();
    //      int timeout = Integer.parseInt(config.getString("transfer", null,
    //            "timeout"));
    int timeout = 10;

    PackConfig packConfig = new PackConfig();
    packConfig.setDeltaCompress(false);
    packConfig.setThreads(1);
    packConfig.fromConfig(config);

    final UploadPack up = new UploadPack(repo);
    up.setPackConfig(packConfig);
    up.setTimeout(timeout);
    up.upload(in, out, err);
}