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

Add info on number of characters in nano for commit message #304

Closed
wants to merge 1 commit into from

Conversation

rr-it
Copy link
Contributor

@rr-it rr-it commented Apr 29, 2023

This adds information on how to configure the git default editor nano to show information on number of characters for commit messages.

This fixes #305

This adds information on how to configure the git default editor `nano` to show information on number of characters for commit messages.
@linawolf
Copy link
Member

Thanks a lot for your contribution! We generally try not to document other projects but TYPO3. So how to use the editor nano is out of context here I fear. There is such a wide variety of Editors and tools ppl can use around Git that we could not possibly cover them all...

@rr-it
Copy link
Contributor Author

rr-it commented Apr 29, 2023

We do document how to use git.
Nano is the default git editor.
After following all documentation, this settings to show the character limit per line in nano is the only undocumented step I needed to create perfect commit messages.

@linawolf
Copy link
Member

We are actually working on reducing non-TYPO3 information in this guide. Usually such features are better documented and maintained in other places. See (#255) we could add a helpful link to the nano documentation however.

@DavidBruchmann
Copy link

@rr-it Thanks for your contribution!
Like @linawolf said, we're not considering to merge this PR. If you think you can come up with a solution that could find our agreement, please don't hesitate to create another PR.
Thanks!

@DavidBruchmann
Copy link

@rr-it we're just discussing your issue and PR, perhaps you can shine a light on something:
Why you think that nano is the default git editor, where you got this information?
We're considering to add a hint based on your work, but we never want to parrot (unimportant or unproven) narratives.

@rr-it
Copy link
Contributor Author

rr-it commented Apr 30, 2023

@DavidBruchmann I get your point. Just looked up how git gets its editor and it is slightly more complicated.

Git uses either the editor defined via $EDITOR or $VISUAL and then falls back to system default editor:
https://github.com/git/git/blob/48d89b51b3bb8a60580c36731b96a7206ce1e5b9/Documentation/gitfaq.txt#L54-L60

On Debian and Ubuntu systems by default $EDITOR and $VISUAL are not set and the systems default editor is nano:

$ update-alternatives --config editor
  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
  3            /usr/bin/vim.basic   30        manual mode
  4            /usr/bin/vim.tiny    10        manual mode

So to be more specific:
In case someone is developing on a default Debian or Ubuntu system, the default editor used by git is nano.

@DavidBruchmann
Copy link

DavidBruchmann commented Apr 30, 2023

@rr-it Thanks for these data!
@linawolf what's your take on this and also on my proposition above?
Shall we still add the link to the nano documentation?
It might also be possible to link to nano as well as vim documentation.

@linawolf
Copy link
Member

linawolf commented May 1, 2023

@rr-it Could we maybe add a list of links in the infobox with the most common editors vim and nano and how to set line counts there?

@rr-it
Copy link
Contributor Author

rr-it commented May 2, 2023

vi/vim:
Shows information on cursor position (= length of line) by default.

nano:
This software is more than 23 years old, last change to the setting constantshow was more than 7 years ago in 2015 (parameter renamed from constant to constantshow).
So in this case I would go for documenting the feature straight away in the TYPO3 Contribution Guide instead of linking to a "never" changing documentation:

For nano find the documentation at https://nano-editor.org/dist/latest/nanorc.5.html and then search for set constantshow to see how to 'constantly display the cursor position in the status bar'.

@linawolf
Copy link
Member

linawolf commented May 3, 2023

@rr-it sounds like a good solution, please go ahead

@linawolf linawolf closed this Jun 13, 2023
@linawolf
Copy link
Member

No reaction since 2 Month, closing. Please tell us if you want to work on this again

@rr-it
Copy link
Contributor Author

rr-it commented Jun 13, 2023

@linawolf Please reopen. I revised the changes.

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.

Undocumented how to handle the limit on characters per line for commit messages in default environment
3 participants