| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Consistency is good.
|
|\
| |
| | |
Profiling with scottg
|
| | |
|
| |
| |
| |
| |
| | |
This fixes a warning left by the earlier optimization and
addresses one of the other hotspots identified by GProf.
|
| |
| |
| |
| |
| |
| |
| |
| | |
GProf shows `git_text_gather_stats` as the most expensive call
in large diffs. The function calculates a lot of information
that is not actually used and does not do so in a optimal
order. This introduces a tuned `git_buf_is_binary` function
that executes the same algorithm in a fraction of the time.
|
|/
|
|
|
|
|
| |
Creating a workdir iterator on a directory with absolutely
no files was returning an error (GIT_ENOTFOUND) instead of
an iterator for nothing. This fixes that and includes two
new tests that cover that case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a bug where tracked files inside directories that were
inside ignored directories where not being found by status. To
make that a little clearer, if you have a .gitignore with:
ignore/
And then have the following files:
ignore/dir/tracked <-- actually a tracked file
ignore/dir/untracked <-- should be ignored
Then we would show the tracked file as being removed (because
when we got the to contained item "dir/" inside the ignored
directory, we decided it was safe to skip -- bzzt, wrong!).
This update is much more careful about checking that we are
not skipping over any prefix of a tracked item, regardless of
whether it is ignored or not.
As documented in diff.c, this commit does create behavior that
still differs from core git with regards to the handling of
untracked files contained inside ignored directories. With
libgit2, those files will just not show up in status or diff.
With core git, those files don't show up in status or diff
either *unless* they are explicitly ignored by a .gitignore
pattern in which case they show up as ignored files.
Needless to say, this is a local behavior difference only, so
it should not be important and (to me) the libgit2 behavior
seems more consistent.
|
|
|
|
| |
binding perspective
|
| |
|
|
|
|
| |
These are deprecated and replaced with the diffing code in git2/diff.h
|
|\
| |
| | |
really reset walker with git_revwalk_reset
|
| |
| |
| |
| |
| |
| |
| |
| | |
From the description of git_revwalk_reset in revwalk.h the function should
clear all pushed and hidden commits, and leave the walker in a blank state (just like at creation).
Apparently everything gets reseted appart of pushed commits (walk->one and walk->twos)
This fix should reset the walker properly.
|
|\ \
| | |
| | | |
Update git_status_file and add ranged iterators
|
| | |
| | |
| | |
| | |
| | | |
This function fills in a git_buf with the common prefix of
an array of strings, but let's make that a little more clear.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The goal of this work is to rewrite git_status_file to use the
same underlying code as git_status_foreach.
This is done in 3 phases:
1. Extend iterators to allow ranged iteration with start and
end prefixes for the range of file names to be covered.
2. Improve diff so that when there is a pathspec and there is
a common non-wildcard prefix of the pathspec, it will use
ranged iterators to minimize excess iteration.
3. Rewrite git_status_file to call git_status_foreach_ext
with a pathspec that covers just the one file being checked.
Since ranged iterators underlie the status & diff implementation,
this is actually fairly efficient. The workdir iterator does
end up loading the contents of all the directories down to the
single file, which should ideally be avoided, but it is pretty
good.
|
| | |
| | |
| | |
| | |
| | | |
Error out in finalize if there is junk after the packfile hash or we
couldn't process all the objects.
|
|/ / |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist
|
| |/
| |
| |
| | |
doesn't exist
|
|\ \
| | |
| | | |
See issue https://github.com/libgit2/libgit2/issues/680
|
| |/ |
|
|\ \
| | |
| | | |
Add git_blob_create_fromdisk()
|
| |/
| |
| |
| | |
This function will create blobs in the object database from files anywhere on the filesystem. This can be run against bare and non-bare repositories.
|
|\ \
| | |
| | | |
Fix build/runtime issues on Solaris
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On Solaris, struct dirent is defined differently than Linux. The field
containing the path name is of size 0, rather than NAME_MAX. So, we need to
use a properly sized buffer on Solaris to avoid a stack overflow.
Also fix some DIR* leaks on cleanup.
|
| | |
| | |
| | |
| | |
| | | |
On Solaris, rmdir() throws EEXIST if the folder is not empty, so just add
one more case to check for that, alongside ENOTEMPTY.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since Solaris does not support some of the same flags as glibc fnmatch(),
we just use the implementation we have for Windows.
Now that it's no longer a windows-specific thing, I moved it into compat/
instead of win32/
|
|\ \ \
| | | |
| | | | |
Attribute cache buster
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes the git attributes and git ignores cache check
stat information before using the file contents from the
cache. For cached files from the index, it checks the SHA
of the file instead. This should reduce the need to ever
call `git_attr_cache_flush()` in most situations.
This commit also fixes the `git_status_should_ignore` API
to use the libgit2 standard parameter ordering.
|
| |/
|/|
| |
| | |
NULL iterator
|
|\ \
| | |
| | | |
Improve repo initialization to be more like git
|
| | | |
|
| |/
| |
| |
| |
| |
| | |
This adds a bunch of template files to the initialization for
hooks, info/exclude, and description. This makes our initialized
repo look more like core gits.
|
|/
|
|
|
|
|
|
|
| |
existing object by specifying an incorrect type
This fix complements cb0ce16bbe8efe2098ef9cfffcf158301b036565 and cover the following additional use cases
- retrieving an object which has been previously searched, found and cached
- retrieving an object through an non ambiguous abbreviated id
|
| |
|
|\
| |
| | |
util: Fix git__isspace() implementation
|
| |
| |
| |
| |
| |
| | |
The characters <space>, <form-feed>, <newline>, <carriage-return>, <tab>, and <vertical-tab> are part of the "space" definition.
cf. http://www.kernel.org/doc/man-pages/online/pages/man5/locale.5.html
|
| |
| |
| |
| |
| |
| |
| | |
These objects aren't considered as being advertised, so asking for
them will cause the remote end to close the connection. This makes the
checking in update_tips() unnecessary, because they don't get inserted
in the list.
|
| |
| |
| |
| |
| | |
Skip them for now. Eventually we might want to filter these out
earler.
|
|/
|
|
| |
Windows gets upset if we rename a file with an open descriptor.
|
|
|
|
| |
Locale-aware bullshit bitting my ass again yo
|
|\
| |
| | |
Add support for diffing index with no HEAD
|
| |
| |
| |
| |
| |
| |
| | |
When a repo is first created, there is no HEAD yet and attempting
to diff files in the index was showing nothing because a tree
iterator could not be constructed. This adds an "empty" iterator
and falls back on that when the head cannot be looked up.
|