View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015722CMakeModulespublic2015-08-31 15:492016-02-01 09:10
ReporterKevin Godby 
Assigned ToDaniele E. Domenichelli 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.3.1 
Target VersionFixed in Version 
Summary0015722: ExternalProject.cmake calls 'git stash save --all' even if git doesn't support --all option
DescriptionThe --all option for git-stash wasn't introduced until git version 1.7.6. If you use ExternalProject_Add with a git repository and have an old version of git installed, cmake will fail when it tries to call 'git stash save --all --quiet'.
Steps To Reproduce* Install a old version of git (<= 1.7.5).
* Use recent version of cmake.
* Try to download a git repository using ExternalProject_Add.

TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0039362)
Brad King (manager)
2015-08-31 15:56

For reference, the stash call was added here:

 ExternalProject: Improve handling of git remote branches
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2128d4c [^]

It needs to be taught to check the version of Git for support of the option.
(0039431)
Daniele E. Domenichelli (developer)
2015-09-17 06:11

Sorry for the delay. I just pushed a fix in the topic "ExternalProject_stash_save_all"

  * ExternalProject: Use GIT_VERSION_STRING instead of custom method
    http://www.cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=b04c381 [^]

  * ExternalProject: Use "git stash save --all" only if supported (0015722)
    http://www.cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=7c5b6ed [^]

I don't think there was an alternative syntax or anything similar in git 1.7.5 (--include-untracked was added together with --all) so I just removed the option for older git releases.

Unit tests should already cover this, but I don't know if there is a test machine with git < 1.7.6.

Can you please review the topic?
(0039433)
Brad King (manager)
2015-09-17 08:35

Re 0015722:0039431: Thanks. LGTM. Please merge for testing.
(0039434)
Daniele E. Domenichelli (developer)
2015-09-17 08:40

Merged into next.
Thanks.
(0040420)
Robert Maynard (manager)
2016-02-01 09:10

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-08-31 15:49 Kevin Godby New Issue
2015-08-31 15:55 Brad King Assigned To => Daniele E. Domenichelli
2015-08-31 15:55 Brad King Status new => assigned
2015-08-31 15:56 Brad King Note Added: 0039362
2015-09-17 06:11 Daniele E. Domenichelli Note Added: 0039431
2015-09-17 08:35 Brad King Note Added: 0039433
2015-09-17 08:40 Daniele E. Domenichelli Note Added: 0039434
2015-09-25 11:56 Daniele E. Domenichelli Status assigned => resolved
2015-09-25 11:56 Daniele E. Domenichelli Resolution open => fixed
2016-02-01 09:10 Robert Maynard Note Added: 0040420
2016-02-01 09:10 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team