agraef / pd-lua

Lua bindings for Pd, updated for Lua 5.3+
https://agraef.github.io/pd-lua/
GNU General Public License v2.0
47 stars 10 forks source link

add "distributed as part of ELSE" post #16

Closed porres closed 1 year ago

agraef commented 1 year ago

Looks good, but can you please add the blank line at 1686 back in? It's there for a reason. :)

agraef commented 1 year ago

Just push another commit with the blank line in the proper place, and I'll squash and merge, thanks.

agraef commented 1 year ago

In case it's not clear, the blank line should now come before line 1689 post-edit.

porres commented 1 year ago

did i get it right?

agraef commented 1 year ago

Bang on, man. :) Yep, it's a silly thing, but it makes the code more readable to me, so...

agraef commented 1 year ago

Hmm, this doesn't work: #ifdef ELSE | PLUGDATA

I didn't spot this before, now I'll have to fix it post-merge. :(

agraef commented 1 year ago

Fixed. Make sure to pull upstream so that your master branch is back in sync.

BTW, it's generally a better idea to keep the master branch untouched and do your own development on descriptively named branches instead, usually one branch per feature (which is why they're called feature branches). Otherwise you risk that your master and upstream fall out of sync, which is always a bad thing, and then you end up creating new forks all the time, which is a lot more work than creating feature branches. IMHO, of course, but you can find a lot of articles about this kind of workflow on the internet. E.g., search for "github flow".

agraef commented 1 year ago

BTW, this all sounds a lot more complicated than it really is. The gist of it is that you branch off from main or master using git checkout -b my-feature, do your development there, and when you're done you do a git push -u origin my-feature and create your pull request from that. If the upstream dev asks you to augment the PR, you just keep pushing commits on that branch. It's also safe to forcibly rewrite that branch using git push -f if you need/want to rebase or tidy up the commit history.

The really important part is to keep the master/main branch of your local copy pristine and synced with upstream. The way I do this is by simply setting its remote to the upstream repo, git branch master --set-upstream-to will do that. E.g., for pd-lua:

git remote add upstream https://github.com/agraef/pd-lua.git
git branch master --set-upstream-to upstream/master

That way you always just pull on master, and push and create PRs from the feature branches. There are other ways to do this, but this works best for me. You can do that with any git repo just about anywhere, not just GitHub. But of course you'll have to adjust the name of the main branch (in newer repos it's usually main rather than master) and the upstream URL.

There, that was github flow in a nutshell. Just saved you a day of sifting through badly written blog articles. ;-)

porres commented 1 year ago

not sure I get it all but yeah, I do work on seaprate branches for Vanilla, so I'll do it for pdlus as well. I think I can give you a better help files for pdlua/pdluax, coming up soon!