aboutsummaryrefslogtreecommitdiff
path: root/init-db.c
Commit message (Collapse)AuthorAge
* git-init-db: set up the full default environmentLinus Torvalds2005-05-30
| | | | | Create .git/refs/{heads,tags} and make .git/HEAD be a symlink to (the as yet non-existent) .git/refs/heads/master.
* sparse cleanupLinus Torvalds2005-05-20
| | | | | | | | | Fix various things that sparse complains about: - use NULL instead of 0 - make sure we declare everything properly, or mark it static - use proper function declarations ("fn(void)" instead of "fn()") Sparse is always right.
* Introduce GIT_DIR environment variable.Junio C Hamano2005-05-09
| | | | | | | | | | | | | | | | | | During the mailing list discussion on renaming GIT_ environment variables, people felt that having one environment that lets the user (or Porcelain) specify both SHA1_FILE_DIRECTORY (now GIT_OBJECT_DIRECTORY) and GIT_INDEX_FILE for the default layout would be handy. This change introduces GIT_DIR environment variable, from which the defaults for GIT_INDEX_FILE and GIT_OBJECT_DIRECTORY are derived. When GIT_DIR is not defined, it defaults to ".git". GIT_INDEX_FILE defaults to "$GIT_DIR/index" and GIT_OBJECT_DIRECTORY defaults to "$GIT_DIR/objects". Special thanks for ideas and discussions go to Petr Baudis and Daniel Barkalow. Bugs are mine ;-) Signed-off-by: Junio C Hamano <junkio@cox.net>
* Rename environment variables.Junio C Hamano2005-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | H. Peter Anvin mentioned that using SHA1_whatever as an environment variable name is not nice and we should instead use names starting with "GIT_" prefix to avoid conflicts. Here is what this patch does: * Renames the following environment variables: New name Old Name GIT_AUTHOR_DATE AUTHOR_DATE GIT_AUTHOR_EMAIL AUTHOR_EMAIL GIT_AUTHOR_NAME AUTHOR_NAME GIT_COMMITTER_EMAIL COMMIT_AUTHOR_EMAIL GIT_COMMITTER_NAME COMMIT_AUTHOR_NAME GIT_ALTERNATE_OBJECT_DIRECTORIES SHA1_FILE_DIRECTORIES GIT_OBJECT_DIRECTORY SHA1_FILE_DIRECTORY * Introduces a compatibility macro, gitenv(), which does an getenv() and if it fails calls gitenv_bc(), which in turn picks up the value from old name while giving a warning about using an old name. * Changes all users of the environment variable to fetch environment variable with the new name using gitenv(). * Updates the documentation and scripts shipped with Linus GIT distribution. The transition plan is as follows: * We will keep the backward compatibility list used by gitenv() for now, so the current scripts and user environments continue to work as before. The users will get warnings when they have old name but not new name in their environment to the stderr. * The Porcelain layers should start using new names. However, just in case it ends up calling old Plumbing layer implementation, they should also export old names, taking values from the corresponding new names, during the transition period. * After a transition period, we would drop the compatibility support and drop gitenv(). Revert the callers to directly call getenv() but keep using the new names. The last part is probably optional and the transition duration needs to be set to a reasonable value. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] introduce xmalloc and xreallocChristopher Li2005-04-26
| | | | | | | | Introduce xmalloc and xrealloc to die gracefully with a descriptive message when out of memory, rather than taking a SIGSEGV. Signed-off-by: Christopher Li<chrislgit@chrisli.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] init-db.c: create and use safe_create_dir helperZach Welch2005-04-19
| | | | | | | Factor mkdir calls into common safe_create_dir subroutine. Signed-Off-By: Zach Welch <zw@superlucidity.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] init-db.c: normalize env var handling.Zach Welch2005-04-19
| | | | | | | | Normalize init-db environment variable handling, allowing the creation of object directories with something other than DEFAULT_DB_ENVIRONMENT. Signed-Off-By: Zach Welch <zw@superlucidity.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] init-db.c: cleanup commentsZach Welch2005-04-19
| | | | | | | Consolidate comments at top of main. Signed-Off-By: Zach Welch <zw@superlucidity.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Remove duplicate getenv(DB_ENVIRONMENT) callLinus Torvalds2005-04-19
| | | | Noted by Tony Luck.
* Fix init-db shared database caseLinus Torvalds2005-04-19
| | | | Noted by Aaron Straus
* [PATCH] Whitespace FixesIngo Molnar2005-04-13
| | | | | | | | Trivial whitespace fixes. From: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Petr Baudis <pasky@ucw.cz>
* Rename ".dircache" directory to ".git"Linus Torvalds2005-04-11
| | | | I started out calling the tool "dircache". That's clearly moronic.
* Make the default directory permissions more lax.Linus Torvalds2005-04-11
| | | | | | After all, if you want to not allow others to read your stuff, set your "umask" appropriately or make sure the parent directories aren't readable/executable.
* Use "-Wall -O2" for the compiler to get more warnings.Linus Torvalds2005-04-08
| | | | | | | And fix up the warnings that it pointed out. Let's keep the tree clean from early on. Not that the code is very beautiful anyway ;)
* Add copyright notices.Linus Torvalds2005-04-07
| | | | | | The tool interface sucks (especially "committing" information, which is just me doing everything by hand from the command line), but I think this is in theory actually a viable way of describing the world. So copyright it.
* Initial revision of "git", the information manager from hellLinus Torvalds2005-04-07