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

Git config from a Python script

From
JVJerome Vuarand <jerome.vuarand@gmail.com>
Date
Sep 7, 2010, 12:45 UTC
Message-ID
<AANLkTinUi-c+Vo36EYjKoH-0Ye-J0ZFtqeMySdmnHf2L@mail.gmail.com>
Hi,

I'm trying to write Git hooks in Python. I'd like to run some git commands from the hook, so I'm using the Python subprocess module. When running the "git config" command, I can only get access to local configuration, while the exact same command from a command line give me access to both local and global configuration. I already checked that environment variables from a program run by python are the same as when run from the command line. So I'm wondering what else could be the source of that difference.

I'm on Windows XP, using Git 1.6.4.msysgit.0 and Python 2.6.2.
Regards,
Jérôme Vuarand.
Message 1 of 1 in “Git config from a Python script”
  1. Jerome VuarandSep 7, 2010

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.