Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[th/rename-main-to-tft] tft: rename "main.py" to "tft.py" #168

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

thom311
Copy link
Collaborator

@thom311 thom311 commented Nov 27, 2024

We have multple python scripts that are directly executable (i.e. they have a main() function).

When running the test, it's not obvious why this program is called main.py. Rename it to tft.py. You should now run tft.py.

Add a symlink main.py that points to the new script. This is for backward compatibility, so that the various callers don't need to update their code (yet).

@thom311 thom311 force-pushed the th/rename-main-to-tft branch 2 times, most recently from e4069a9 to 202df1e Compare December 2, 2024 09:38
@wizhaoredhat
Copy link
Collaborator

Strange that git doesn't think it was a file move. But LGTM

@thom311
Copy link
Collaborator Author

thom311 commented Dec 2, 2024

Strange that git doesn't think it was a file move. But LGTM

That's because the same commit moves the file and adds the file as symlink. In that case, git's heuristic doesn't detect merges.

That is indeed rather unfortunate, it makes the history a bit ugly. Note that git log --follow tft.py still works to walk the history back via the renamed file.

We have multple python scripts that are directly executable (i.e. they
have a main() function).

When running the test, it's not obvious why this program is called
`main.py`. Rename it to `tft.py`. You should now run `tft.py`.

Add a symlink `main.py` that points to the new script. This is for
backward compatibility, so that the various callers don't need to update
their code (yet).
@thom311 thom311 force-pushed the th/rename-main-to-tft branch from 202df1e to 747cf95 Compare December 2, 2024 19:53
@wizhaoredhat wizhaoredhat merged commit ab3a7bb into ovn-kubernetes:main Dec 2, 2024
3 checks passed
@thom311 thom311 deleted the th/rename-main-to-tft branch December 2, 2024 22:43
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