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

Custom-Commands-Compendium should update due to api break change #3651

Open
yam-liu opened this issue Jun 11, 2024 · 1 comment
Open

Custom-Commands-Compendium should update due to api break change #3651

yam-liu opened this issue Jun 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@yam-liu
Copy link

yam-liu commented Jun 11, 2024

Describe the bug
RefName doesn't exist anymore. But the Custom-Commands-Compendium style refer the old name.
Changes in this commit: 6afcc5b

When running custom commands, we will get this error:

template: template:1:50: executing "template" at <.SelectedRemote.RefName>: can't evaluate field RefName in type *custom_commands.Remote

To Reproduce
no need.

Expected behavior
Fix the Doc.

Screenshots
no need.

Version info:
no need.

Additional context
no need.

@yam-liu yam-liu added the bug Something isn't working label Jun 11, 2024
@stefanhaller
Copy link
Collaborator

Thanks for the report.

This is funny, the point of 6afcc5b was to guard against breaking changes, not to introduce one. We should probably rather fix the code than the docs.

The breaking change was introduced because I wasn't aware that niladic methods are candidates for template substitution. In 6afcc5b I only dealt with the fields of the model structs, but not the getters. This should simply be added.

That said, RefName doesn't really make sense to me as a getter for a remote's name. It was added in 7561f5a in an attempt to make it possible to diff things against a remote, but that strikes me as a mistake; it doesn't work, trying to do this results in fatal: bad revision '<RemoteName>' being shown in the diff view.

OK, I changed my mind, we should fix the docs and not the code. 😄

Custom-Commands-Compendium is a Wiki page, anybody can just change it. I just did it for this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants