i address this post to anyone new to git, about to start
using git in the near future, or with time on their hands
willing and able to tell me There's A Better Way

i am in the habit of keeping changes to feature.h in the
source i build from, changes i make so some of the bigger
features i know i will never want or use won't be built into
my vim

this never caused a problem with svn, but git is different

with my changes in place this morning i performed a 'git
pull' and was pleased to see my first updates to my source
coming down -- git seemed happy, indeed he reported:

Auto-merged src/ex_cmds.c
Auto-merged src/option.c
Merge made by recursive.
 src/ex_cmds.c |    5 ++++
 src/message.c |    5 +++-
 src/option.c  |   67 ++++++++++++++++++++++++++++++++++++++++++--------------
 src/spell.c   |    9 +++++--
 src/version.c |   12 ++++++++++
 5 files changed, 77 insertions(+), 21 deletions(-)

version.c showed up to revision 108, vim built fine, worked
fine, no apparent problems

however, git also reported

src/feature.h: needs update

just above that other reporting -- in my git newbie eyes
this did not look like an error since i knew i had modified
feature.h to help hold down code bloat

it now appears git stopped dead in his tracks when he hit
feature.h and did not fully update my copy of the source

in an attempt to achieve the best update experience today i
created a patchfile of differences between my feature.h and
mainline vim's feature.h, then created two scripts:
revertfeat and applyfeat so i could revert my changes to the
module before doing a 'git pull' and re-apply them
afterwards

for my first partial test i ran revertfeat by itself, then
ran a 'git pull' just to see how happy i had made git

he wasn't happy, he was just getting back to work -- he
brought down all of

Auto-merged runtime/doc/options.txt
Merge made by recursive.
 runtime/doc/diff.txt         |    5 ++-
 runtime/doc/options.txt      |    9 +++--
 runtime/doc/todo.txt         |   64 ++++++++++++++++++++++-------------------
 runtime/getdos.aap           |   12 ++++----
 runtime/getunix.aap          |   12 ++++----
 runtime/syntax/fstab.vim     |   26 ++++++++++++++--
 runtime/syntax/python.vim    |    4 ++-
 runtime/tutor/tutor.eo.utf-8 |   40 +++++++++++++-------------
 8 files changed, 100 insertions(+), 72 deletions(-)

version.c still reports 108, and on further examination i
see nothing in the above updates outside the runtime -- ie,
all the updates to the code happened in my first pull this
morning

my applyfeat went fine, although when i rebuilt, all object
files were re-created since i had just tampered with a
header file

the moral of the story is:  keep your updates to feature.h
invisible to git or he'll quit on you and you might easily
miss it

following are my scripts, so you'll have a template of at
least one way to use git that works:

<revertfeat>
#!/bin/bash
set -e
patch -p0 -R vim72/vim_extended/src/feature.h < myfeat.patch
</revertfeat>

<u>
#!/bin/bash
set -e
tail ~/.build/vim/update.log
dttm | tee -a ~/.build/vim/update.log
revertfeat | tee -a ~/.build/vim/update.log
cd ~/.build/vim/vim72/vim_extended
git pull 2>&1 | tee -a ~/.build/vim/update.log
cd ~/.build/vim
applyfeat | tee -a ~/.build/vim/update.log
dsh 60 | tee -a ~/.build/vim/update.log
</u>

<applyfeat>
#!/bin/bash
set -e
patch -p0 vim72/vim_extended/src/feature.h < myfeat.patch
</applyfeat>

hth,

sc




--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui