[PR #2542] [MERGED] When we reload a profile, always use the same GUID for it #24984

Open
opened 2026-01-31 09:06:33 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2542
Author: @zadjii-msft
Created: 8/26/2019
Status: Merged
Merged: 8/26/2019
Merged by: @DHowett-MSFT

Base: masterHead: dev/migrie/b/reload-no-guid


📝 Commits (1)

  • 30d1b85 When we reload a profile, always use the same GUID for it

📊 Changes

2 files changed (+8 additions, -1 deletions)

View changed files

📝 src/cascadia/TerminalApp/Profile.cpp (+4 -1)
📝 src/cascadia/TerminalApp/Profile.h (+4 -0)

📄 Description

Summary of the Pull Request

This ensures that settings reload works for profiles w/o GUIDs.

After #2475, we no longer persist the auto-generated GUID for a profile. This means that when settings get reloaded, the profiles without GUIDs will get re-created, and the existing tabs with those profiles will no longer be associated with a profile. That's really bad, and can cause explosions.

This will ensure that we always generate the same GUID for a profile that didn't have one, preventing explosions.

If a person has two profiles with the same name and NO guid, then we'll generate the same GUID for both, then cull the second one when we validate that there should be no duplicate profiles.

References

#2475 caused this regression.

PR Checklist

  • Don't really have an issue for this one
  • I work here
  • This should have tests, but much of this is changing in #2515 anyways
  • Doesn't require documentation to be updated
  • @DHowett-MSFT caught this in the testing for v0.4

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/2542 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 8/26/2019 **Status:** ✅ Merged **Merged:** 8/26/2019 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `dev/migrie/b/reload-no-guid` --- ### 📝 Commits (1) - [`30d1b85`](https://github.com/microsoft/terminal/commit/30d1b85b7793c6ea1eac8552859bbeb77a386dce) When we reload a profile, always use the same GUID for it ### 📊 Changes **2 files changed** (+8 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/Profile.cpp` (+4 -1) 📝 `src/cascadia/TerminalApp/Profile.h` (+4 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This ensures that settings reload works for profiles w/o GUIDs. After #2475, we no longer persist the auto-generated GUID for a profile. This means that when settings get reloaded, the profiles without GUIDs will get re-created, and the existing tabs with those profiles will no longer be associated with a profile. That's really bad, and can cause explosions. This will ensure that we always generate the same GUID for a profile that didn't have one, preventing explosions. If a person has two profiles with the same name and NO guid, then we'll generate the same GUID for both, then cull the second one when we validate that there should be no duplicate profiles. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #2475 caused this regression. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Don't really have an issue for this one * [x] I work here * [ ] This should have tests, but much of this is changing in #2515 anyways * [x] Doesn't require documentation to be updated * [x] @DHowett-MSFT caught this in the testing for v0.4 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:06:33 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24984