git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Issue with global config defaults "user.useConfigOnly = true" + "pull.rebase = preserve" - "user.email"

From
Dakota Hawkins <dakotahawkins@gmail.com>
Date
Jul 29, 2016, 09:17 UTC
Message-ID
<CAG0BQXnVAYdpk9EM_uiD+=UKSKmK=z1YEar5MresTr5XfDCxHw@mail.gmail.com>
Hello,
I have a question which may be a bug (I'm a bit skeptical), but here goes:

In my global .gitconfig, I have "user.useConfigOnly = true" and user.email isn't set there (I prefer to be forced to set it on a per-repo basis, as I use different emails for work and personal repos). I ALSO have "pull.rebase = preserve" set.

An example of the problem I have is with tools like golang (I filed an issue there, they closed it and suggested the problem is with git or my config: https://github.com/golang/go/issues/16516#issuecomment-235800085) that use git to pull in package repos without any real user interaction. When something like that runs a git pull for me (to update a package repo) my global config makes it try to rebase, which fails because git doesn't know who I am.

With golang, at least, there's no help setting-up all of its cloned repos with my user information in local configs, it's a manual step and I have to repeat it anytime anything decided to clone a new repo to use as a package, so it's at least persistently frustrating. Hence the golang bug, which I think is still a bug because they should handle this better.

In those cases specifically, I never have local commits that differ from the remote, so a "pull --ff-only" should leave me in the same state as a "pull --rebase".

Is this a case of rebase trying to make sure it has enough information for me to be a committer before knowing whether I even need to rewrite any commits, and could/should that be avoided? Alternatively (or also) could/should rebase detect that a fast-forward is possible and prefer to do that instead?

I would not be surprised to learn that there's something I don't know or haven't considered that explains why those things aren't really do-able, but if that's the case I'd be interested to know what they are (I'd love to go back to the golang people and tell them to re-open my bug because there's nothing wrong with git).

Thanks for your time, and please let me know if you'd like any additional information.

- Dakota Hawkins
Next: Junio C Hamano
Message 1 of 18 in “Issue with global config defaults "user.useConfigOnly = true" + "pull.rebase = preserve" - "user.email"”
  1. Dakota HawkinsJul 29, 2016
  2. Junio C HamanoJul 29, 2016
  3. Jeff KingJul 29, 2016
  4. Junio C HamanoJul 29, 2016
  5. Jeff KingJul 29, 2016
  6. Jeff KingJul 29, 2016
  7. Junio C HamanoJul 29, 2016
  8. Jeff KingJul 29, 2016
  9. Junio C HamanoJul 29, 2016
  10. Jeff KingJul 29, 2016
  11. Dakota HawkinsJul 30, 2016
  12. Junio C HamanoAug 11, 2016
  13. Johannes SchindelinSep 9, 2016
  14. Junio C HamanoSep 9, 2016
  15. Junio C HamanoSep 9, 2016
  16. Dakota HawkinsSep 9, 2016
  17. Junio C HamanoJul 29, 2016
  18. Jeff KingJul 29, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.