mschonaker / wagon-git

Git Wagon for Apache Maven
http://synergian.github.io/wagon-git/
83 stars 32 forks source link

Feature lighter init #44

Open astik opened 7 years ago

astik commented 7 years ago

Here is a PR for #43. It's a work in progress (it needs testing), but i want to show you where I was going as soon as possible. There is 2 new properties :

  1. wagon.git.enable.shallow.fetch : to only retrieve the head of a branch
  2. wagon.git.permanent.root : to use a well-known root directory (one not temporary) for git clones
astik commented 7 years ago

So here are some fixes as you requested :

  1. remove unused import (i have to remove my save-action on my eclipse workstation to avoid formatting the existing code, i forgot about those, sorry)
  2. reverse the shallow flag use
  3. the permanent flag is remove and the check is made in the method, you're right, it's cleaner (i only check for the path to end with .git for a git repository)

(I'll squash the commits once we agree on the code =P)