Re: [petsc-dev] how do people manage projects that require two or more PETSc branches

2021-04-18 Thread Barry Smith
But often one may have the two (or more branches already) and even started MR on them so just using a single branch and splitting it appropriately after the fact might not work. Plus who has the patience to label each commit properly into which MR it will belong when they make each commit an

Re: [petsc-dev] how do people manage projects that require two or more PETSc branches

2021-04-18 Thread Satish Balay via petsc-dev
On Sat, 17 Apr 2021, Barry Smith wrote: > >Say I have a project (a code whose source is not in the PETSc repository) > that requires code from two PETSc branches (that may or may not yet be MR) > but I do not want to make a single PETSc branch (since it would be > incoherent). The primary

Re: [petsc-dev] how do people manage projects that require two or more PETSc branches

2021-04-18 Thread Matthew Knepley
On Sat, Apr 17, 2021 at 7:38 PM Jed Brown wrote: > One option is to work on the throw-away combined branch as above, keep > your commits for the two topics distinct, then cherry-pick out into the > separate topic branches. > > If you are committing in the topics and respinning the throw-away bran

Re: [petsc-dev] how do people manage projects that require two or more PETSc branches

2021-04-17 Thread Jed Brown
One option is to work on the throw-away combined branch as above, keep your commits for the two topics distinct, then cherry-pick out into the separate topic branches. If you are committing in the topics and respinning the throw-away branch, I would recommend rerere, so you don't have to repeat

Re: [petsc-dev] how do people manage projects that require two or more PETSc branches

2021-04-17 Thread Jacob Faibussowitsch
I have done this maybe only a handful of times (and not with petsc) but take a look at git worktree https://git-scm.com/docs/git-worktree The basics of it is: 1. cd $PETSC_DIR — or wherever the root folder of your repo of choice is 2. git worktree add ../

[petsc-dev] how do people manage projects that require two or more PETSc branches

2021-04-17 Thread Barry Smith
Say I have a project (a code whose source is not in the PETSc repository) that requires code from two PETSc branches (that may or may not yet be MR) but I do not want to make a single PETSc branch (since it would be incoherent). I may possibly be needing to add code to both of the PETSc bra