]> git.proxmox.com Git - libgit2.git/log
libgit2.git
11 years agoerrors: deploy GIT_EORPHANEDHEAD usage
nulltoken [Fri, 19 Oct 2012 15:07:39 +0000 (17:07 +0200)]
errors: deploy GIT_EORPHANEDHEAD usage

11 years agoerrors: introduce GIT_EORPHANEDHEAD
nulltoken [Fri, 19 Oct 2012 09:04:32 +0000 (11:04 +0200)]
errors: introduce GIT_EORPHANEDHEAD

11 years agobranch: allow deletion of branch when HEAD's missing
nulltoken [Fri, 19 Oct 2012 18:34:33 +0000 (20:34 +0200)]
branch: allow deletion of branch when HEAD's missing

11 years agotests: Fix unused variable warning
nulltoken [Fri, 19 Oct 2012 10:03:48 +0000 (12:03 +0200)]
tests: Fix unused variable warning

11 years agorefs: cover more refname validity edge cases
nulltoken [Thu, 18 Oct 2012 21:59:22 +0000 (23:59 +0200)]
refs: cover more refname validity edge cases

11 years agostatus: querying a bare repo returns EBAREREPO
nulltoken [Thu, 18 Oct 2012 14:52:19 +0000 (16:52 +0200)]
status: querying a bare repo returns EBAREREPO

11 years agodiff: workdir diffing in a bare repo returns EBAREREPO
nulltoken [Thu, 18 Oct 2012 14:50:55 +0000 (16:50 +0200)]
diff: workdir diffing in a bare repo returns EBAREREPO

11 years agoMerge pull request #993 from pwkelley/clar_update
Vicent Martí [Thu, 18 Oct 2012 21:15:37 +0000 (14:15 -0700)]
Merge pull request #993 from pwkelley/clar_update

Update clar and add reliable rename for Win32

11 years agoMerge pull request #995 from nulltoken/fix/issue_994
Vicent Martí [Thu, 18 Oct 2012 21:14:37 +0000 (14:14 -0700)]
Merge pull request #995 from nulltoken/fix/issue_994

revparse: properly handle refnames containing a @

11 years agorevparse: properly handle refnames containing a @
nulltoken [Thu, 18 Oct 2012 20:25:27 +0000 (22:25 +0200)]
revparse: properly handle refnames containing a @

Fix #994

11 years agoUpdate clar and add reliable rename for Win32
Philip Kelley [Thu, 18 Oct 2012 18:50:17 +0000 (14:50 -0400)]
Update clar and add reliable rename for Win32

11 years agofetch: declare variables at the top of the block
Carlos Martín Nieto [Thu, 18 Oct 2012 17:05:24 +0000 (19:05 +0200)]
fetch: declare variables at the top of the block

11 years agoMerge pull request #992 from carlosmn/fetch-cancel
Vicent Martí [Thu, 18 Oct 2012 16:52:13 +0000 (09:52 -0700)]
Merge pull request #992 from carlosmn/fetch-cancel

remote: support fetch cancelation

11 years agoremote: support fetch cancelation
Carlos Martín Nieto [Thu, 18 Oct 2012 02:31:03 +0000 (04:31 +0200)]
remote: support fetch cancelation

Introduce git_remote_stop() which sets a variable that is checked by
the fetch process in a few key places. If this is variable is set, the
fetch is aborted.

11 years agoMerge pull request #968 from arrbee/diff-support-typechange
Russell Belfer [Wed, 17 Oct 2012 21:14:51 +0000 (14:14 -0700)]
Merge pull request #968 from arrbee/diff-support-typechange

Support TYPECHANGE records in status and adjust checkout accordingly

11 years agoFix minor bugs
Russell Belfer [Wed, 17 Oct 2012 21:10:23 +0000 (14:10 -0700)]
Fix minor bugs

Fixed no-submodule speedup of new checkout code.  Fixed missing
final update to progress (which may go away, I realize).  Fixed
unused structure in header and incorrect comment.

11 years agoMerge pull request #972 from PaulThompson/separate_strarray
Ben Straub [Wed, 17 Oct 2012 18:55:26 +0000 (11:55 -0700)]
Merge pull request #972 from PaulThompson/separate_strarray

Separated git_strarray from common.h.  Added doxy comments.

