| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
There are some combination of objects and target types which we know
cannot be fulfilled. Return EINVALIDSPEC for those to signify that there
is a mismatch in the user-provided data and what the object model is
capable of satisfying.
If we start at a tag and in the course of peeling find out that we
cannot reach a particular type, we return EPEEL.
|
| |
|
|
|
|
| |
This gets the value from branch.<foo>.remote.
|
|
|
|
|
| |
This leaves space for future expansion to locking other resources
without having to change the API for references.
|
|
|
|
|
|
|
|
|
| |
A transaction allows you to lock multiple references and set up changes
for them before applying the changes all at once (or as close as the
backend supports).
This can be used for replication purposes, or for making sure some
operations run when the reference is locked and thus cannot be changed.
|
| |
|
| |
|
|
|
|
|
| |
If we remove a reference while we're iterating through the packed refs,
the position in the iterator will be off.
|
|
|
|
|
|
| |
This adds another assertion to ensure that the reference name inside
the git_reference struct returned by `git_branch_create` is returned as
precomposed if `core.precomposeunicode` is enabled.
|
|
|
|
|
| |
This tests that decomposed branch names are correctly precomposed when
passed to `git_branch_move` and `core.precomposeunicode` is enabled.
|
|
|
|
|
|
| |
Only on a filesystem that is composed/decomposed insensitive,
should be testing that a branch can be looked up by the opposite
form and still work correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using Iconv to convert unicode data and iconv doesn't like
the source data (because it thinks that it's not actual UTF-8),
instead of stopping the operation, just use the unconverted data.
This will generally do the right thing on the filesystem, since
that is the source of the non-UTF-8 path data anyhow.
This adds some tests for creating and looking up branches with
messy Unicode names. Also, this takes the helper function that
was previously internal to `git_repository_init` and makes it
into `git_path_does_fs_decompose_unicode` which is a useful in
tests to understand what the expected results should be.
|
|
|
|
|
| |
Trying to find other issues where tests may not clean up quite
properly when they are through...
|
|
|
|
|
|
|
|
| |
git_branch_t is an enum so requesting GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE is not possible as it is not a member of the enum (at least VS2013 C++ complains about it).
This fixes a regression introduced in commit a667ca8298193b3103c1dbdcb1f6c527e6e99eb2 (PR #1946).
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
|
|
|
| |
On bare by default, or when core.logallrefupdates is false, we must not
write the reflog.
|
|
|
|
|
| |
If the caller wants to update a ref to point to the same target as it
currently has, we should return early and avoid writing to the reflog.
|
|
|
|
|
|
|
|
| |
When we update the current branch, we must also append to HEAD's reflog
to keep them in sync.
This is a bit of a hack, but as git.git says, it covers 100% of
default cases.
|
|\
| |
| | |
Do not allow git_branch_create() to force update branch
|
| |
| |
| |
| | |
current branch
|
| |
| |
| |
| |
| | |
Keep the reflog parameters as the last two, as they're the optional
parameters.
|
|\ \
| | |
| | | |
More reflogness
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Add it under the git_reference_remove() name, letting the user pass the
repo and name, analogous to unconditional setting/creation.
|
| | |
| | |
| | |
| | |
| | | |
If the type of the on-disk reference has changed, the old value
comparison should fail.
|
| | |
| | |
| | |
| | | |
Recognize when the reference has changed since we loaded it.
|
| | |
| | |
| | |
| | | |
Bring the race detection goodness to symbolic references as well.
|
|/ / |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Internally we already did everything with git_bufs, so this is just
exposing those functions with public names.
|
|
|
|
|
|
| |
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
|
|\
| |
| | |
Reference operations with log
|
| |
| |
| |
| |
| |
| | |
The frontend used to look at the file directly, but that's obviously not
the right thing to do. Expose it on the backend and use that function
instead.
|
| |
| |
| |
| |
| |
| | |
Sometimes (e.g. stash) we want to make sure that a log will be written,
even if it's not in one of the standard locations. Let's make that
easier.
|
| |
| |
| |
| |
| |
| | |
git-core only writes to the reflogs of HEAD, refs/heads/ and,
refs/notes/ or if there is already a reflog in place. Adjust our code to
follow these semantics.
|
| |
| |
| |
| |
| |
| | |
This was a convenience method for the refs front-end to do the reflog
writing. This is now done in the backend and it has no more reason for
being.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Whenever a reference is created or updated, we need to write to the
reflog regardless of whether the user gave us a message, so we shouldn't
leave that to the ref frontend, but integrate it into the backend.
This also eliminates the race between ref update and writing to the
reflog, as we protect the reflog with the ref lock.
As an additional benefit, this reflog append on the backend happens by
appending to the file instead of parsing and rewriting it.
|
| | |
|
| | |
|
| | |
|
| | |
|