[MacPorts] WorkingWithGit modified
Marko Käning (MacPorts)
mk-macports at posteo.net
Mon Aug 22 07:51:32 PDT 2016
Hi Clemens,
On 21.08.2016 17:28, Clemens Lang wrote:
> Thanks for the section on setting up commiter name and email address, I
> had forgot about this.
you are welcome. I saw the page and that was the first thing hitting my
eye,
which is why I started to give that wiki page some polish. :-)
>> +Additionally one should define a few (not necessarily global) presets
>> for working with your clone of the MacPorts repository:
>> +{{{
>> +$ git config --global push.default nothing
>> +$ git config --global branch.autosetuprebase always
>> +$ git config --global core.excludesfile ~/.gitignore_global
>> +$ git config --global commit.template ~/.git-commit-template
>> +}}}
Well, I chose to suggest these, as they were recommended by the KDE
community.
> I do not think we should recommend setting these variables for the
> following reasons:
Let's see...
> - Users don't understand they're doing here. I want our developers
> to know what and why things are happening with Git, not serve them a
> "here's how you ought to do it" recipe.
So, than we need to explain what these settings do. I am strongly
opposing the
concept of giving just orders to our port maintainers without educating
them about
why things were set up the way they are. These settings make sense
because they
prevent bad things which can happen easily with git. I always favour(ed)
Mercurial
over it, but it was decided against... so we need to make sure that the
basic settings
are chosen such that they prevent evil.
> - This is also the reason why the "Fetching the latest changes"
> section
> I wrote yesterday is so long: Developers should understand what
> happens when they run these commands, not just be told "run this". I
> think we should move branch.autosetuprebase to the end of the
> "Fetching the latest changes" section where we tell them that
> instead
> of the --rebase flag, they can also set this option. Also, setting
> this option globally is bad; other projects might not want this
> behavior.
As I wrote above that section I am aware of that those settings might
not be
wanted as global ones, but I actually have them set as global in most of
my
setups, to tell you the truth.
> - push.default nothing may be a good idea, but I would only put it as
> a
> recommendation in a section on committing and pushing changes for
> people that want to make sure they're not accidentially pushing
> something they don't want to push.
I think it is a good thing, as it always forces the maintainers to think
about
which branch they really want to target. That's an extra level of
precaution.
> - I do not think we need .gitignore_global; We already converted our
> svn:excludes into .gitignores in the repositories and we've always
> left the configuration of svn clients to our developers. If they
> think this is necessary, they can figure it out on their own.
OK, fine with me.
> - I also do not think we should recommend a git commit template for
> the
> same reason. Developers with Subversion have always been free to
> configure their own client and while a commit template is possible
> with Subversion, we did not recommend it there either.
Well, a commit template I definitely favour, because quite some times
you
do find commits to the MacPorts repo which do not adhere to the
standards
defined on our Wiki or in the Guide. A template would guide the
committers
to not to forget some rules of the game. But, if you don't want to annoy
our
committers with too many rules then so be it. :)
Greets,
Marko
More information about the macports-dev
mailing list