-
Notifications
You must be signed in to change notification settings - Fork 79
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
Consider GIT_AUTHOR_EMAIL/GIT_COMMITTER_EMAIL as current author/committer #72
Comments
would prefer to wait for upstream (libgit2/libgit2#3751) rather than hacking this in myself. i only accepted #22 because upstream explicitly declined to support it. |
FWIW, libgit2/libgit2#3751 is closed. The feature seems to be implemented. |
ah, that's good to know. ping this issue again when it's available in a git2-rs release and i'll bump for it |
Hi @tummychow , as requested: libgit2/libgit2#6706 is part of https://github.com/libgit2/libgit2/releases/tag/v1.9.0 libgit2 v1.9.0 is included in libgit-rs 0.20.0 (https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md#changed) |
oh how convenient, someone already did this lol #138 |
@tummychow It's already bumped indeed, but the requested feature is not working yet: I get a Please re-open this issue. |
To reproduce:
|
I don't think git2 is doing what we think it's doing. I added some debug logging to indicate the sig's name and it doesn't respect the λ cargo run -- --verbose
Running `C:\Dev\git-absorb\target\debug\git-absorb.exe --verbose`
Feb 17 18:53:34.741 DEBG repository found, path: C:/Dev/git-absorb/t/.git/, line: 25, module: git_absorb
Feb 17 18:53:34.745 DEBG head found, head: refs/heads/master, line: 15, module: git_absorb::stack
Feb 17 18:53:34.749 DEBG head pushed, head: refs/heads/master, line: 32, module: git_absorb::stack
Feb 17 18:53:34.753 DEBG branch not hidden, branch: refs/heads/master, line: 56, module: git_absorb::stack
Feb 17 18:53:34.758 DEBG Signature is, signature: Some("Blair Conrad"), line: 67, module: git_absorb::stack
Feb 17 18:53:34.761 WARN Will not fix up past commits not authored by you, use --force-author to override, commit: 3a6531973a726ad6eaa0d9bde95bbf78008c4486, line: 81, module: git_absorb::stack
Feb 17 18:53:34.767 CRIT No commits available to fix up, exiting, line: 42, module: git_absorb
λ echo $env:GIT_AUTHOR_NAME
A This is built on 7d1afd2 (master as I type). Update! |
darn, thank you both for checking rust-lang/git2-rs#1126 |
When using
$GIT_AUTHOR_EMAIL
and$GIT_COMMITTER_EMAIL
with something else thangit config user.email
, it will display a warning:I think that it should consider the env settings as the current owner - not sure if alone or additionally.
(FWIW, I am using the env variables to use different emails per projects.
It is easy enough to configure
user.email
there additionally, but that might require to do it with many sub-directories / projects for a company stored in a common ancestor dir, where setting the env can be done for all sub-directories more easily)The text was updated successfully, but these errors were encountered: