Re: [exim-dev] Double-check please

Góra strony
Delete this message
Reply to this message
Autor: David Woodhouse
Data:  
Dla: Phil Pennock
CC: exim-dev
Temat: Re: [exim-dev] Double-check please
On Wed, 2010-12-15 at 03:21 -0500, Phil Pennock wrote:
> Please audit http://git.exim.org/users/pdp/exim.git before I push those
> changes to the master repo. I do not expect to make any more changes
> tonight.
>
> David, if you +1 the changes, I'll push to master. If you don't want to
> wait, just pull them in. I can believe that git will let you do that,
> even if the master is bare, but I don't currently know how.


I don't know why git would *not* let me do that. If I pull the commits
into my tree...

[dwmw2@macbook exim]$ git pull git://git.exim.org/users/pdp/exim.git
remote: Counting objects: 72, done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 56 (delta 45), reused 0 (delta 0)
Unpacking objects: 100% (56/56), done.
From git://git.exim.org/users/pdp/exim
 * branch            HEAD       -> FETCH_HEAD
Updating 1e83d68..4339d5c
Fast-forward
 doc/doc-docbook/spec.xfpt       |   44 +++++++++++--
 doc/doc-txt/ChangeLog           |    9 +++
 doc/doc-txt/IncompatibleChanges |   59 ++++++++++++++++++
 doc/doc-txt/NewStuff            |   22 +++++++
 src/src/EDITME                  |   25 ++++++++
 src/src/buildconfig.c           |    6 +-
 src/src/config.h.defaults       |    2 +
 src/src/exim.c                  |  127
++++++++++++++++++++++++++++++++++++++-
 src/src/globals.c               |    5 +-
 src/src/globals.h               |    3 +
 src/src/macros.h                |    2 +-
 11 files changed, 292 insertions(+), 12 deletions(-)
 create mode 100644 doc/doc-txt/IncompatibleChanges


... then I can just push them to master, just as I'd push any *other*
changes from my tree, whether I'd committed them personally or not...

[dwmw2@macbook exim]$ git push
To ssh://git.exim.org/home/git/exim.git
1e83d68..4339d5c master -> master

Except I didn't actually do the latter; I think the va_copy thing is
better not compiling, since we have a report that it doesn't actually
work. The whole point in va_copy being implementation-defined is that
you can't assume it's a normal data structure.

On systems without va_copy, we're probably better off just re-using the
va_args.

I'll fold your final 'fix typo' patch into the previous patch too. When
committing that, you could have used 'git commit --amend'.

Mini-tutorial... after the 'pull' command above (but not the push, which
I faked):

[dwmw2@macbook exim]$ git log --pretty=oneline origin..
4339d5c2c3e84816312d66d88157894d1ee6b5fa Fix typo.
f281cea78215287cb5916914c5c733fc644f2751 Implement -D whitelist invoking user re
6cd5b59575a3a0274832242b1ac4561ad6ecea74 Fix untested fallback for ancient syste
2cfd322193567dbbeca47b0fc0ee2836f46e2600 doc-txt updates for the security change
a7cbbf501402231457e8167b6d446f4df454ba17 Implement -D filtering, first pass.
d7177eb2021bc5517b2d8fab2269564f30d4446e Document the change to system_filter_us
79d4bc3d95d75446a2d149ca35525f078a978027 Change the default for system_filter_us
[dwmw2@macbook exim]$ git reset --hard 2cfd322193567dbbeca47b0fc0ee2836f46e2600
HEAD is now at 2cfd322 doc-txt updates for the security changes
[dwmw2@macbook exim]$ git cherry-pick f281cea78215287cb5916914c5c733fc644f2751
[master cf73290] Implement -D whitelist invoking user restriction.
 Author: Phil Pennock <pdp@???>
 3 files changed, 48 insertions(+), 2 deletions(-)
[dwmw2@macbook exim]$ git show 4339d5c2c3e84816312d66d88157894d1ee6b5fa | patch -p1
patching file doc/doc-docbook/spec.xfpt
[dwmw2@macbook exim]$ git commit --amend doc/doc-docbook/spec.xfpt
[master 66581d1] Implement -D whitelist invoking user restriction.
 Author: Phil Pennock <pdp@???>
 3 files changed, 48 insertions(+), 2 deletions(-)
[dwmw2@macbook exim]$ git diff 4339d5c2c3e84816312d66d88157894d1ee6b5fa..
   ... yes, difference between your tree and what I have now is only
       the va_copy bits that I *intended* to change ... 



So now I need to fix things so that only root/exim/CONFIGURE_USER can
override the config on the command line to one in
TRUSTED_CONFIG_PREFIX_LIST and have it retain root privs.

We *possibly* need to do something about va_copy, and then we're fairly
much ready to do a release candidate?


> -Phil, mini-rant follows:
>
> Okay, I've had a hell of a time fighting git, after a rebase (my first)
> went wrong and I ended up apparently working in "detached HEAD state",
> behind HEAD.


Never rebase. Why would you try doing advanced stuff like that?

And if you *are* getting creative and trying to rewrite history, always
remember the IDs of the commits that you are unmaking so that you can
compare or recover. That 'git-log --pretty=online' above, for example.
Normally I do that by running gitk, but that doesn't cut and paste so
well as an example.

> I recreated work, did more (more fiddly) work, discovered
> why pushes to pdp-tahini were recovering the old work, switched to
> master,


That sounds like you might have made the mistake of trying to use
branches, too? I also consider that to be advanced use of git, and
mostly pointless. Don't do that.

> then was only able to recover my work because another terminal
> window had { git log } in it so I could go back to that most recent
> commit. { git reset --hard } was my friend, but appears to be the sort
> of friend you meet in a dark alley and are always "cautious" about.


:)

--
dwmw2