@@ -4,9 +4,8 @@ All notable changes to this project are documented in this file.
44
55## [ Unreleased]
66
7- Changes since [ v1.6.0] ( https://github.com/gitonomy/gitlib/releases/tag/v1.6.0 ) . To upgrade, see
8- [ UPGRADE-2.0.md] ( UPGRADE-2.0.md ) : most of the API of 1.x that 2.0 replaces keeps working,
9- deprecated until 3.0.
7+ Changes since [ v1.6.0] ( https://github.com/gitonomy/gitlib/releases/tag/v1.6.0 ) . To upgrade, fix
8+ the deprecations of 1.7 first, then see [ UPGRADE-2.0.md] ( UPGRADE-2.0.md ) .
109
1110### Breaking changes
1211
@@ -54,6 +53,32 @@ deprecated until 3.0.
5453 with both drivers: the name of a remote branch alone, like ` feature ` for ` origin/feature ` ,
5554 created the local branch. Use ` checkoutNewBranch() ` .
5655 ([ #254 ] ( https://github.com/gitonomy/gitlib/pull/254 ) )
56+ - Remove the API that 1.7 deprecates; see [ UPGRADE-2.0.md] ( UPGRADE-2.0.md ) :
57+ - ` Admin ` , replaced by the static methods of ` Repository ` , and ` Repository::cloneTo() ` ,
58+ replaced by ` cloneFrom() ` and ` cloneBareFrom() ` .
59+ - The array of options of ` Repository ` (` working_dir ` , ` logger ` , ` command ` ,
60+ ` environment_variables ` , ` inherit_environment_variables ` , ` process_timeout ` , ` debug ` ): pass
61+ the working directory and a ` CliDriver ` instead; ` inherit_environment_variables ` has no
62+ counterpart, pass the variables git needs instead. ` Repository::setLogger() ` and
63+ ` getLogger() ` .
64+ - The ` $reload ` argument of ` Repository::getReferences() ` , and the arguments of
65+ ` Commit::getIncludingBranches() ` . ` ReferenceBag::update() ` and ` Branch::isMergedTo() ` ,
66+ replaced by ` Branch::moveTo() ` and ` isMergedInto() ` .
67+ - ` Repository::getDiff() ` with one argument, ` Log::getDiff() ` , ` Diff::setRepository() ` ,
68+ ` File::setRepository() ` , ` addChange() ` , ` isChangeMode() ` , ` isDelete() ` and ` getAnchor() ` ,
69+ ` FileChange::getCount() ` , ` getLines() ` , replaced by ` getDiffLines() ` , and the ` LINE_* `
70+ constants, replaced by ` DiffLineType ` , and the lines passed to the constructor of
71+ ` FileChange ` as arrays.
72+ - ` Log::setOffset() ` and ` setLimit() ` .
73+ - A range of lines as a string in ` Repository::getBlame() ` , ` Blame::getGroupedLines() ` and
74+ ` Blame\Line::getLine() ` .
75+ - ` CommitReference ` , ` Tree::getCommitReferenceEntries() ` , ` getEntries() ` , ` getBlobEntries() `
76+ and ` getTreeEntries() ` : iterate the tree, or use ` getBlobs() ` , ` getTrees() ` and
77+ ` getSubmodules() ` .
78+ - The branch to create of ` WorkingCopy::checkout() ` .
79+ - ` Commit::getShortMessage() ` and ` getFixedShortHash() ` , ` Repository::shell() ` ,
80+ ` PushReference::getReference() ` , ` getRevision() ` , ` isCreate() ` and ` isDelete() ` .
81+ - ` Repository::getSize() ` , in kilobytes: use ` getSizeInBytes() ` .
5782
5883### Features
5984
@@ -105,38 +130,6 @@ deprecated until 3.0.
105130 still exists afterward.
106131 ([ #244 ] ( https://github.com/gitonomy/gitlib/pull/244 ) , fixes #14 )
107132
108- ### Deprecations
109-
110- All are removed in 3.0; see [ UPGRADE-2.0.md] ( UPGRADE-2.0.md ) .
111- ([ #253 ] ( https://github.com/gitonomy/gitlib/pull/253 ) ) 1.7 deprecates them already: they are
112- all deprecated since 1.7.
113-
114- - ` Admin ` , replaced by the static methods of ` Repository ` , and ` Repository::cloneTo() ` ,
115- replaced by ` cloneFrom() ` and ` cloneBareFrom() ` .
116- - The array of options of ` Repository ` and ` Admin ` (` working_dir ` , ` logger ` , ` command ` ,
117- ` environment_variables ` , ` inherit_environment_variables ` , ` process_timeout ` , ` debug ` ): pass
118- the working directory and a ` CliDriver ` instead; ` inherit_environment_variables ` has no
119- counterpart, pass the variables git needs instead. ` Repository::setLogger() ` and ` getLogger() ` .
120- - Passing ` $reload ` to ` Repository::getReferences() ` , and arguments to
121- ` Commit::getIncludingBranches() ` . ` ReferenceBag::update() ` and ` Branch::isMergedTo() ` ,
122- replaced by ` Branch::moveTo() ` and ` isMergedInto() ` .
123- - Calling ` Repository::getDiff() ` with one argument, ` Log::getDiff() ` , ` Diff::setRepository() ` ,
124- ` File::setRepository() ` , ` addChange() ` , ` isChangeMode() ` , ` isDelete() ` and ` getAnchor() ` ,
125- ` FileChange::getCount() ` , ` getLines() ` , replaced by ` getDiffLines() ` , and the ` LINE_* `
126- constants, replaced by ` DiffLineType ` , lines passed to the constructor of ` FileChange ` as
127- arrays.
128- - ` Log::setOffset() ` and ` setLimit() ` .
129- - A range of lines as a string in ` Repository::getBlame() ` , ` Blame::getGroupedLines() ` and
130- ` Blame\Line::getLine() ` .
131- - ` CommitReference ` , ` Tree::getCommitReferenceEntries() ` , ` getEntries() ` , ` getBlobEntries() `
132- and ` getTreeEntries() ` : iterate the tree, or use ` getBlobs() ` , ` getTrees() ` and
133- ` getSubmodules() ` .
134- - The branch to create of ` WorkingCopy::checkout() ` .
135- - ` Commit::getShortMessage() ` and ` getFixedShortHash() ` , ` Repository::shell() ` ,
136- ` PushReference::getReference() ` , ` getRevision() ` , ` isCreate() ` and ` isDelete() ` .
137- - ` Repository::getSize() ` , in kilobytes: use ` getSizeInBytes() ` .
138- ([ #254 ] ( https://github.com/gitonomy/gitlib/pull/254 ) )
139-
140133### Security
141134
1421351.7.1 has those that break nothing of 1.x: see
@@ -246,8 +239,9 @@ all deprecated since 1.7.
246239- Fix blame lines numbered from 1 for a range of lines. ([ #253 ] ( https://github.com/gitonomy/gitlib/pull/253 ) )
247240- Fix ` Hooks ` failing silently, in a repository without hooks directory, and writing the hooks
248241 of a linked worktree where git doesn't run them. ([ #253 ] ( https://github.com/gitonomy/gitlib/pull/253 ) )
249- - Fix ` Repository::getSize() ` throwing for a link to a missing file in the git directory, like
250- a hook not deployed yet: it no longer follows links. A file or a directory git deletes
242+ - Fix the size of a repository (` getSizeInBytes() ` , which replaces ` getSize() ` ) throwing for a
243+ link to a missing file in the git directory, like a hook not deployed yet: it no longer follows
244+ links. A file or a directory git deletes
251245 meanwhile, like a lock during a ` gc ` or the quarantine of a push, no longer makes it throw
252246 either, and one it can't read throws a ` RuntimeException ` of gitlib, instead of PHP's.
253247 ([ #254 ] ( https://github.com/gitonomy/gitlib/pull/254 ) , [ #263 ] ( https://github.com/gitonomy/gitlib/pull/263 ) )
@@ -256,7 +250,7 @@ all deprecated since 1.7.
256250- Fix reading a commit whose ` encoding ` header isn't UTF-8, which threw: its message, author and
257251 committer are now re-encoded to UTF-8, like ` git log ` does. ([ #253 ] ( https://github.com/gitonomy/gitlib/pull/253 ) )
258252- Fix file names holding non-ASCII or special characters (tab, quote, backslash) in trees
259- (` Tree::getEntries() ` ), and special characters in diffs, which kept git's C-style quoting.
253+ (iterating a ` Tree ` ), and special characters in diffs, which kept git's C-style quoting.
260254 ([ #253 ] ( https://github.com/gitonomy/gitlib/pull/253 ) )
261255- Fix relative paths not resolving against the repository in ` Repository::run() ` : the git
262256 process spawned by ` run() ` never had its working directory set, so commands such as
@@ -273,11 +267,8 @@ all deprecated since 1.7.
273267 branch existed.
274268 - ` Tag::getBodyMessage() ` dropped or truncated a line for annotated tags using the
275269 standard ` subject\n\nbody ` convention.
276- - ` Repository::shell() ` interpolated the repository path into the shell command without
277- escaping it; it is now passed through ` escapeshellarg() ` .
278270 - ` Hooks::set() ` created hook scripts world-writable (` 0777 ` ); they are now created
279271 ` 0700 ` .
280- - Fixed the ` isSuccessFul() ` casing typo in ` Admin ` .
281272
282273### Minor
283274
0 commit comments