bixat/vscode-branch-timer

Implement Auto-Add to `.gitignore` Feature for Branch Timer Extension

Closed this issue · 0 comments

Description

The Branch Timer extension currently lacks a feature to automatically manage .vscode/branch-timer.json with respect to .gitignore. A proposed update introduces this functionality, allowing users to control whether the extension should automatically add .vscode/branch-timer.json to .gitignore.

Proposed Changes

  1. Configuration Option: A new configuration property branchTimer.autoAddToGitIgnore is added to package.json. This option is a boolean, set to true by default, which dictates whether the Branch Timer's JSON file should be automatically added to .gitignore.
  2. Functionality Implementation: Modify the addToGitIgnore function in extension.ts to check the new configuration setting. If branchTimer.autoAddToGitIgnore is false, the extension will skip the process of adding .vscode/branch-timer.json to .gitignore, adhering to user preferences.

Goals

  • Provide users with control over the modification of their .gitignore file by the Branch Timer extension.
  • Prevent unanticipated or undesired modifications to .gitignore, enhancing user experience and extension predictability.

Action Items

  • Update package.json to include the new branchTimer.autoAddToGitIgnore configuration option.
  • Implement the logic in extension.ts to respect this configuration setting when attempting to modify .gitignore.
  • Test the new feature across different operating systems and Git configurations to ensure reliability and consistency.

This issue outlines the need and approach for enhancing the Branch Timer extension with a user-configurable option to automate .gitignore management, promoting a more tailored and user-friendly experience.