[Patch] Fix planner notes gas change output logic
Dirk Hohndel
dirk at hohndel.org
Fri Jun 19 05:50:23 PDT 2015
On Fri, Jun 19, 2015 at 07:57:56PM +1000, Rick Walsh wrote:
> >
> > 1) Could you split your patch into 2-3 patches, one for the segment type,
> > another one for the new logic? git add -p is very helpful in doing this (as
> > I recently learned).
>
> The process for altering the code involved a lot of trial and error and
> doing / undoing changes. I'm sure that's not the ideal method, and it
> doesn't lend itself to split patches. I'll see if I can improve that, and
> will look up what add -p does.
That's frequently how new code gets written. But it's still a very good
habit to break things down into smaller pieces.
git add -p allows you to pick hunks of patches and even partial hunks (as
I said in my last email... try the 'e' option where you hand edit the
patch - it's surprisingly intuitive to use). Whatever you pick is staged
for the next commit, the rest stays an unstaged change. After you picked
some partial changes with git add -p you simply use git commit -s to
create your commit. Now look at the commit with git show. Is this exactly
what you wanted? Otherwise use git commit --amend to modify it or
git reset HEAD^ to undo the commit and unstage all the changes.
> Yes, if there is a minimum stop time in the calculated profile, the issue
> of 0min stops goes away - it makes executing the dive as well as outputting
> the plan easier. An alternative (option) would be to postpone the gas
> switch until the first deco stop as Anton prefers.
No, please don't do that. It would make Subsurface a lot less useful for
divers trained differently. Given the way I tend to do my tech dives,
having the 1 minute stop in my plan wouldn't make any difference. Not
being able to switch to the deco gas fairly deep would be a deal killer.
The site where we are teaching new tech divers is a shore diving site with
a fairly gradual slope. It takes quite a while to come up because you need
to cover a fair bit of horizontal difference. You actually WANT to change
to your first deco gas around its MOD.
/D
More information about the subsurface
mailing list