11 years agoSkip submodule checkout pass if no submodules
Russell Belfer [Wed, 17 Oct 2012 17:44:38 +0000 (10:44 -0700)]
Skip submodule checkout pass if no submodules

Skip the third pass of checkout (where submodules are checked out)
if the earlier passes found no submodules to be checked out.

11 years agoMerge pull request #988 from pwkelley/pack-objects
Philip Kelley [Wed, 17 Oct 2012 16:14:42 +0000 (09:14 -0700)]
Merge pull request #988 from pwkelley/pack-objects

Incremental improvements to pack-objects logic

11 years agoIncremental improvements to pack-objects logic
Philip Kelley [Tue, 16 Oct 2012 20:18:21 +0000 (16:18 -0400)]
Incremental improvements to pack-objects logic
Incorporate feedback for incr. improvements to pack-objects

11 years agoFix -Wunused-but-set-variable warning
Michael Schubert [Tue, 16 Oct 2012 21:42:01 +0000 (23:42 +0200)]
Fix -Wunused-but-set-variable warning

11 years agoMerge pull request #987 from pwkelley/pthread_cond
Vicent Martí [Tue, 16 Oct 2012 17:54:30 +0000 (10:54 -0700)]
Merge pull request #987 from pwkelley/pthread_cond

Support pthread_cond_* on Win32

11 years agotest: Don't be so picky with failed lookups
Vicent Marti [Tue, 16 Oct 2012 17:34:29 +0000 (19:34 +0200)]
test: Don't be so picky with failed lookups

Not found means not found, and the other way around.

11 years agoSupport pthread_cond_* on Win32
Philip Kelley [Tue, 16 Oct 2012 17:18:45 +0000 (13:18 -0400)]
Support pthread_cond_* on Win32

11 years agoconfig: also free the XDG buffer
Carlos Martín Nieto [Tue, 16 Oct 2012 15:58:19 +0000 (17:58 +0200)]
config: also free the XDG buffer

11 years agoMerge pull request #952 from csware/config-locations
Vicent Martí [Tue, 16 Oct 2012 15:36:55 +0000 (08:36 -0700)]
Merge pull request #952 from csware/config-locations

Config location fixes

11 years agoMerge pull request #984 from arrbee/fix-fnmatch-and-ignore
Philip Kelley [Tue, 16 Oct 2012 15:34:28 +0000 (08:34 -0700)]
Merge pull request #984 from arrbee/fix-fnmatch-and-ignore

Fix single file ignores

11 years agoMerge pull request #985 from nulltoken/fix/leaks
Philip Kelley [Mon, 15 Oct 2012 22:58:53 +0000 (15:58 -0700)]
Merge pull request #985 from nulltoken/fix/leaks

test: fix some memory leaks

11 years agotest: fix some memory leaks
nulltoken [Mon, 15 Oct 2012 22:49:05 +0000 (00:49 +0200)]
test: fix some memory leaks

11 years agoMerge pull request #982 from nulltoken/clone/no-checkout
Ben Straub [Mon, 15 Oct 2012 22:24:50 +0000 (15:24 -0700)]
Merge pull request #982 from nulltoken/clone/no-checkout

clone: Explicit support of no-checkout option

11 years agoFix single-file ignore checks
Russell Belfer [Mon, 15 Oct 2012 19:48:43 +0000 (12:48 -0700)]
Fix single-file ignore checks

To answer if a single given file should be ignored, the path to
that file has to be processed progressively checking that there
are no intermediate ignored directories in getting to the file
in question.  This enables that, fixing the broken old behavior,
and adds tests to exercise various ignore situations.

11 years agoImport DOS fix for fnmatch
Russell Belfer [Thu, 11 Oct 2012 20:39:53 +0000 (13:39 -0700)]
Import DOS fix for fnmatch

Because fnmatch uses recursion, there were some input sequences
that cause seriously degenerate behavior.  This imports a fix
that imposes a max recursion limiter to avoid the worst of it.

11 years agoAlways use internal fnmatch, not system
Russell Belfer [Thu, 11 Oct 2012 18:58:00 +0000 (11:58 -0700)]
Always use internal fnmatch, not system

11 years agoMerge pull request #978 from nulltoken/fix/reset-hard
Ben Straub [Mon, 15 Oct 2012 19:02:20 +0000 (12:02 -0700)]
Merge pull request #978 from nulltoken/fix/reset-hard

