Пример #1
0
        internal MergeCommandResult Apply(Stash stash)
        {
            ObjectId  cid     = _repo.Resolve(stash.CommitId);
            RevWalk   rw      = new RevWalk(_repo);
            RevCommit wip     = rw.ParseCommit(cid);
            RevCommit oldHead = wip.Parents.First();

            rw.ParseHeaders(oldHead);
            return(GitUtil.MergeTrees(_repo, oldHead, wip, "Stash", false));
        }
Пример #2
0
        internal MergeCommandResult Apply(ProgressMonitor monitor, Stash stash)
        {
            monitor.Start(1);
            monitor.BeginTask("Applying stash", 100);
            ObjectId  cid     = _repo.Resolve(stash.CommitId);
            RevWalk   rw      = new RevWalk(_repo);
            RevCommit wip     = rw.ParseCommit(cid);
            RevCommit oldHead = wip.Parents.First();

            rw.ParseHeaders(oldHead);
            MergeCommandResult res = GitUtil.MergeTrees(monitor, _repo, oldHead, wip, "Stash", false);

            monitor.EndTask();
            return(res);
        }