Comment Re:Easy (Score 2) 486
> [ jfruh wrote:
> > "Larry Page revealed that he'd been suffering from a vocal cord
> > ailment that impaired his ability to speak for more than a year.
> >
>
> Easy for him to say
Wait, wha?
Suppose developer A merges the master branch into a development branch (which is not ready for merging into the master). Git will record a merge commit, attributed to developer A. Developer B then accidentally pushes the development branch onto the master. This is now a fast-forward merge, so no additional commit will be created, and the mistake is not attributable to developer B (and it will look like developer A's mistake, because their commit will appear at the tip).
We use git here in a corporate environment, and this problem absolutely does not happen, because:
Forcing a merge commit means using the --no-ff flag, which disallows any fast-forward merges. In this way, the person who is doing the merge into the official repository has a special merge commit with his name all over it.
This is not likely to be accidentally subverted; these official repo caretakers only use Git GUI (they're not really command-line types), and they use a git gui command I wrote for them that forces this behavior. Here it is, taken from
[guitool "origin/pull merge request into local branch (Args = merge request number, Revision = local branch) "]
; fetch the latest from origin
; get off of the current local branch (in case it is the target)
; force the target local branch to match the origin branch it tracks
; checkout local target branch
; pull merge request into target local branch (and force merge commit)
cmd = git fetch origin && git checkout HEAD^ && git branch -f $REVISION origin/${REVISION} && git checkout $REVISION && git pull --no-ff origin refs/merge-requests/${ARGS}
argprompt = yes
revprompt = yes
If you're really paranoid about this, git offers pre-commit hooks, which could be used to reject any fast-forward merge into the master branch of the official repository.
At any rate, one would assume someone is ultimately responsible for checking official commits for their adherence to the no-fast-forward standard. If a bogus commit slips in it could always be redone, barring some ridiculous deployment system that rolls out production code instantly upon commit.
"The best method" is probably a really vague concept.
I disagree completely. The "best" method varies widely, because it is specific to the RDBMS you're using.
Tom Kyte makes an excellent case for this in chapter 1 of his book Expert Oracle Database Architecture. He says that treating the database like a black box (i.e. taking a database-agnostic approach) is the wrong way to go; that a lack of fundamental understanding about your db of choice will hurt your project. He goes on to give some great details starting here.
If the OP had mentioned Oracle, then I would have recommend the whole book. Nonetheless, the first chapter might prove a beneficial read.
Phil Lawrence
The rate at which a disease spreads through a corn field is a precise measurement of the speed of blight.