Skip to content

fix: remove global directory overwrite#7

Merged
laggu merged 2 commits intodevelopfrom
gv-7
Feb 6, 2026
Merged

fix: remove global directory overwrite#7
laggu merged 2 commits intodevelopfrom
gv-7

Conversation

@laggu
Copy link
Copy Markdown
Owner

@laggu laggu commented Feb 6, 2026

No description provided.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @laggu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request simplifies the git-volume tool by removing the complexity associated with overriding the global directory. By hardcoding the global directory to ~/.git-volume, the change ensures a consistent and predictable location for global sources, reducing potential configuration issues and streamlining the codebase. This refactoring impacts how GitVolume contexts are initialized and how configuration options are handled across various commands.

Highlights

  • Removed Global Directory Override: The ability to override the global directory for git-volume via command-line flags or configuration files has been removed. The global directory is now fixed to ~/.git-volume.
  • Simplified gitvolume.Options: The GlobalDirOverride field has been removed from the gitvolume.Options struct, simplifying the initialization of GitVolume instances.
  • Streamlined Context Initialization: The NewContext function no longer accepts an override parameter, ensuring that the global directory is consistently resolved to the default path.
  • Configuration Cleanup: The globalDir field has been removed from the rawConfig struct and the SampleConfig, reflecting that the global directory is no longer configurable.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • cmd/add.go
    • Removed GlobalDirOverride from gitvolume.New options.
  • cmd/init.go
    • Removed GlobalDirOverride from gitvolume.New options.
  • cmd/list.go
    • Removed GlobalDirOverride from gitvolume.New options.
  • cmd/root.go
    • Removed the globalDir flag declaration and its associated persistent flag registration.
  • cmd/sync.go
    • Removed GlobalDirOverride from gitvolume.New options.
  • cmd/unsync.go
    • Removed GlobalDirOverride from gitvolume.New options.
  • internal/gitvolume/context.go
    • Removed the commented-out globalDir option from SampleConfig.
    • Modified NewContext to no longer accept a globalDirOverride parameter and always initialize with the default global directory.
    • Removed the logic within the Load method that allowed globalDir to be overridden from the configuration file.
    • Removed the GlobalDir field from the rawConfig struct.
    • Simplified resolveGlobalDir to always return the default global directory (~/.git-volume) and removed all override logic.
  • internal/gitvolume/context_test.go
    • Removed the strings import as it is no longer needed.
    • Updated TestResolveGlobalDir to reflect the new behavior where resolveGlobalDir always returns the default global directory, removing all test cases related to overrides.
    • Updated calls to NewContext("") to NewContext() in various TestNewWorkspace_* functions.
  • internal/gitvolume/gitvolume.go
    • Removed the GlobalDirOverride field from the Options struct.
    • Updated the New function to call NewContext() without passing any global directory override.
Activity
  • The pull request was opened by laggu.
  • There is no additional human activity (comments, reviews, etc.) on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 전역 디렉토리 설정 기능을 제거하고 ~/.git-volume으로 경로를 고정하여 도구를 단순화하는 것을 목표로 합니다. 대부분의 변경 사항은 globalDir 플래그와 옵션을 제거하는 것으로 올바르게 반영되었습니다. 하지만 resolveGlobalDir 함수를 리팩토링하는 과정에서 코드의 견고성이 다소 약화된 부분이 발견되어 수정을 제안했습니다. 이 부분을 제외하면 전반적인 변경 사항은 좋아 보입니다.

Comment thread internal/gitvolume/context.go
@laggu laggu merged commit d7a1aa2 into develop Feb 6, 2026
@laggu laggu deleted the gv-7 branch February 6, 2026 13:17
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.

1 participant