git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christof Krüger" <git@christof-krueger.de>
To: "eugene" <eugene@oggtrading.com>
Cc: git@vger.kernel.org
Subject: Re: refactoring in GIT
Date: Tue, 28 Jun 2011 17:59:37 +0200 (CEST)	[thread overview]
Message-ID: <1a25cfcef173d20a259950d6829b2611.squirrel@mail.localhost.li> (raw)
In-Reply-To: <loom.20110628T151105-908@post.gmane.org>

Hi Eugene

> #1. I want to refactor class A into few classes B,C,D. How should I check
> them
> in and mark class A inactive so that development on A stops? Note, I do
> need A
> stay in repository for backward compt. with prior code releases.
Well, if you really need to keep that file, how about a huge comment at
the beginning of the file?  Or move its content somewhere else and
#include it from the original file.
Git really can't help you here. This is a communication issue within your
project.  Resulting from its distributed design git does not have a global
"lock" feature that could be misused for that matter.

> #2. [related question] What if another developer already had A in his
> local
> repository, made changes and wants to commit after me. I just made A
> obsolete.
> Does he have drop his changes and take B,C,D from me and/or merge?
Git can't help you here either.
If your changes don't conflict with their changes, they won't notice if
they do not examine your changes. This again is a
communication/coordination issue, not a git one. However, if you had moved
"A" away or changed every line, the other developers would get a conflict
when trying to pull your stuff.

Further, git obviously won't automatically refactor other developers code
to match your changes. Depending on the complexity of your refactoring,
you might be able to play around with patches manually.

The least thing you can do is to inform the other developers about your
changes and apologize for not telling them that you planned to make A
obsolete in advance ;)

  parent reply	other threads:[~2011-06-28 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28 13:19 refactoring in GIT eugene
2011-06-28 15:27 ` Massimo Manca
2011-06-28 15:59 ` Christof Krüger [this message]
2011-06-28 17:09 ` Fredrik Gustafsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a25cfcef173d20a259950d6829b2611.squirrel@mail.localhost.li \
    --to=git@christof-krueger.de \
    --cc=eugene@oggtrading.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).