- 07 Jun, 2011 17 commits
-
-
When calling gitfo_exists() on a symbolic link, sometimes we need to simply check whether the link exists and sometimes we need to check whether the file pointed to by the symlink exists. Introduce a new function gitfo_shallow_exists that only checks if the link exists and revert gitfo_exists to the original functionality of checking whether the file pointed to by the link exists.
Jakob Pfender committed -
This reverts commit df1c98ab6d6171ed63729195bd190b54b67fe530. As 8a27b6b reverts the exposition of struct stat to the external API, we do not need - indeed, do not want - struct stat to be in the outer include layer.
Jakob Pfender committed -
00582bc introduced a change that required the caller of git_blob_create_fromfile() to pass a struct stat with the stat information for the file. Several developers pointed out that this would make life hard for the bindings developers as struct stat isn't widely supported by other languages. Make git_blob_create_fromfile() stat the path itself, eliminating the need for the file to be stat'ed by the caller. This makes index_init_entry() more costly as the file will be stat'ed twice but makes life easier for everyone else.
Jakob Pfender committed -
00582bcb introduced a change to git_blob_create_fromfile() that required the caller to pass a stat struct. This means that we need to include stat.h higher in the hierarchy of includes.
Jakob Pfender committed -
The entry mode flags for an entry created from a path name were not correctly written if the entry was a symlink. The st_mode of a statted symlink is 0120777, however git requires the mode to read 0120000, because it does not care about permissions of symlinks. Introduce index_create_mode() that correctly writes the mode flags in the form expected by git.
Jakob Pfender committed -
gitfo_exists() used to error out if the given file was a symbolic link, due to access() returning an error code. This is not expected behaviour, as gitfo_exists() should only check whether the file itself exists, not its link target if it is a symbolic link. Fix this by calling gitfo_lstat() instead, which is just a wrapper for lstat(). Also fix the same error in index_init_entry().
Jakob Pfender committed -
In order to be able to write symlinks with git_blob_create_fromfile(), we need to check whether the file to be written is a symbolic link or not. Since the calling function of git_blob_create_fromfile() is likely to have stated the file before calling, we make it pass the stat. The reason for this is that writing symbolic link blobs is significantly different from writing ordinary files - we do not want to open the link destination but instead want to write the link itself, regardless of whether it exists or not. Previously, index_init_entry() used to error out if the file to be added was a symlink that pointed to a nonexistent file. Fix this behaviour to add the file regardless of whether it exists. This mimics git.git's behaviour.
Jakob Pfender committed -
This time for good.
Vicent Marti committed -
This commit uploaded an old broken test. Oops!
Vicent Marti committed -
Tree: Added a function that returns the type of a tree entry.
Vicent Martí committed -
Search objects of different types given OID prefix
Vicent Martí committed -
Better name for git_oid_match
Vicent Martí committed -
Fix build errors on MSVC
Vicent Martí committed -
[Tree | Index] API uniformisation
Vicent Martí committed -
reference_rename: respect all references v2
Vicent Martí committed -
Cleanup the thread-utils file. Do not define TLS if libgit2 is not threadsafe.
Vicent Marti committed -
[Discovery path] Fix and tests
Vicent Martí committed
-
- 06 Jun, 2011 5 commits
-
-
Romain Geissler committed
-
As suggested by carlosmn, git_oid_ncmp would probably be a better name than git_oid_match, for it does the same as git_oid_cmp but only up to a certain amount of hex digits.
Marc Pegon committed -
given an OID prefix.
Marc Pegon committed -
Romain Geissler committed
-
Repository: A little fix in error code. GIT_ENOTFOUND is returned when a gitfile is malformed and GIT_ENOTAREPO when the pointed dir is not a repo. Fixed tests so that it check the right error code.
Romain Geissler committed
-
- 05 Jun, 2011 9 commits
-
-
The filebuf was not being properly written after a flush. This should cut it now. Fixes #228
Vicent Marti committed -
Vicent Marti committed
-
Romain Geissler committed
-
Johan 't Hart committed
-
Feature Added: Search an unmerged entry by path (git_index_get_unmerged renamed to git_index_get_unmerged_bypath) or by index (git_index_get_unmerged_byindex).
Romain Geissler committed -
Romain Geissler committed
-
the error returned by the subsystem; clarify error message. Fix tiny typo. Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Add a new function reference_available() to check if a reference name actually is free and can be used. Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Signed-off-by: schu <schu-github@schulog.org>
schu committed
-
- 04 Jun, 2011 7 commits
-
-
Unfortunately, the across_fs flag can't be tested automaticly, as we can't create a temporary new filesystem.
Romain Geissler committed -
It used to discard the last directory if the path didn't have a trailing slash.
Romain Geissler committed -
Romain Geissler committed
-
Romain Geissler committed
-
Vicent Marti committed
-
Now the ceiling_dirs are compared with their symbolic free version (like base_path). The ceiling dirs check is now performed after getting the parent directory.
Romain Geissler committed -
Discovery path v2
Vicent Martí committed
-
- 03 Jun, 2011 2 commits
-
-
Repository: Added the git_repository_discover function that finds by itself the git directory that manage a given directory path.
Romain Geissler committed -
Repository: Splitted the repository destructor into a helper part (only free directories path) and the complete public destructor.
Romain Geissler committed
-