summaryrefslogtreecommitdiff
path: root/var.c
AgeCommit message (Collapse)Author
2006-02-19Delay "empty ident" errors until they really matter.Junio C Hamano
Previous one warned people upfront to encourage fixing their environment early, but some people just use repositories and git tools read-only without making any changes, and in such a case there is not much point insisting on them having a usable ident. This round attempts to move the error until either "git-var" asks for the ident explicitly or "commit-tree" wants to use it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25git-var: make it work in subdirectory.Junio C Hamano
Use setup_git_directory() so that it can find its .git directory. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-22git-var: constness and globalness cleanup.Junio C Hamano
var.c::git_var read function did not have to return writable strings; make it and the functions it points at return const char * instead. ident.c::get_ident() did not need to be global, so make it static. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-12Use git config file for committer name and email infoLinus Torvalds
This starts using the "user.name" and "user.email" config variables if they exist as the default name and email when committing. This means that you don't have to use the GIT_COMMITTER_EMAIL environment variable to override your email - you can just edit the config file instead. The patch looks bigger than it is because it makes the default name and email information non-static and renames it appropriately. And it moves the common git environment variables into a new library file, so that you can link against libgit.a and get the git environment without having to link in zlib and libcrypt. In short, most of it is renaming and moving, the real change core is just a few new lines in "git_default_config()" that copies the user config values to the new base. It also changes "git-var -l" to list the config variables. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-30[PATCH] Unify usage strings declarationPetr Baudis
All usage strings are now declared as static const char []. This is carried over from my old git-pb branch. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-15[PATCH] Add git-var a tool for reading interesting git variables.Eric W. Biederman
Sharing code between shell scripts and C is a challenge. The program git-var allows us to have a set of named values that a shell script can interrogate and a normal C program can simply call the functions that compute them. Allowing sharing when computing plain test values. Signed-off-by: Linus Torvalds <torvalds@osdl.org>