mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 12:19:09 -04:00
style: annotate declarations for internal use (#70)
This commit is contained in:
parent
d71e00947e
commit
2daadaa9a4
22 changed files with 50 additions and 0 deletions
|
@ -84,6 +84,7 @@ class AnnotatedCommit extends Equatable {
|
|||
/// Pointer to pointer to memory address for allocated commit object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_annotated_commit> get pointer => _annotatedCommitPointer;
|
||||
|
||||
/// Commit oid that the given annotated commit refers to.
|
||||
|
|
|
@ -12,6 +12,7 @@ class Blob extends Equatable {
|
|||
/// blob object in memory.
|
||||
///
|
||||
/// Note: For internal use. Use [Blob.lookup] instead.
|
||||
@internal
|
||||
Blob(this._blobPointer) {
|
||||
_finalizer.attach(this, _blobPointer, detach: this);
|
||||
}
|
||||
|
@ -30,6 +31,7 @@ class Blob extends Equatable {
|
|||
/// Pointer to memory address for allocated blob object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_blob> get pointer => _blobPointer;
|
||||
|
||||
/// Creates a new blob from a [content] string and writes it to ODB.
|
||||
|
|
|
@ -15,6 +15,7 @@ class Branch extends Equatable {
|
|||
/// Note: For internal use. Instead, use one of:
|
||||
/// - [Branch.create]
|
||||
/// - [Branch.lookup]
|
||||
@internal
|
||||
Branch(this._branchPointer) {
|
||||
_finalizer.attach(this, _branchPointer, detach: this);
|
||||
}
|
||||
|
@ -74,6 +75,7 @@ class Branch extends Equatable {
|
|||
/// Pointer to memory address for allocated branch object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_reference> get pointer => _branchPointer;
|
||||
|
||||
/// Returns a list of branches that can be found in a [repo]sitory for
|
||||
|
|
|
@ -13,6 +13,7 @@ class Commit extends Equatable {
|
|||
/// commit object in memory.
|
||||
///
|
||||
/// Note: For internal use. Use [Commit.lookup] instead.
|
||||
@internal
|
||||
Commit(this._commitPointer) {
|
||||
_finalizer.attach(this, _commitPointer, detach: this);
|
||||
}
|
||||
|
@ -31,6 +32,7 @@ class Commit extends Equatable {
|
|||
/// Pointer to memory address for allocated commit object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_commit> get pointer => _commitPointer;
|
||||
|
||||
/// Creates new commit in the [repo]sitory.
|
||||
|
|
|
@ -20,6 +20,7 @@ class Config with IterableMixin<ConfigEntry> {
|
|||
/// - [Config.system]
|
||||
/// - [Config.global]
|
||||
/// - [Config.xdg]
|
||||
@internal
|
||||
Config(this._configPointer) {
|
||||
_finalizer.attach(this, _configPointer, detach: this);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ class Diff extends Equatable {
|
|||
/// - [Diff.treeToWorkdirWithIndex]
|
||||
/// - [Diff.treeToTree]
|
||||
/// - [Diff.parse]
|
||||
@internal
|
||||
Diff(this._diffPointer) {
|
||||
_finalizer.attach(this, _diffPointer, detach: this);
|
||||
}
|
||||
|
@ -276,6 +277,7 @@ class Diff extends Equatable {
|
|||
/// Pointer to memory address for allocated diff object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_diff> get pointer => _diffPointer;
|
||||
|
||||
/// How many diff records are there in a diff.
|
||||
|
@ -471,6 +473,9 @@ final _finalizer = Finalizer<Pointer<git_diff>>(
|
|||
class DiffDelta extends Equatable {
|
||||
/// Initializes a new instance of [DiffDelta] class from provided
|
||||
/// pointer to diff delta object in memory.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
const DiffDelta(this._diffDeltaPointer);
|
||||
|
||||
/// Pointer to memory address for allocated diff delta object.
|
||||
|
@ -578,6 +583,7 @@ class DiffStats {
|
|||
/// pointer to diff stats object in memory.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
DiffStats(this._diffStatsPointer) {
|
||||
_statsFinalizer.attach(this, _diffStatsPointer, detach: this);
|
||||
}
|
||||
|
|
|
@ -3,9 +3,12 @@
|
|||
import 'dart:ffi';
|
||||
import 'package:libgit2dart/src/bindings/libgit2_bindings.dart';
|
||||
import 'package:libgit2dart/src/extensions.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
/// Details of the last error that occurred.
|
||||
class LibGit2Error {
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
LibGit2Error(this._errorPointer);
|
||||
|
||||
final Pointer<git_error> _errorPointer;
|
||||
|
|
|
@ -13,6 +13,7 @@ class Index with IterableMixin<IndexEntry> {
|
|||
/// pointer to index object in memory.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Index(this._indexPointer) {
|
||||
_finalizer.attach(this, _indexPointer, detach: this);
|
||||
}
|
||||
|
@ -31,6 +32,7 @@ class Index with IterableMixin<IndexEntry> {
|
|||
/// Pointer to memory address for allocated index object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_index> get pointer => _indexPointer;
|
||||
|
||||
/// Full path to the index file on disk.
|
||||
|
@ -339,6 +341,7 @@ class IndexEntry extends Equatable {
|
|||
/// Initializes a new instance of [IndexEntry] class.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
const IndexEntry(this._indexEntryPointer);
|
||||
|
||||
final Pointer<git_index_entry> _indexEntryPointer;
|
||||
|
@ -346,6 +349,7 @@ class IndexEntry extends Equatable {
|
|||
/// Pointer to memory address for allocated index entry object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_index_entry> get pointer => _indexEntryPointer;
|
||||
|
||||
/// [Oid] of the index entry.
|
||||
|
@ -387,6 +391,7 @@ class ConflictEntry {
|
|||
/// Initializes a new instance of [ConflictEntry] class.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
const ConflictEntry(
|
||||
this._indexPointer,
|
||||
this._path,
|
||||
|
|
|
@ -11,6 +11,7 @@ class Note extends Equatable {
|
|||
/// pointer to note and annotatedOid objects in memory.
|
||||
///
|
||||
/// Note: For internal use. Use [Note.lookup] instead.
|
||||
@internal
|
||||
Note(this._notePointer, this._annotatedOidPointer) {
|
||||
_finalizer.attach(this, _notePointer, detach: this);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ class Odb extends Equatable {
|
|||
/// pointer to Odb object in memory.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Odb(this._odbPointer) {
|
||||
_finalizer.attach(this, _odbPointer, detach: this);
|
||||
}
|
||||
|
@ -32,6 +33,7 @@ class Odb extends Equatable {
|
|||
/// Pointer to memory address for allocated oid object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_odb> get pointer => _odbPointer;
|
||||
|
||||
/// Adds an on-disk alternate to an existing Object DB.
|
||||
|
|
|
@ -14,6 +14,7 @@ class Oid extends Equatable {
|
|||
/// pointer to Oid object in memory.
|
||||
///
|
||||
/// Note: For internal use. Use [Oid.fromSHA] instead.
|
||||
@internal
|
||||
Oid(this._oidPointer);
|
||||
|
||||
/// Initializes a new instance of [Oid] class by determining if an object can
|
||||
|
@ -41,6 +42,9 @@ class Oid extends Equatable {
|
|||
|
||||
/// Initializes a new instance of [Oid] class from provided raw git_oid
|
||||
/// structure.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Oid.fromRaw(git_oid raw) {
|
||||
_oidPointer = bindings.fromRaw(raw.id);
|
||||
}
|
||||
|
@ -50,6 +54,7 @@ class Oid extends Equatable {
|
|||
/// Pointer to memory address for allocated oid object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_oid> get pointer => _oidPointer;
|
||||
|
||||
/// Hexadecimal SHA string.
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:ffi';
|
|||
import 'package:libgit2dart/libgit2dart.dart';
|
||||
import 'package:libgit2dart/src/bindings/libgit2_bindings.dart';
|
||||
import 'package:libgit2dart/src/bindings/packbuilder.dart' as bindings;
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
class PackBuilder {
|
||||
/// Initializes a new instance of [PackBuilder] class.
|
||||
|
@ -9,6 +10,7 @@ class PackBuilder {
|
|||
/// Throws a [LibGit2Error] if error occured.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
PackBuilder(Repository repo) {
|
||||
_packbuilderPointer = bindings.init(repo.pointer);
|
||||
_finalizer.attach(this, _packbuilderPointer, detach: this);
|
||||
|
|
|
@ -18,6 +18,7 @@ class Patch extends Equatable {
|
|||
/// - [Patch.fromBlobAndBuffer]
|
||||
/// - [Patch.fromBuffers]
|
||||
/// - [Patch.fromDiff]
|
||||
@internal
|
||||
Patch(this._patchPointer) {
|
||||
_finalizer.attach(this, _patchPointer, detach: this);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ class Reference extends Equatable {
|
|||
/// Note: For internal use. Instead, use one of:
|
||||
/// - [Reference.create]
|
||||
/// - [Reference.lookup]
|
||||
@internal
|
||||
Reference(this._refPointer) {
|
||||
_finalizer.attach(this, _refPointer, detach: this);
|
||||
}
|
||||
|
@ -87,6 +88,7 @@ class Reference extends Equatable {
|
|||
/// Pointer to memory address for allocated reference object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_reference> get pointer => _refPointer;
|
||||
|
||||
/// Deletes an existing reference with provided [name].
|
||||
|
|
|
@ -11,6 +11,7 @@ class Refspec extends Equatable {
|
|||
/// from provided pointer to refspec object in memory.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
const Refspec(this._refspecPointer);
|
||||
|
||||
/// Pointer to memory address for allocated refspec object.
|
||||
|
|
|
@ -327,6 +327,7 @@ class TransferProgress {
|
|||
/// pointer to transfer progress object in memory.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
const TransferProgress(this._transferProgressPointer);
|
||||
|
||||
/// Pointer to memory address for allocated transfer progress object.
|
||||
|
|
|
@ -23,6 +23,7 @@ class Repository extends Equatable {
|
|||
/// - [Repository.init]
|
||||
/// - [Repository.open]
|
||||
/// - [Repository.clone]
|
||||
@internal
|
||||
Repository(Pointer<git_repository> pointer) {
|
||||
_repoPointer = pointer;
|
||||
_finalizer.attach(this, _repoPointer, detach: this);
|
||||
|
@ -161,6 +162,7 @@ class Repository extends Equatable {
|
|||
/// Pointer to memory address for allocated repository object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_repository> get pointer => _repoPointer;
|
||||
|
||||
/// Looks for a git repository and return its path. The lookup start from
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:ffi';
|
|||
import 'package:libgit2dart/libgit2dart.dart';
|
||||
import 'package:libgit2dart/src/bindings/libgit2_bindings.dart';
|
||||
import 'package:libgit2dart/src/bindings/revwalk.dart' as bindings;
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
class RevWalk {
|
||||
/// Initializes a new instance of the [RevWalk] class.
|
||||
|
@ -15,6 +16,7 @@ class RevWalk {
|
|||
/// Pointer to memory address for allocated [RevWalk] object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_revwalk> get pointer => _revWalkPointer;
|
||||
|
||||
/// Returns the list of commits from the revision walk.
|
||||
|
|
|
@ -16,6 +16,7 @@ class Signature extends Equatable {
|
|||
/// Note: For internal use. Instead, use one of:
|
||||
/// - [Signature.create]
|
||||
/// - [Signature.defaultSignature]
|
||||
@internal
|
||||
Signature(Pointer<git_signature> pointer) {
|
||||
_signaturePointer = bindings.duplicate(pointer);
|
||||
_finalizer.attach(this, _signaturePointer, detach: this);
|
||||
|
@ -62,6 +63,7 @@ class Signature extends Equatable {
|
|||
/// Pointer to memory address for allocated signature object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_signature> get pointer => _signaturePointer;
|
||||
|
||||
/// Full name of the author.
|
||||
|
|
|
@ -7,6 +7,9 @@ import 'package:meta/meta.dart';
|
|||
class Stash extends Equatable {
|
||||
/// Initializes a new instance of [Stash] class from provided stash [index],
|
||||
/// [message] and [oid].
|
||||
///
|
||||
/// Note: For internal use. Use [Stash.create] instead to create stash.
|
||||
@internal
|
||||
const Stash({
|
||||
required this.index,
|
||||
required this.message,
|
||||
|
|
|
@ -13,6 +13,7 @@ class Tag extends Equatable {
|
|||
/// tag object in memory.
|
||||
///
|
||||
/// Note: For internal use. Use [Tag.lookup] instead.
|
||||
@internal
|
||||
Tag(this._tagPointer) {
|
||||
_finalizer.attach(this, _tagPointer, detach: this);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ class Tree extends Equatable {
|
|||
/// tree object in memory.
|
||||
///
|
||||
/// Note: For internal use. Use [Tree.lookup] instead.
|
||||
@internal
|
||||
Tree(this._treePointer) {
|
||||
_finalizer.attach(this, _treePointer, detach: this);
|
||||
}
|
||||
|
@ -30,6 +31,7 @@ class Tree extends Equatable {
|
|||
/// Pointer to memory address for allocated tree object.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
Pointer<git_tree> get pointer => _treePointer;
|
||||
|
||||
/// List with tree entries of a tree.
|
||||
|
@ -113,6 +115,7 @@ class TreeEntry extends Equatable {
|
|||
/// tree entry object in memory.
|
||||
///
|
||||
/// Note: For internal use.
|
||||
@internal
|
||||
const TreeEntry(this._treeEntryPointer);
|
||||
|
||||
/// Initializes a new instance of [TreeEntry] class from provided pointer to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue