tests-clar/refs


Log

Author Commit Date CI Message
Ben Straub 8f4a8b09 2013-10-28T06:20:28 Merge pull request #1802 from libgit2/cmn/reflog-backend Make reflog part of refdb
Vicent Martí 2c2b0ebb 2013-10-11T09:47:05 Merge pull request #1562 from libgit2/cmn/refs-namespace-lookup Provide the user with a more useful error code when a looking up a reference which name points to a namepace
Carlos Martín Nieto 7c9f5bec 2013-08-17T07:11:31 futils: return GIT_ENOTFOUND when trying to read a directory This lets the reference code return not-found when the user asks to look up a reference when in fact they pass a namespace.
Russell Belfer 92dac975 2013-10-08T16:35:57 Make reference lookups apply precomposeunicode Before these changes, looking up a reference would return the same precomposed or decomposed form of the reference name that was used to look it up, so on MacOS which ignores the difference between the two, a single reference could be looked up either way and git_reference_name would return the form of the name that was used to look it up! This change makes lookup always return the precomposed name if core.precomposeunicode is set regardless of which version was used to look it up. The reference iterator was already returning the precomposed form from earlier work. This also updates the CMakeLists.txt rules for enabling iconv usage because the clar tests for this code were actually not being activated properly with the old version. Finally, this moves git_repository_reset_filesystem from include/ git2/repository.h to include/git2/sys/repository.h since it is not really a function that normal library users should have to think about very often.
Russell Belfer 14997dc5 2013-10-08T12:45:43 More filemode cleanups for FAT on MacOS This cleans up some additional issues. The main change is that on a filesystem that doesn't support mode bits, libgit2 will now create new blobs with GIT_FILEMODE_BLOB always instead of being at the mercy to the filesystem driver to report executable or not. This means that if "core.filemode" lies and claims that filemode is not supported, then we will ignore the executable bit from the filesystem. Previously we would have allowed it. This adds an option to the new git_repository_reset_filesystem to recurse through submodules if desired. There may be other types of APIs that would like a "recurse submodules" option, but this one is particularly useful. This also has a number of cleanups, etc., for related things including trying to give better error messages when problems come up from the filesystem. For example, the FAT filesystem driver on MacOS appears to return errno EINVAL if you attempt to write a filename with invalid UTF-8 in it. We try to capture that with a better error message now.
Carlos Martín Nieto d274deea 2013-08-20T11:12:34 reflog: add a convenience append function Provide a function that reads a reflog, performs an append and writes back to the backend in one call.
Carlos Martín Nieto b976f3c2 2013-08-19T13:01:49 reflog: move the reflog implementation into refdb_fs References and their logs are logically coupled, let's make it so in the code by moving the fs-based reflog implementation to live next to the fs-based refs one. As part of the change, make the function take names rather than references, as only the names are relevant when looking up and handling reflogs.
Carlos Martín Nieto 605da51a 2013-09-17T09:50:30 No such thing as an orphan branch Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
nulltoken 209f9b67 2013-09-08T18:25:17 odb: Teach loose backend to return EAMBIGUOUS
Vicent Martí dbecec37 2013-08-28T09:38:14 Merge pull request #1805 from libgit2/threading-packed-load Thread safety for the refdb_fs
Nikolai Vladimirov 504850cd 2013-08-25T15:59:50 refs: add git_reference_is_tag
Russell Belfer 44d65531 2013-08-19T16:03:15 Fix comment
Russell Belfer 0f0f5655 2013-08-19T10:42:48 Don't try to pack symbolic refs If there were symbolic refs among the loose refs then the code to create packed-refs would fail trying to parse the OID out of them (where Git just skips trying to pack them). This fixes it.
Ben Straub c0c51693 2013-08-06T21:05:03 Add long-file-name branch to test repo
nulltoken 80fd31fa 2013-07-13T13:30:23 revparse: Don't return a reference when asked for a git object Fix #1722
yorah 2ad7a4dc 2013-06-17T18:25:30 ref: free the last ref when cancelling git_branch_foreach() Also fixed an assert typo on nulltoken's HEAD
Russell Belfer 37f66e82 2013-06-12T15:21:21 Fix Windows warnings This fixes problems with missing function prototypes and 64-bit data issues on Windows.
Russell Belfer 114f5a6c 2013-06-10T10:10:39 Reorganize diff and add basic diff driver This is a significant reorganization of the diff code to break it into a set of more clearly distinct files and to document the new organization. Hopefully this will make the diff code easier to understand and to extend. This adds a new `git_diff_driver` object that looks of diff driver information from the attributes and the config so that things like function content in diff headers can be provided. The full driver spec is not implemented in the commit - this is focused on the reorganization of the code and putting the driver hooks in place. This also removes a few #includes from src/repository.h that were overbroad, but as a result required extra #includes in a variety of places since including src/repository.h no longer results in pulling in the whole world.
Vicent Martí 947fad4f 2013-06-03T09:28:58 Merge pull request #1624 from libgit2/vmg/full-ref-iterator Breaking RefDB changes
Vicent Martí 9afc5971 2013-05-31T03:09:38 Merge pull request #1559 from carlosmn/ref-shorthand Introduce git_reference_shorthand
Vicent Marti 56960b83 2013-05-28T20:47:55 Liike this
nulltoken f672cd2a 2013-05-10T20:15:57 revparse: Make revparse_ext() return git_reference from names as well
nulltoken e841c533 2013-05-09T16:42:39 revparse: Introduce git_revparse_ext() Expose a way to retrieve, along with the target git_object, the reference pointed at by some revparse expression (`@{<-n>}` or `<branchname>@{upstream}` syntax).
nulltoken 1fed6b07 2013-05-13T21:57:37 Fix trailing whitespaces
Russell Belfer 99d32707 2013-05-11T06:42:25 Fix refdb iteration early termination bug There was a problem found in the Rugged test suite where the refdb_fs_backend__next function could exit too early in some very specific hashing patterns for packed refs. This ports the Rugged test to libgit2 and then fixes the bug.
Edward Thomson b6cc559a 2013-05-11T02:42:49 Merge pull request #1385 from carlosmn/refs-iter Introduce a refs iterator
Carlos Martín Nieto 2b562c3a 2013-05-04T16:32:58 refs: remove the OID/SYMBOLIC filtering Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
Carlos Martín Nieto fb592a96 2013-05-04T15:54:57 Remove outdated test Selecting wether to list loose or packed references is not something we want to support anymore, so remove a test for this.
Carlos Martín Nieto 51fc5e89 2013-05-04T15:16:55 Make sure the ref iterator works in an repo without physical presence
Carlos Martín Nieto 4def7035 2013-03-02T19:31:03 refs: introduce an iterator This allows us to get a list of reference names in a loop instead of callbacks.
nulltoken 24988894 2013-05-10T12:02:17 Fix some memory leaks
Carlos Martín Nieto 4f2eb2b7 2013-05-08T02:28:47 Introduce git_reference_shorthand Generate a shorthand name out of the full refname.
Nikolai Vladimirov 3d42e9a3 2013-05-06T20:32:20 git_branch_set_upstream with local branches Currently git_branch_set_upstream when passed a local branch creates invalid configuration, for ex. if we setup branch 'tracking_master' to track local 'master' libgit2 generates the following config ``` [branch "track_master"] remote = . merge = .refs/heads/track_master ``` The merge value is invalid and calling git_branch_upstream on 'tracking_master' results in invalid reference error. It should do: ``` [branch "track_master"] remote = . merge = refs/heads/master ```
Vicent Martí 03c28d92 2013-05-06T06:45:53 Merge pull request #1526 from arrbee/cleanup-error-return-without-msg Make sure error messages are set for most error returns
Jeff King 7edb9071 2013-05-02T11:07:20 refdb_fs: do not require peeled packed refs to be tags Older versions of git would only write peeled entries for items under refs/tags/. Newer versions will write them for all refs, and we should be prepared to handle that.
Russell Belfer 3e199f42 2013-05-01T04:18:46 Set error message for branch functions There were a couple of places where an error was being returned from branch related code but no error message was being set.
Carlos Martín Nieto bc6374ea 2013-04-20T18:49:11 remote: allow querying for refspecs Introduce git_remote_{fetch,push}_refspecs() to get a list of refspecs from the remote and rename the refspec-adding functions to a less silly name. Use this instead of the vector index hacks in the tests.
Carlos Martín Nieto 4330ab26 2013-04-20T04:43:28 remote: handle multiple refspecs A remote can have a multitude of refspecs. Up to now our git_remote's have supported a single one for each fetch and push out of simplicity to get something working. Let the remotes and internal code know about multiple remotes and get the tests passing with them. Instead of setting a refspec, the external users can clear all and add refspecs. This should be enough for most uses, though we're still missing a querying function.
Edward Thomson 4e4eab52 2013-04-19T18:19:53 alloc doesn't take a refdb; git_refdb_free nicely in the tests
Vicent Marti cbda09d0 2013-04-15T23:40:46 git_revision -> git_revspec
Vicent Marti 36c2dfed 2013-04-15T23:32:40 Is this crazy?
Vicent Marti d064c747 2013-04-15T23:18:24 Merge remote-tracking branch 'ben/unified-revparse' into development
Ben Straub 299a224b 2013-04-15T12:00:04 Change git_revparse to output git_object pointers This will probably prevent many lookup/free operations in calling code.
Ben Straub 2ebc3c66 2013-04-15T11:57:24 Redeploy git_revparse_single.
Vicent Martí ea8bac37 2013-04-11T06:34:59 Merge pull request #1450 from carlosmn/branch-upstream Branch upstream configuration
Carlos Martín Nieto d59942c2 2013-03-30T04:27:42 branch: add more upstream configuration management Add functions to set and unset the upstream configuration to complement the getter we already have.
Ben Straub 1aa21fe3 2013-04-09T05:03:51 Deprecate git_revparse_single and _rangelike
Ben Straub 8480eef7 2013-03-11T20:27:16 Implement unified git_revparse
Vicent Marti 812e5aea 2013-04-07T07:23:08 test: Add missing NULLs
Vicent Marti d9ecaf8c 2013-04-07T07:22:38 Merge remote-tracking branch 'gnprice/revwalk' into development
Greg Price b208d900 2013-03-20T10:01:58 revparse: Parse range-like syntax Signed-off-by: Greg Price <price@mit.edu>
nulltoken 24cb87e2 2013-03-31T13:27:43 tag: Fix parsing when no tagger nor message
Carlos Martín Nieto 97016f29 2013-03-30T09:30:29 branch: refactor git_branch_remote_name Return the size we'd need to write to instead of simply an error. Split the function into two to be used later by the upstream configuration functions.
Carlos Martín Nieto a258d8e3 2013-03-30T03:39:19 branch: rename 'tracking' to 'upstream' The term 'tracking' is overloaded. Help distinguish what we mean by using 'upstream' for this part of the library.
Russell Belfer 55e0f53d 2013-03-14T15:09:29 Fix various build warnings This fixes various build warnings on Mac and Windows (64-bit).
Edward Thomson d00d5464 2013-03-01T15:37:33 immutable references and a pluggable ref database
Carlos Martín Nieto bb45c57f 2013-03-07T16:38:44 refs: explicitly catch leading slashes It's somewhat common to try to write "/refs/tags/something". There is no easy way to catch it during the main body of the function, as there is no way to distinguish whether it's a leading slash or a double slash somewhere in the middle. Catch this at the beginning so we don't trigger the assert in is_all_caps_and_underscore().
Russell Belfer 0d1b094b 2013-02-26T13:15:06 Fix portability issues on Windows The new tests were not taking core.filemode into account when testing file modes after repo initialization. Fixed that and some other Windows warnings that have crept in.
nulltoken bbc53e4f 2013-02-15T12:43:03 branch: refactor git_branch_remote_name() tests
nulltoken c1b5e8c4 2013-02-15T11:35:33 branch: Make git_branch_remote_name() cope with orphaned heads
nulltoken 2bca5b67 2013-02-07T23:44:18 remote: Introduce git_remote_is_valid_name() Fix libgit2/libgit2sharp#318
nulltoken 4d811c3b 2013-02-07T23:40:10 refs: No component of a refname can end with '.lock'
Russell Belfer 390a3c81 2013-02-11T11:44:00 Merge pull request #1190 from nulltoken/topic/reset-paths reset: Allow the selective reset of pathspecs
Philip Kelley e026cfee 2013-02-11T09:12:39 Merge pull request #1323 from jamill/resolve_remote Resolve a remote branch's remote
Jameson Miller 2e3e8c88 2013-02-08T11:05:47 Teach remote branch to return its remote
Scott J. Goldman 6ce61a0b 2013-02-08T14:25:41 tests: fix whitespace in refs/rename.c
nulltoken 3ad05221 2013-02-05T16:52:56 Fix MSVC compilation warnings Fix #1308
nulltoken 0e8e5a61 2013-02-03T11:44:26 revparse: Lookup sha before branch
nulltoken 545b479a 2013-02-02T17:36:20 revparse: Lookup branch before described tag Fix #1306
Carlos Martín Nieto e5ef0f18 2013-01-31T20:23:30 refs: handle ALLOW_ONELEVEL normalization with leading slash A leading slash confuses the name normalization code when the flags include ALLOW_ONELEVEL. Catch this case in particular to avoid triggering an assertion in the uppercase check which expects us not to pass it an empty string. The existing tests don't catch this as they simply use the NORMAL flag. This fixes #1300.
Sebastian Bauer a7f8065f 2013-01-25T06:48:55 Use cl_assert_equal_s() instead of strcmp(). Replaced all cl_assert(!strcmp()) or semantically equivalent forms by cl_assert_equal_s().
Sebastian Bauer c253056d 2013-01-24T20:44:17 Added git_branch_name(). This is a convenience function to get the branch name of a given ref. The returned branch name is compatible with the name that can be supplied e.g. to git_branch_lookup(). That is, the prefixes "refs/heads" or "refs/remotes" are omitted. Also added a new test for testing the new function.
Scott J. Goldman 5c7b77c4 2013-01-22T16:01:03 Seperate out a new test that verifies packed-refs with no trailing newline as per @vmg's request
nulltoken bf031581 2013-01-14T14:22:11 branch: Introduce git_branch_tracking_name()
Martin Woodward ba1a430a 2013-01-04T17:29:45 Add jGit license block to derrived tests Add the jGit license block to tests derrived from jGit as per the terms of the BSD license.
Ben Straub 72629a10 2012-12-10T10:05:31 Clean up GCC build warnings
Vicent Martí e05ca13f 2012-12-05T11:47:19 Merge pull request #1115 from ben/struct-versions Version info for public structs
nulltoken cc146626 2012-11-19T19:00:46 revparse: Deploy EINVALIDSPEC usage
nulltoken 84166fac 2012-11-18T14:20:35 revparse: remove timezone setup in tests
nulltoken bc05f30c 2012-11-19T18:49:25 object: refine git_object_peel() error report
nulltoken 62173038 2012-11-12T20:47:32 branch: Deploy EINVALIDSPEC usage
nulltoken 80212ecb 2012-11-12T16:49:29 reflog: Deploy EINVALIDSPEC usage
nulltoken e4aa7f58 2012-11-12T17:25:55 refs: cover git_reference_name_to_oid() unfound behavior
nulltoken 80d9d1df 2012-11-12T15:42:15 refs: Deploy EINVALIDSPEC usage
nulltoken 47261d9c 2012-11-12T14:19:37 tests: drop unused variables
nulltoken 3da73c40 2012-11-29T21:33:31 Fix compilation warnings
Ben Straub f4fc9fdb 2012-11-29T12:26:40 Cleanup nitpicky things
nulltoken 37849a8e 2012-11-17T22:09:55 tracking: fix retrieval of the tracking ref of branch with empty merge and/or remote entry
nulltoken f1bd50d6 2012-11-17T22:07:30 tracking: remove code duplication in test
Ben Straub cb7ac81c 2012-11-27T13:30:04 Fix warning
Russell Belfer a8122b5d 2012-11-21T15:39:03 Fix warnings on Win64 build
Vicent Marti cfbe4be3 2012-11-17T19:54:47 More external API cleanup Conflicts: src/branch.c tests-clar/refs/branches/create.c
Ben Straub 2508cc66 2012-11-18T21:38:08 Rename ref and reflog apis for consistency
Sascha Cunz 9094d30b 2012-11-23T11:41:56 Reset all static variables to NULL in clar's __cleanup Without this change, any failed assertion in the second (or a later) test inside a test suite has a chance of double deleting memory, resulting in a heap corruption. See #1096 for details. This leaves alone the test cases where we "just" use cl_git_sandbox_init() and cl_git_sandbox_cleanup(). These methods already take good care to not double delete a repository. Fixes #1096
nulltoken b15df1d9 2012-11-17T18:29:51 reflog: make entry_byindex() and drop() git compliant Passing 0 as the index now retrieves the most recent entry instead of the oldest one.
nulltoken b1a3a70e 2012-11-12T00:14:51 repository: Refine repository_head() error report
nulltoken 1f87fa35 2012-10-09T18:29:26 reflog: fix bogus removal of reflog entries
nulltoken 383f164a 2012-09-07T17:55:30 branch: rename config section upon moving
nulltoken 0b98a8a4 2012-09-07T15:13:11 branch: remove config section upon deletion
nulltoken cd1ef822 2012-10-20T12:07:53 test: extract make_head_orphaned() logic