code: public void unshallow(ConsoleOutputStreamConsumer outputStreamConsumer, Integer depth) {
          log(outputStreamConsumer, "Unshallowing repository with depth %d", depth);
          CommandLine gitFetch = git(environment)
                  .withArgs("fetch", "origin")
                  .withArg(String.format("--depth=%d", depth))
                  .withWorkingDir(workingDir);
  
          int result = run(gitFetch, outputStreamConsumer);
          if (result != 0) {
              throw new RuntimeException(String.format("Unshallow repository failed for [%s]", this.workingRepositoryUrl()));
          }
      }
docs: https://git-scm.com/docs/git-fetch-pack