summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #267 from Jopie64/developmentVicent Martí2011-06-171-1/+1
|\ | | | | Fix compilation error in MSVC when compiling for c++
| * Fix compilation error in MSVC when compiling for c++Johan 't Hart2011-06-171-1/+1
| |
* | config: Cleanup external APIVicent Marti2011-06-182-75/+61
| | | | | | | | | | Do not mess with environment variables anymore. The new external API has more helper methods, and everything is explicit.
* | Add fall-back support to the configurationCarlos Martín Nieto2011-06-171-3/+9
| | | | | | | | | | | | | | If a config has several files, we need to check all of them before we can say that a variable doesn't exist. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | Parse the repo's configuration when we load itCarlos Martín Nieto2011-06-171-0/+6
| | | | | | | | | | | | | | It's not enough to load the config, we also need to explicitely parse it after we create it. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | Add git_repository_config APICarlos Martín Nieto2011-06-172-1/+38
| | | | | | | | | | | | | | This function puts the global and repository configurations in one git_config object and gives it to the user. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | Remove double-spaceCarlos Martín Nieto2011-06-171-1/+1
|/ | | | | | Noticed by txdv Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* config: Fix unitialized variable warningVicent Marti2011-06-171-4/+3
|
* Merge pull request #266 from carlosmn/valgrindVicent Martí2011-06-171-1/+11
|\ | | | | Plug memory leaks
| * Plug two leaks in config writingCarlos Martín Nieto2011-06-161-1/+11
| | | | | | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | fileops: Cast the GetProcAddress valueVicent Marti2011-06-171-3/+4
| |
* | fileops: Fix 'GetFinalPathNameByHandleA' in old platformsVicent Marti2011-06-171-1/+17
| |
* | Simplify loose ref writingCarlos Martín Nieto2011-06-161-26/+8
|/ | | | | | | | | | There is no need to store the format outselves, as the library provides git_filebuf_printf which takes care of the formatting itself. Also get rid of an use of strcat + strcpy which is always a nice thing. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* oid: Uniformize ncmp methodsVicent Marti2011-06-164-46/+27
| | | | Drop redundant methods. The ncmp method is now public
* oid: Rename methodsVicent Marti2011-06-167-14/+14
| | | | | Yeah. Finally. Fuck the old names, this ain't POSIX and they don't make any sense at all.
* refs: Rename git_referece_listcb to _foreachVicent Marti2011-06-162-4/+4
| | | | Same name as `git_config_foreach`
* Merge pull request #248 from carlosmn/configVicent Martí2011-06-151-7/+207
|\ | | | | Implement config writing
| * Indent config variables with tagsCarlos Martín Nieto2011-06-141-2/+2
| | | | | | | | | | | | | | Confg variables are indended using tags and not four spaces as was being done by the code. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
| * config: implement config writingCarlos Martín Nieto2011-06-081-1/+172
| | | | | | | | | | | | | | | | | | | | | | | | After each variable gets set, we store it in our list (not completely in the right position, but the close enough). Then we write out the new config file in the same way that git.git does it (keep the rest of the file intact and insert or replace the variable in its line). Overwriting variables and adding new ones is supported (even on new sections), though deleting isn't yet. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
| * config: store new variables with the internal representation of the sectionCarlos Martín Nieto2011-06-081-1/+34
| | | | | | | | | | | | | | | | The section name should be stored in its case-sensitive variant when we are adding a new variable. Use the internalize_section function to do just that. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
| * Remove an unfortunate optimisation from cvar_match_sectionCarlos Martín Nieto2011-06-081-5/+1
| | | | | | | | | | | | | | | | | | | | The (rather late) early-exit code, which provides a negligible optimisation causes cvar_match_section to return false negatives when it's called with a section name instead of a full variable name. Remove this optimisation. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | Add method to get the compiled version of the libVicent Marti2011-06-161-0/+8
| |
* | Merge pull request #261 from Romain-Geissler/discovery-path-v2Vicent Martí2011-06-152-8/+2
|\ \ | | | | | | Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
| * | Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.Romain Geissler2011-06-152-8/+2
| | | | | | | | | | | | | | | GIT_PATH_LIST_SEPARATOR and GIT_PATH_MAX are made public so that it's can be used by a client.
* | | Merge pull request #251 from nulltoken/fix/msvc-warningsVicent Martí2011-06-152-3/+4
|\ \ \ | | | | | | | | Fix compilation warnings in MSVC
| * | | Add mode_t definition in MSVC compat layernulltoken2011-06-152-1/+3
| | | |
| * | | Fix compilation warnings in MSVCnulltoken2011-06-122-4/+3
| | | |
* | | | Merge pull request #260 from nulltoken/fix/git_index_addVicent Martí2011-06-152-3/+3
|\ \ \ \ | | | | | | | | | | Fix git_index_add()
| * | | | blob: Fix git_blob_create_fromfile()nulltoken2011-06-152-3/+3
| |/ / /
* | | | fix gid_ misspellingScott Chacon2011-06-141-1/+1
| | | |
* | | | Remove custom backendsVicent Marti2011-06-142-513/+0
| | | | | | | | | | | | | | | | | | | | All the custom backend code will be moved to a separate project, together with the new MySQL backend.
* | | | Remove uneeded arpa/inet.h includeCarlos Martín Nieto2011-06-141-1/+0
|/ / / | | | | | | | | | | | | | | | | | | This header isn't needed at all and it shows a lot of warnings on OpenBSD. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | | Add missing function declarations to avoid MSVC compiler warningsSebastian Schuberth2011-06-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The better solution would probably be to turn the gitfo_lstat / gitfo_readlink macros into real functions that wrap either lstat or gitfo_lstat__w32 (and readlink or gitfo_readlink__w32). However, that would introduce an indirection unless inlined. For now, this is the less intrusive change.
* | | Use "__inline" instead of "inline" with MSVCSebastian Schuberth2011-06-101-1/+1
| | | | | | | | | | | | MSVC supports "inline" only in C++ code, not in C code.
* | | Prefer to use file mode defines instead of raw numbersSebastian Schuberth2011-06-101-2/+2
| | |
* | | Prefer to use S_IFLNK instead of _S_IFLNK for consistencySebastian Schuberth2011-06-101-1/+1
| | |
* | | Add some missing MSVC compatibility definesSebastian Schuberth2011-06-101-2/+5
| | |
* | | Merge pull request #216 from glesserd/developmentVicent Martí2011-06-081-34/+87
|\ \ \ | | | | | | | | git_tag_create{,_o,_frombuffer} correction and improvement
| * | | Fix the error pointed out by tanoku.David Glesser2011-06-071-3/+3
| | | | | | | | | | | | | | | | Now the code shoulb be c89.
| * | | Modify git_tag_create_frombuffer: the buffer is not modified whenDavid Glesser2011-05-311-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | writen to the odb libgit2 has now the same behaviour of git when adding a tag with a buffer.
| * | | Modify create_tag : verifications are now done in an another functionDavid Glesser2011-05-311-26/+48
| | | | | | | | | | | | | | | | | | | | This commit create a function called tag_valid_in_odb which validate a tag before its creation. This function will be needed by my next commit.
| * | | Set the oid when a tag already exists.David Glesser2011-05-301-1/+3
| | | | | | | | | | | | | | | | | | | | When a tag already exists, it can be useful to directly have the oid of the existed tag, just after trying to add it.
| * | | Add an error message when a tag already exists.David Glesser2011-05-301-2/+2
| | | | | | | | | | | | | | | | Before this commit, no message is shown when doing a git_lasterror().
* | | | Merge pull request #250 from pegonma/commit_short_messageVicent Martí2011-06-081-4/+11
|\ \ \ \ | | | | | | | | | | Commit short message should be the same as git's
| * | | | Changed commit short messages so that they match git log --oneline output.Marc Pegon2011-06-081-4/+11
| | | | | | | | | | | | | | | | | | | | In git, the short message of a commit is the part of the commit message before 2 consecutive line breaks. In the short message, line breaks are replaced by space characters.
* | | | | windows: Fix Symlink issuesVicent Marti2011-06-085-16/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle Symlinks if they can be handled in Win32. This is not even compiled. Needs review. The lstat implementation is modified from core Git. The readlink implementation is modified from PHP.
* | | | | Merge pull request #246 from carlosmn/keep-lockVicent Martí2011-06-081-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | Keep the lockfile if we fail to lock it
| * | | | filebuf cleanup: only unlink lockfile if we've opened itCarlos Martín Nieto2011-06-071-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Add a check for the file descriptor in git_filebuf_cleanup. Without it, an existing lockfile would be deleted if we tried to acquire it (but failed, as the lockfile already existed). Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | | | Merge pull request #243 from jpfender/symlinks2Vicent Martí2011-06-074-13/+48
|\ \ \ \ | | | | | | | | | | Symlinks NEW
| * | | | Export gitfo_shallow_existsJakob Pfender2011-06-071-0/+1
| | | | |