[Insight-developers] Data submodule was reverted again ( staging check needed? )
Brad King
brad.king at kitware.com
Wed Jan 26 09:30:47 EST 2011
On 01/26/2011 09:10 AM, Bradley Lowekamp wrote:
> On Jan 26, 2011, at 8:29 AM, Brad King wrote:
>> I can address this with a commit check that ensures no ITK commit's
>> Testing/Data submodule references an older version than one of its
>> parents.
>
> Excellent!
>
> Are you going to add this as a local commit hook and/or the staging area?
I'm trying to do both. However, "git merge" does not seem to run the
pre-commit hook at all. It's probably okay though because the problematic
case is when there is a conflict and someone does
$ git checkout mytopic
$ git submodule update
$ git merge master
CONFLICT
# fails to run "git submodule update"
$ edit files to resolve conflicts
$ git commit -a
The last step causes the merge to take the topic's side of the submodule.
Fortunately in this case the commit is created by "git commit" which does
run the checks.
-Brad K
More information about the Insight-developers
mailing list