reset: prevent hard reset in a bare repository

11 years agotest: fix some memory leaks
nulltoken [Sat, 13 Oct 2012 19:00:45 +0000 (21:00 +0200)]
test: fix some memory leaks

11 years agoreset: prevent hard reset in a bare repository
nulltoken [Sat, 13 Oct 2012 18:51:57 +0000 (20:51 +0200)]
reset: prevent hard reset in a bare repository

11 years agoclone: fix detection of remote HEAD
nulltoken [Mon, 15 Oct 2012 05:06:22 +0000 (07:06 +0200)]
clone: fix detection of remote HEAD

11 years agoclone: Explicit support of no-checkout option
nulltoken [Mon, 15 Oct 2012 04:12:57 +0000 (06:12 +0200)]
clone: Explicit support of no-checkout option

11 years agoMerge pull request #969 from ben/network_category
Vicent Martí [Mon, 15 Oct 2012 17:56:47 +0000 (10:56 -0700)]
Merge pull request #969 from ben/network_category

Test category for live network tests

11 years agoClone: use libgit2's test repos
Ben Straub [Wed, 10 Oct 2012 22:10:07 +0000 (15:10 -0700)]
Clone: use libgit2's test repos

11 years agoTests: add "network" category
Ben Straub [Wed, 10 Oct 2012 17:34:26 +0000 (10:34 -0700)]
Tests: add "network" category

Split the clone tests into network and no-network suites.

11 years agoFix leak in the tests
Carlos Martín Nieto [Mon, 15 Oct 2012 14:35:10 +0000 (16:35 +0200)]
Fix leak in the tests

Also introduce the slective ref trimming promised but also missed in
the previous commit.

11 years agorefs: loosen the OID parsing
Carlos Martín Nieto [Mon, 15 Oct 2012 11:51:25 +0000 (13:51 +0200)]
refs: loosen the OID parsing

We used to require loose references to contain only an OID (possibly
after trimming the string). This is however not enough for letting us
lookup FETCH_HEAD, which can have a lot of content after the initial
OID.

