mperin / quicktag-maven-plugin

Automatically exported from code.google.com/p/quicktag-maven-plugin
0 stars 0 forks source link

SOURCE_DIRTY is always true when specifying git root #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
quicktag always passes the --git-dir argument when invoking git.  When doing 
this, you must also specify --work-tree to point to the working copy root 
directory; otherwise, git will assume it is in the current working directory.  
If this is not true, (e.g. project pom is in a subdirectory), git-describe will 
always report "dirty".

What steps will reproduce the problem?
1. Create a maven project in a subdirectory under the git working copy root
2. Configure quicktag-maven-plugin with the vcsRepositoryPath option 
3. Run quicktag-maven-plugin with a clean working copy

What is the expected output? What do you see instead?
Expected: Version.SOURCE_DIRTY = true
Actual: Version.SOURCE_DIRTY = false

What version of the product are you using? On what operating system?
2.1.5 on OS X 10.9.5

Please provide any additional information below.
See the following git mailing list messages explaining use of --git-dir and 
--work-tree
http://marc.info/?l=git&m=142549885127827&w=2
http://marc.info/?l=git&m=120956110207686&w=2

Original issue reported on code.google.com by ch...@spartansoftwareinc.com on 4 Mar 2015 at 8:23

GoogleCodeExporter commented 9 years ago
Aside from this issue, I don't see why it is necessary to specify the git 
directory at all.  As long as the project pom is within the git working copy, 
git will work just fine.  The option really only needs to be added if the user 
has intentionally specified an alternate git repository directory for some 
reason.

Original comment by ch...@spartansoftwareinc.com on 4 Mar 2015 at 8:27