This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Personal branches and restrictions with GIT repository


If you create a personal branch in GDB's GIT repository, that personal
branch has the same restrictions applied to it that Master does. I
understand the caution around Master; we are all still in the learning
phase and the integrity of Master should be maintained with caution.

But in the case of personal branches, do these cautions and
restrictions need to apply? Here's my work-flow to keep my branch up to
date with Master, for myself, and others who follow it.

git checkout master; git pull; git checkout users/pmuldoon/c++compile; git merge master; git push

This just makes my branch = Master + my changes. It does not, of
course, affect Master in any way. However if I try to push the result
of above, I get:

remote: *** Pattern "Merge branch '.*'" has been detected.
remote: *** (in commit 2c03baba0870c1d734c6e35725f1c2a29e35eec7)
remote: ***
remote: *** This usually indicates an unintentional merge commit.
remote: *** If you would really like to push a merge commit, please
remote: *** edit the merge commit's revision history.

As I mentioned above, this is perfectly ordinary and okay with
Master. If that is the policy, well, that's the policy. But do such
restrictions need to apply to personal branches as well?

The hook message hints at a workaround. Rename the commit so it does
not look like a merge. But that seems to be walking into a gray area
to me. Another workaround is to delete the personal branch, recreate
it from Master, and apply your local changes again. While this is not
too bad, it seems "make-work" and not in keeping with GIT's
philosophy.

So this boils down to two questions:

1) Do we need this hook for personal branches?

2) And are users allowed to do whatever they want in their own
   personal branch (within sane defaults)?

Cheers,

Phil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]