-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
@antis81, should I remove |
Yes, it can be removed when |
I am not very sure, if all the The MGV user interface should of course do the latter (which it never did). But a random tool developed using libGitWrap might want to simply checkout a remote reference (though first of all, it could do that in many different ways and second, it would be a bad design choice - since almost anything it could do with the checkout would be much faster with a temporary index). But to be complete: I actually think that exactly this behavior is broken by the change. |
However, let's ask the counter-question, too: Would it make sense for |
Yes, I'd say so. This is actually what updateHEAD() was intended to do But to make it complete: Why not let a bool parameter |
Please have a closer look at EDIT: Rethinking that, this method should be private. It moves the HEAD being either symbolic or sha1. Keep in mind, that |
We should change that. What about giving it a
|
@antis81 Sorry for all this refactoring. Hope that the cries of dismay may be evanescent somewhat soonish... I just feel like, we should do that ^^ |
currently, there is a mess in the object construction API:
So, what I want to do is:
But actually, I have to finish the thing that I'm currently working on. Any comments on this plan? |
This helper goes to BasePrivate to be accessible from all GitWrap objects.
setAsHEAD() does actually the same as updateHEAD(), just that it refuses to set a detached HEAD to a remote branch.
Disallow to access a reference that was deleted using the destroy() method.
Still trying to make the code cleaner, thus: - Remove some redundancies. While doing that, teach trees to be checked out for themselves. - Add overloads for some functions that don't actually use Result and deprecate the old ones. - Add an o() method to ObjectPrivate-derivates, so we can avoid the C-Style or reinterpret_casting of git_object / git_tree / git_commit. - try to fix several of our const-ness errors. There a so many of them...
- Provide ObjectXXX.hpp for compat - Provide private classes for Tree, Blob, Tag and Commit - Move some checking stuff over to Private classes - Yet more constness-correctness - Remove Result from functions that don't use it - Provide deprecated wrappers
If a custom matching rule has matched, we used to skip the branch/tag, namespace and scope testing. This is bad, since we require that information to create a meaningful internal object factory.
See contained doxygen poetry for detailed reasoning
An unrecognized reference name is only pecuiliar if it did not match a custom rule.
As we support detection of note-references now, the special commit note type has become a name, which is perfectly fine and we should check for it.
And rebased again to get the |
Merging this, as it contains lots of good stuff and everything get's blocked again. |
Submodule
in a way that it inheritsRepoObject
and change the semantics for accessing parent/child repository. Also give it a Private class header and remote the constructor that initializes with Repository and SM-Name.Index
to follow the Nothing-Useful-Through-Constructor rule. That means: create static methods:Index::createInMemory
andIndex::open
. Switch the constructor to do nothing then.IndexConflict
in the same way: Just turn the 3-parameter constructor intoIndexConflict::create
.Base
/RepoObject
s. This is also the only way to get most of them inline and give the compiler enough hints to get things "good".Repository
and make them static in their respective classes. I think this is better API.RefName
andReference
RefName
; even thoughRefName
is now aRepoObject
, skip reading all the notes relevant config settings.BranchRef
,TagRef
andNoteRef
, objects that inheritReference
.Submodule
,BranchRef
andTagRef
. Deliberately skipNoteRef
. This is too complex for now and requires integration all over the place.repoman/refactor
code.