Skip to content

fix issue with overwritting local mods#89

Merged
jedwards4b merged 6 commits intomainfrom
fix/overwrite_local_mod
Dec 2, 2025
Merged

fix issue with overwritting local mods#89
jedwards4b merged 6 commits intomainfrom
fix/overwrite_local_mod

Conversation

@jedwards4b
Copy link
Copy Markdown
Collaborator

Fixes issue #88
I also tested against issue #75

@jedwards4b jedwards4b requested a review from billsacks December 1, 2025 19:01
@jedwards4b jedwards4b self-assigned this Dec 1, 2025
@billsacks
Copy link
Copy Markdown
Member

Thanks a lot for this quick fix, @jedwards4b ! I just want to confirm the intended behavior in these three cases:

(1) If I introduce some local mods in a repository, and that repository is otherwise in sync with the intended tag, then "git-fleximod update" happily proceeds, leaving that repository alone.

(2) If I introduce some local mods in a repository, and that repository is out-of-sync with its intended tag, but git is able to bring it in sync without conflicting with the local mods, it is brought up to date with the intended tag, and the local mods are retained (with a message during update like, "cime has modified files: ['README.md']").

(3) If I introduce some local mods in a repository, and that repository is out-of-sync with its intended tag, and git is not able to bring it in sync due to conflicts with the local mods, I get an exception with an error message like, "ERROR: Failed to checkout cime at tag or hash cime6.1.135 from /Users/sacks/temporary/CESM/cime".

I'm especially wanting to check about cases (1) and (2): I think these differ from the more conservative manage_externals behavior where it would abort without doing any updates if there were local mods. Maybe it's okay for git-fleximod to be less conservative in this respect, but I at least wanted to check in to confirm that it's now operating as designed.

@jedwards4b
Copy link
Copy Markdown
Collaborator Author

I am currently working on tests, I will try to test all three cases you have listed.

@billsacks
Copy link
Copy Markdown
Member

I am currently working on tests, I will try to test all three cases you have listed.

Awesome - thanks a lot!

@jedwards4b
Copy link
Copy Markdown
Collaborator Author

@billsacks I believe that I am now testing each scenario. This is ready for your review.

Copy link
Copy Markdown
Member

@billsacks billsacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing this and for introducing these tests of the different scenarios!

@jedwards4b jedwards4b merged commit 493940f into main Dec 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants