From: Eli Zaretskii <eliz@gnu.org>
To: Xue Fuqiao <xfq.free@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: About commit style
Date: Sat, 06 Apr 2013 11:52:44 +0300 [thread overview]
Message-ID: <83d2u8dorn.fsf@gnu.org> (raw)
In-Reply-To: <20130406161308.f195518200567a56f123ac05@gmail.com>
> Date: Sat, 6 Apr 2013 16:13:08 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
>
> In admin/notes/commits:
>
> Each commit should correspond to a single change (whether spread over
> multiple files or not). Do not mix different changes in the same
> commit (eg adding a feature in one file, fixing a bug in another
> should be two commits, not one).
>
> Can I mix changes in _one_ file? (E.g., adding a feature in one file,
> fixing a bug in the same file)
No, you cannot.
> When I want to add a feature in a file, I often find bugs in the
> same file.
Then fix the bugs (one by one, if they are different) in separate
commits, and then finally add the feature in one more commit. You can
use separate branches for that, to reduce inconvenience if you find
the bugs when you are already half way into adding the feature.
The only fixes that can be mixed with other changes are whitespace
changes, incorrect formatting, etc.
The point to take here is that reverting a single revision does not
inadvertently introduces changes unrelated to the issue that is the
subject of that revision. E.g., suppose your feature changes were
found to be incorrect or undesirable, and are reverted -- you don't
want that to re-introduce the unrelated bugs you fixed while working
on the feature, do you?
next prev parent reply other threads:[~2013-04-06 8:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-06 8:13 About commit style Xue Fuqiao
2013-04-06 8:52 ` Eli Zaretskii [this message]
2013-04-06 9:08 ` Eli Zaretskii
2013-04-06 11:03 ` Xue Fuqiao
2013-04-06 13:10 ` Stefan Monnier
2013-04-06 15:02 ` Eli Zaretskii
2013-04-06 15:32 ` Stefan Monnier
2013-04-06 15:46 ` Andreas Röhler
2013-04-07 6:17 ` Xue Fuqiao
2013-04-07 15:41 ` Eli Zaretskii
2013-04-07 15:48 ` Stefan Monnier
2013-04-07 22:22 ` Xue Fuqiao
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=83d2u8dorn.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=xfq.free@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.