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

Sublime Merge Not Reading NAME and EMAIL from conditional includes #1998

Open
pa-0 opened this issue Jan 6, 2025 · 2 comments
Open

Sublime Merge Not Reading NAME and EMAIL from conditional includes #1998

pa-0 opened this issue Jan 6, 2025 · 2 comments

Comments

@pa-0
Copy link

pa-0 commented Jan 6, 2025

Version info

  • OS: macOS 15.2 AND Windows 11 Enterprise
  • Build: absolute latest (stable) on both OS's

Description

Git is configured with two conditional includes ([includeif "gitdir:/<UNIQUE-PATH>/**"]) which each point to different config files (file A and file B). Sublime Merge seems to read all this information correctly (as correct SSH keys are used based on respective directory). However, with every repo on attempts to commmit changes, Sublime Merge prompts for NAME and EMAIL prior to any successfull commit.

Steps to reproduce

Steps to reproduce the behavior:

  1. Open repository
  2. Stage all changes
  3. Enter commit message, and click commit.
  4. Prompt appears requesting either global or local NAME/EMAIL prior to committing.

Expected behavior

All configurations that apply to a repository should be read from gitconfig including the above.

Debug Information
Happy to come back and add debug information if necessary. Just note that this has been consistent across 40+ repositories thus far, without exception.

@themilkman
Copy link

Related: #1314 / #1858 / #1982

@pa-0
Copy link
Author

pa-0 commented Jan 9, 2025

After looking into this a bit more...

=== App Version Information ===
Build: 2102

=== Git Version Information ===
Using Git: git (system)
git version 2.47.1
PATH: /opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/go/bin:/Users/USER/.files/local/share/rust/cargo/bin:/Users/USER/.files/local/bin:/Users/USER/.files/local/bin/go(from shell)
environment variables loaded using: /bin/zsh -l

=== Browse Page Information ===
HEAD: 6e89acaa5a39c61155f56ce929411cee81ad82e5
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0

=== Git Status Information ===

=== Our Status Information ===
?? .DS_Store
?? error-handling/.DS_Store
?? modules/.DS_Store
?? modules_winps/.DS_Store
?? modules_winps/PSReadLine/.DS_Store
?? scripts/.DS_Store
?? toast/.DS_Store
?? toast/Notification_Scripts/.DS_Store
?? toast/Simple-Toast-Note/.DS_Store

=== Git Config Information ===
branch.main.merge=refs/heads/main
branch.main.remote=origin
core.bare=false
core.filemode=true
core.ignorecase=true
core.logallrefupdates=true
core.precomposeunicode=true
core.repositoryformatversion=0
credential.helper=osxkeychain
fetch.prune=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge -- %f
includeif.gitdir:/Users/USER/.files/**.path=~/.files/config/git/config-m1-alpha
includeif.gitdir:/Users/USER/Code/note/**.path=~/.files/config/git/config-m1-bravo
includeif.gitdir:/Users/USER/Code/snpt/**.path=~/.files/config/git/config-m1-bravo
includeif.gitdir:/Users/USER/Code/src/**.path=~/.files/config/git/config-m1-alpha
includeif.gitdir:C:/Users/USER/**.path=~/.files/config/git/config-win
init.defaultbranch=main
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git@alpha:pa-0/ps
[email protected]
user.name=USER

=== Our Config Information ===
Git Config Path Information
Using config path: /etc/gitconfig
Using config path: /Users/USER/.config/git/config
Using config path: /Users/USER/.gitconfig
Using config path: /Users/USER/Code/src/ps/.git/config

Our config output is different to the Git config output
branch.main.merge=refs/heads/main
branch.main.remote=origin
core.bare=false
core.filemode=true
core.ignorecase=true
core.logallrefupdates=true
core.precomposeunicode=true
core.repositoryformatversion=0
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git@alpha:pa-0/ps
[email protected]
user.name=USER

=== Git Attributes Information ===
git check_attr --all output

=== Our Modified Files Newline Normalisation and EOL Information ===

=== Our Modified Files Flag Information ===
Ignoring symlinks: 0

=== Staged Files Information ===

=== Repository Statistics ===
Commit Count: 65
Untracked Files Count: 11
Modified Files Count: 0
Staged Files Count: 0
Submodule Count: 1
Loose Objects Count: 3
Packfile Count: 1

There appears to be a discrepancy between where Git reads my config files and where Sublime Merge thinks they live:

=== SM's Config Information ===
Git Config Path Information
Using config path: /etc/gitconfig
Using config path: /Users/USER/.config/git/config  # Incorrect path
Using config path: /Users/USER/.gitconfig			# Incorrect path

I have $XDG_CONFIG_HOME set to Users/USER/.files/config/ and the 'git' folder is located in this directory; whereas, SM seems to be looking in a different config path (but this does not explain how SM still manages to get some of the configuration.

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

No branches or pull requests

2 participants