Skip to content

Add IRB history file to gitignore#7783

Merged
aduth merged 2 commits intomainfrom
aduth-gitignore-irb-history
Feb 7, 2023
Merged

Add IRB history file to gitignore#7783
aduth merged 2 commits intomainfrom
aduth-gitignore-irb-history

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Feb 7, 2023

🛠 Summary of changes

Updates the .irbrc configuration added in #7770 to avoid irb saving history, which is the default behavior. Saving history is not gitignore'd, so could be accidentally committed, and risks the chance that history contains sensitive information. Alternatively, we could gitignore, though I'm not sure that having history provides much value anyways.

Edit: Per discussion at #7783 (comment), we're keeping the default history behavior, but adding the history file to .gitignore (the "alternatively" option mentioned above).

📜 Testing Plan

  • Run irb
  • Enter a command (e.g. 1+1)
  • Observe no .irb_history file in project root directory

changelog: Internal, Console, Disable autocompleting in Rails console
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM, we could also add a gitignore to be safe?

@aduth aduth changed the title Update irbrc to avoid saving history Add IRB history file to gitignore Feb 7, 2023
@aduth aduth merged commit de454dc into main Feb 7, 2023
@aduth aduth deleted the aduth-gitignore-irb-history branch February 7, 2023 16:00
@aduth aduth mentioned this pull request Feb 9, 2023
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.

3 participants