aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
Commit message (Collapse)AuthorAgeFilesLines
* Fixed cloning of a single tagFedor Korotkov2018-08-081-3/+3
| | | | | | Relates to #870 Signed-off-by: Fedor Korotkov <fedor.korotkov@gmail.com>
* Fix wrong godoc on Tags() method.Antonio Jesus Navarro Perez2018-07-301-2/+3
| | | | | | Reword Tags() method documentation. Point to TagObjects() method to get all the tags on a repository. Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
* Fix documentation for NotesMorgan2018-06-161-1/+2
| | | | | | It previously said that it returned all references that are branches, but that's not true. Signed-off-by: Morgan Bazalgette <the@howl.moe>
* git: worktree, Skip special git directory. Fixes #814kuba--2018-04-181-6/+9
| | | | Signed-off-by: kuba-- <kuba@sourced.tech>
* Resolve full commit sha to plumbing hashantham2018-04-161-5/+20
| | | | Signed-off-by: antham <hamonanth@gmail.com>
* config: adds branches to config for tracking branches against remotes, ↵Jeremy Chambers2018-04-101-2/+77
| | | | | | updates clone to track when cloning a branch. Fixes #313 Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>
* add PlainOpen variant to find .git in parent dirsDaniel Martí2018-04-031-6/+32
| | | | | | | | | This is the git tool's behavior that people are used to; if one runs a git command in a repository's subdirectory, git still works. Fixes #765. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
* *: Use CheckClose with named returnsJavi Fontan2018-03-271-4/+2
| | | | | | | | Previously some close errors were losts. This is specially problematic in go-git as lots of work is done here like generating indexes and moving packfiles. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* add LogOrder, LogOptions.Order, implement Order=LogOrderCommitterTime and ↵Saeed Rasooli2018-03-051-1/+13
| | | | | | Order=LogOrderBSF Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
* Support for clone without checkoutMichael Rykov2018-01-171-1/+1
|
* Fix revision solver for branch and tag (#660)Anthony HAMON2017-12-011-28/+15
| | | fix Repository.ResolveRevision for branch and tag
* repository: add tests for pruning and object re-packingJeremy Stribling2017-11-291-0/+17
| | | | | Also, object re-packing should clean up any loose objects that were packed.
* storer: separate loose and packed object mgmt into optional ifacesJeremy Stribling2017-11-291-10/+16
| | | | Suggested by mcuadros.
* Use object walker in repacking codeTaru Karttunen2017-11-291-12/+9
|
* Use Storer.Config pack window when repacking objectsTaru Karttunen2017-11-291-3/+5
|
* Make object repacking more configurableTaru Karttunen2017-11-291-7/+19
|
* Support for repacking objectsTaru Karttunen2017-11-291-0/+62
|
* Address CI and move code aroundTaru Karttunen2017-11-291-124/+0
|
* First pass of prune designTaru Karttunen2017-11-291-0/+124
|
* all: simplificationferhat elmas2017-11-291-1/+1
| | | | | | | | | | - no length for map initialization - don't check for boolean/error return - don't format string - use string method of bytes buffer instead of converting bytes to string - use `strings.Contains` instead of `strings.Index` - use `bytes.Equal` instead of `bytes.Compare`
* Use optionally locking when updating refsTaru Karttunen2017-11-271-4/+9
|
* update to go-billy.v4 and go-git-fixtures.v3Máximo Cuadros2017-11-231-2/+2
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* plumbing: the commit walker can skip externally-seen commitsJeremy Stribling2017-09-091-3/+3
| | | | | | | | | | When the revlist is computing the set of hashes needed to transfer, it doesn't need to walk over commits it has already processed. So, it can instruct the commit walker not to walk those commits by passing in its own `seen` map. For a 36K object repo, this brought the time for `revlist.Objects` down from 50s to 30s.
* Minor fix to grammatical error in error message for ErrRepositoryNotExists.Nathan Ollerenshaw2017-09-061-1/+1
|
* Repository.Clone added Tags option, and set by default AllTags as git doesMáximo Cuadros2017-09-041-0/+1
|
* Worktree.Reset ignore untracked files on Merge modeMáximo Cuadros2017-09-011-1/+4
|
* repository: Resolve commit when cloning annotated tag, fixes #557Ori Rawlings2017-08-241-12/+41
|
* *: windows support, some more fixes (#533)Manuel Carmona2017-08-031-1/+1
| | | | | | | | | | * fixed windows failed test: "134 FAIL: repository_test.go:340: RepositorySuite.TestPlainOpenBareRelativeGitDirFileTrailingGarbage" * fixed windows failed test: "143 FAIL: worktree_test.go:367: WorktreeSuite.TestCheckoutIndexOS" * fixed windows failed test: "296 FAIL: receive_pack_test.go:36: ReceivePackSuite.TearDownTest" * fixed windows failed test: "152 FAIL: worktree_test.go:278: WorktreeSuite.TestCheckoutSymlink"
* Remote.Clone fix clone of tags in shallow modeMáximo Cuadros2017-08-021-15/+14
|
* Merge pull request #531 from mcuadros/ref-nameMáximo Cuadros2017-08-021-4/+4
|\ | | | | plumbing: moved `Reference.Is*` methods to `ReferenceName.Is*`
| * *: use the new API for ReferenceName.Is* methodsMáximo Cuadros2017-08-021-4/+4
| |
* | Merge pull request #501 from smola/config-multiple-urlsMáximo Cuadros2017-08-021-1/+1
|\ \ | | | | | | config: multiple values in RemoteConfig (URLs and Fetch)
| * | config: multiple values in RemoteConfig (URLs and Fetch)Santiago M. Mola2017-08-011-1/+1
| |/ | | | | | | | | | | | | | | * Change `URL string` to `URL []string` in `RemoteConfig`, since git allows multiple URLs per remote. See: http://marc.info/?l=git&m=116231242118202&w=2 * Fix marshalling of multiple fetch refspecs.
* / reuse Auth method when recursing submodules, fixes #521Devon Barrett2017-07-291-1/+4
|/
* worktree: expose underlying filesystemMáximo Cuadros2017-07-261-1/+1
|
* *: package context support in Repository, Remote and SubmoduleMáximo Cuadros2017-07-261-13/+70
|
* move Repository.Pull to Worktree.PullMáximo Cuadros2017-07-241-116/+55
|
* repository: allow push from shallow repositoriesMáximo Cuadros2017-07-191-3/+3
|
* git: remove ErrObjectNotFound in favor of plumbing.ErrObjectNotFoundJP Sugarbroad2017-07-121-5/+0
|
* *: upgrade to go-billy.v3, mergeMáximo Cuadros2017-06-181-18/+14
|
* fix naming of NewCommit{Pre,Post}IteratorSantiago M. Mola2017-06-131-3/+3
| | | | | Use Iter suffix, just as all other iterators in the project. Use Preorder and Postorder to be more clear.
* storage/filesystem: call initialization explicitely, fixes #408Santiago M. Mola2017-06-011-0/+13
| | | | | | | | | | | | | filesystem.Storage was initializing the gitdir (creating objects and refs) on NewStorage. But this should be done only on init and clone operations, not on open. Now there is a new interface storer.Initializer that storers can implement if they need any initialization step before init or clone. filesystem.Storage is one of such implementations. git.Init and git.Clone now call to the storer Init() method if it does implement it. Otherwise, it just ignores initialization.
* storage: filesystem, initialize the default folder scaffoldingMáximo Cuadros2017-05-211-0/+8
|
* add support for .git as file, fixes #348Santiago M. Mola2017-04-271-9/+55
|
* worktree, reset implementation and status improvementsMáximo Cuadros2017-04-121-1/+1
|
* merge, Repository.LogMáximo Cuadros2017-04-111-26/+45
|\
| * Add Repository.Log() method (fix #298)Antonio Jesus Navarro Perez2017-04-111-26/+45
| | | | | | | | | | | | | | | | | | | | - CommitIter is now an interface - The old CommitIter implementation is now called StorerCommitIter - CommitWalker and CommitWalkerPost are now iterators (CommitPreIterator and CommitPostIterator). - Remove Commit.History() method. There are so many ways to iterate a commit history, depending of the use case. Now, instead of use the History() method, you must use CommitPreIterator or CommitPostIterator. - Move commitSorterer to references.go because is the only place that it is used, and it must not be used into another place. - Make References method private, it must only be used into blame logic. - Added a TODO into references method, where the sortCommits is used to remove it in a near future.
* | worktree, status implementation based on merkletrie and reset and checkout ↵Máximo Cuadros2017-04-111-9/+11
|/ | | | implementations
* Merge pull request #296 from ajnavarro/improvement/repositorySantiago M. Mola2017-03-211-26/+67
|\ | | | | git: Repository methods changes
| * git: Repository methods changesAntonio Jesus Navarro Perez2017-03-061-26/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To have a more consistent public API, we decided to rename some methods, and add others: - Commit method renamed to CommitObject - Commits method renamed to CommitObjects - Tree method renamed to TreeObject - Trees method renamed to TreeObjects - Tags method renamed to TagObjects - Tag method renamed to TagObject - Added method Tags that returns tag references - Added method Branches that returns branch references - Added method Notes that returns note references - Added BlobObject method - Added BlobObjects method Also, we added more functionality related to references: - Added iterator to iterate References with a specific filter Some notes: - #298