Change the parsing rules so that a loose refernce must e at least 40
bytes long and the 41st (if it's there) must be accepted by
isspace(3). This makes the trim unnecessary, so only do it for
symrefs. This fixes #977.

11 years agoFix buffer overrun in git_buf_put_base64
Philip Kelley [Sun, 14 Oct 2012 16:29:05 +0000 (12:29 -0400)]
Fix buffer overrun in git_buf_put_base64

11 years agoMerge pull request #974 from nulltoken/EEXISTS
Ben Straub [Thu, 11 Oct 2012 22:45:26 +0000 (15:45 -0700)]
Merge pull request #974 from nulltoken/EEXISTS

 Enforce returning of EEXISTS when trying to overwrite a reference

11 years agoMerge pull request #973 from AndrejMitrovic/DBinding
Vicent Martí [Thu, 11 Oct 2012 16:25:15 +0000 (09:25 -0700)]
Merge pull request #973 from AndrejMitrovic/DBinding

Add link to D libgit2 bindings.

11 years agoAdd link to D libgit2 bindings.
Andrej Mitrovic [Thu, 11 Oct 2012 16:22:00 +0000 (18:22 +0200)]
Add link to D libgit2 bindings.

11 years agotags: cover EEXISTS propagation upon creation
nulltoken [Thu, 11 Oct 2012 12:15:40 +0000 (14:15 +0200)]
tags: cover EEXISTS propagation upon creation

11 years agobranches: cover EEXISTS propagation upon moving
nulltoken [Thu, 11 Oct 2012 12:09:27 +0000 (14:09 +0200)]
branches: cover EEXISTS propagation upon moving

11 years agobranches: propagate EEXISTS upon creation
nulltoken [Thu, 11 Oct 2012 12:08:32 +0000 (14:08 +0200)]
branches: propagate EEXISTS upon creation

11 years agoSeparated git_strarray from common.h. Added doxy comments.
Paul Thompson [Thu, 11 Oct 2012 12:04:08 +0000 (23:04 +1100)]
Separated git_strarray from common.h.  Added doxy comments.

11 years agorefs: propagate EEXISTS upon renaming
nulltoken [Thu, 11 Oct 2012 12:00:26 +0000 (14:00 +0200)]
refs: propagate EEXISTS upon renaming

11 years agotests: add a test for tag autofollow behaviour
Carlos Martín Nieto [Wed, 10 Oct 2012 12:57:05 +0000 (14:57 +0200)]
tests: add a test for tag autofollow behaviour

Also tell ctest and valgrind to run libgit2_clar with '-iall' so we
run the network tests in travis.

11 years agoMerge pull request #971 from arrbee/base64-encoder
Vicent Martí [Wed, 10 Oct 2012 22:00:32 +0000 (15:00 -0700)]
Merge pull request #971 from arrbee/base64-encoder

Add git_buf_put_base64 to buffer API

11 years agohttp: don't discard the HEAD ref
Carlos Martín Nieto [Wed, 10 Oct 2012 21:55:03 +0000 (23:55 +0200)]
http: don't discard the HEAD ref

The fix for fetching from empty repositories (22935b06d protocol:
don't store flushes; 2012-10-07) forgot to take into account the
deletion of the flush pkt in the HTTP transport. As a result, the HEAD
ref advertisement where we detect the remote's capabilities was
deleted instead. Fix this.

11 years agoAdd git_buf_put_base64 to buffer API
Russell Belfer [Wed, 10 Oct 2012 21:54:31 +0000 (14:54 -0700)]
Add git_buf_put_base64 to buffer API

11 years agoFix clar issue
Russell Belfer [Tue, 9 Oct 2012 22:25:58 +0000 (15:25 -0700)]
Fix clar issue

11 years agoUpdate to latest clar
Russell Belfer [Tue, 9 Oct 2012 22:13:00 +0000 (15:13 -0700)]
Update to latest clar

11 years agoMove enum comments next to actual values
Russell Belfer [Tue, 9 Oct 2012 21:35:24 +0000 (14:35 -0700)]
Move enum comments next to actual values

11 years agoMerge pull request #803 from schu/gsoc-pack-objects
Vicent Martí [Tue, 9 Oct 2012 20:34:40 +0000 (13:34 -0700)]
Merge pull request #803 from schu/gsoc-pack-objects

[GSoC] RFC: pack objects

11 years agofixup! gsoc-pack-objects WIP
Michael Schubert [Tue, 9 Oct 2012 19:49:48 +0000 (21:49 +0200)]
fixup! gsoc-pack-objects WIP

Use khash instead of git.git's hashing algorithm.

11 years agogsoc-pack-objects WIP
Michael Schubert [Sun, 19 Aug 2012 20:26:32 +0000 (22:26 +0200)]
gsoc-pack-objects WIP

11 years agoAdd diff-delta code from git.git
Michael Schubert [Sun, 19 Aug 2012 20:22:07 +0000 (22:22 +0200)]
Add diff-delta code from git.git

11 years agoindexer: do not require absolute path
Michael Schubert [Tue, 14 Aug 2012 21:07:54 +0000 (23:07 +0200)]
indexer: do not require absolute path

11 years agoEnable pthread condition vars
Michael Schubert [Wed, 1 Aug 2012 09:35:26 +0000 (11:35 +0200)]
Enable pthread condition vars

11 years agoAdd git_tag_foreach
Michael Schubert [Tue, 10 Jul 2012 06:53:05 +0000 (08:53 +0200)]
Add git_tag_foreach

11 years agogit_odb_object_free: don't segfault w/ arg == NULL
Michael Schubert [Sun, 1 Jul 2012 17:44:22 +0000 (19:44 +0200)]
git_odb_object_free: don't segfault w/ arg == NULL

11 years agoutil: add git__compress()
Michael Schubert [Sun, 10 Jun 2012 20:04:24 +0000 (22:04 +0200)]
util: add git__compress()

11 years agoAdd complex checkout test and then fix checkout
Russell Belfer [Fri, 5 Oct 2012 22:56:57 +0000 (15:56 -0700)]
Add complex checkout test and then fix checkout

This started as a complex new test for checkout going through the
"typechanges" test repository, but that revealed numerous issues
with checkout, including:

* complete failure with submodules
* failure to create blobs with exec bits
* problems when replacing a tree with a blob because the tree
  "example/" sorts after the blob "example" so the delete was
  being processed after the single file blob was created

This fixes most of those problems and includes a number of other
minor changes that made it easier to do that, including improving
the TYPECHANGE support in diff/status, etc.

11 years agoTest data with lots of type changes
Russell Belfer [Tue, 2 Oct 2012 23:13:17 +0000 (16:13 -0700)]
Test data with lots of type changes

11 years agoCleanup TYPECHANGE support
Russell Belfer [Tue, 2 Oct 2012 20:57:15 +0000 (13:57 -0700)]
Cleanup TYPECHANGE support

This is just some cleanup code, rearranging some of the checkout
code where TYPECHANGE support was added and adding some comments
to the diff header regarding the constants.

11 years agoFix checkout to know about TYPECHANGE diffs
Russell Belfer [Fri, 28 Sep 2012 21:32:33 +0000 (14:32 -0700)]
Fix checkout to know about TYPECHANGE diffs

11 years agoIntroduce status/diff TYPECHANGE flags
Russell Belfer [Fri, 28 Sep 2012 20:40:02 +0000 (13:40 -0700)]
Introduce status/diff TYPECHANGE flags

When I wrote the diff code, I based it on core git's diff output
which tends to split a type change into an add and a delete.  But
core git's status has the notion of a T (typechange) flag for a
file.  This introduces that into our status APIs and modifies the
diff code so it can be forced to not split type changes.

11 years agoImprove error propogation in checkout
Russell Belfer [Fri, 28 Sep 2012 20:39:34 +0000 (13:39 -0700)]
Improve error propogation in checkout

11 years agoMerge pull request #967 from arrbee/diff-submodule-tests-and-fixes
Vicent Martí [Tue, 9 Oct 2012 18:45:50 +0000 (11:45 -0700)]
Merge pull request #967 from arrbee/diff-submodule-tests-and-fixes

Diff submodule tests and fixes

11 years agoFix compiler warnings
Michael Schubert [Mon, 8 Oct 2012 22:51:43 +0000 (00:51 +0200)]
Fix compiler warnings

* tests-clar/status: remove an unused variable
* clone: fix -Wmaybe-uninitialized warning

11 years agoMerge pull request #949 from nulltoken/topic/deploy_repository_set_head
Ben Straub [Mon, 8 Oct 2012 22:25:44 +0000 (15:25 -0700)]
Merge pull request #949 from nulltoken/topic/deploy_repository_set_head

Deploy git_repository_set_head()

11 years agoAdd test for diffs with submodules and bug fixes
Russell Belfer [Mon, 8 Oct 2012 22:19:00 +0000 (15:19 -0700)]
Add test for diffs with submodules and bug fixes

The adds a test for the submodule diff capabilities and then
fixes a few bugs with how the output is generated.  It improves
the accuracy of OIDs in the diff delta object and makes the
submodule output more closely mirror the OIDs that will be used
by core git.

11 years agoExtend diff helpers for tests a little
Russell Belfer [Mon, 8 Oct 2012 22:18:30 +0000 (15:18 -0700)]
Extend diff helpers for tests a little

11 years agoFix a few diff bugs with directory content
Russell Belfer [Mon, 8 Oct 2012 22:14:12 +0000 (15:14 -0700)]
Fix a few diff bugs with directory content

There are a few cases where diff should leave directories in
the diff list if we want to match core git, such as when the
directory contains a .git dir.  That feature was lost when I
introduced some of the new submodule handling.

This restores that and then fixes a couple of related to diff
output that are triggered by having diffs with directories in
them.

Also, this adds a new flag that can be passed to diff if you
want diff output to actually include the file content of any
untracked files.

11 years agoMerge pull request #940 from scunz/diff_sm
Russell Belfer [Mon, 8 Oct 2012 22:21:47 +0000 (15:21 -0700)]
Merge pull request #940 from scunz/diff_sm

Diff: Show submodule diff

11 years agoMerge pull request #966 from pwkelley/icasefix
Russell Belfer [Mon, 8 Oct 2012 21:53:37 +0000 (14:53 -0700)]
Merge pull request #966 from pwkelley/icasefix

Fix a bug where ignorecase wasn't applied to ignores

11 years agoFix a bug where ignorecase wasn't applied to ignores
Philip Kelley [Mon, 8 Oct 2012 20:32:43 +0000 (16:32 -0400)]
Fix a bug where ignorecase wasn't applied to ignores

11 years agoclone: fix cloning of empty repository
nulltoken [Sun, 7 Oct 2012 10:50:18 +0000 (12:50 +0200)]
clone: fix cloning of empty repository

11 years agoclone: reorganize tests
nulltoken [Sun, 7 Oct 2012 10:04:07 +0000 (12:04 +0200)]
clone: reorganize tests

11 years agoclone: leverage refspec transform
nulltoken [Wed, 26 Sep 2012 17:22:21 +0000 (19:22 +0200)]
clone: leverage refspec transform

11 years agorefspec: introduce git_refspec_transform_l()
nulltoken [Wed, 26 Sep 2012 17:15:11 +0000 (19:15 +0200)]
refspec: introduce git_refspec_transform_l()

11 years agoclone: align type casing with convention
nulltoken [Wed, 26 Sep 2012 09:05:12 +0000 (11:05 +0200)]
clone: align type casing with convention

11 years agobranch: deploy git_branch_is_head()
nulltoken [Sat, 6 Oct 2012 10:20:13 +0000 (12:20 +0200)]
branch: deploy git_branch_is_head()

11 years agobranch: introduce git_branch_is_head()
nulltoken [Sat, 6 Oct 2012 08:41:53 +0000 (10:41 +0200)]
branch: introduce git_branch_is_head()

11 years agorefs: deploy git_repository_set_head() usage
nulltoken [Sat, 22 Sep 2012 10:51:34 +0000 (12:51 +0200)]
refs: deploy git_repository_set_head() usage

11 years agoclone: deploy git_repository_set_head() usage
nulltoken [Sat, 22 Sep 2012 10:50:18 +0000 (12:50 +0200)]
clone: deploy git_repository_set_head() usage

11 years agoreset: make reset rely on git_repository_head()
nulltoken [Sat, 22 Sep 2012 10:47:17 +0000 (12:47 +0200)]
reset: make reset rely on git_repository_head()

11 years agobranch: enhance branch moving test coverage
nulltoken [Sat, 22 Sep 2012 10:42:16 +0000 (12:42 +0200)]
branch: enhance branch moving test coverage

11 years agoremote: use constants for well-known names
nulltoken [Sun, 7 Oct 2012 19:00:46 +0000 (21:00 +0200)]
remote: use constants for well-known names

11 years agorefs: use constants for well-known names
nulltoken [Fri, 21 Sep 2012 08:28:20 +0000 (10:28 +0200)]
refs: use constants for well-known names

11 years agoremote: only keep a weak pointer in update_tips
Carlos Martín Nieto [Sun, 7 Oct 2012 09:19:19 +0000 (11:19 +0200)]
remote: only keep a weak pointer in update_tips

The reference is only needed inside the function. We mistakenly
increased the reference counter causing the ODB not to get freed and
leaking descriptors.

11 years agoprotocol: don't store flushes
Carlos Martín Nieto [Sun, 7 Oct 2012 08:20:23 +0000 (10:20 +0200)]
protocol: don't store flushes

Storing flushes in the refs vector doesn't let us recognize when the
remote is empty, as we'd always introduce at least one element into
it. These flushes aren't necessary, so we can simply ignore them.

11 years agoDiff: Do not try to calculate an oid for a GITLINK.
Sascha Cunz [Fri, 5 Oct 2012 11:44:18 +0000 (13:44 +0200)]
Diff: Do not try to calculate an oid for a GITLINK.

We don't have anything useful that we could do with that oid anyway (We
need to query the submodule for the HEAD commit instead).

Without this, the following code creates the error "Failed to read
descriptor: Is a directory" when run against the submod2 test-case:

    const char* oidstr = "873585b94bdeabccea991ea5e3ec1a277895b698";
    git_tree* tree = resolve_commit_oid_to_tree(g_repo, oidstr);
    git_diff_list* diff = NULL;
    cl_assert(tree);
    cl_git_pass(git_diff_workdir_to_tree(g_repo, NULL, tree, &diff));

11 years agoExtract submodule logic out of diff_output.c:get_workdir_content
Sascha Cunz [Fri, 5 Oct 2012 11:03:22 +0000 (13:03 +0200)]
Extract submodule logic out of diff_output.c:get_workdir_content