Odd instructions for Git?

2009-04-04 Thread Tommi Vainikainen
Hi,

I was reading http://live.gnome.org/TranslationProject/GitHowTo and
noticed that it says It is customary in Git to go for small commits; if
you have more than one file, commit them separately, with a descriptive
commit message for each commit. For example, if you edit the Makefile.am
file for DOC_LINGUAS or the LINGUAS file, it is good to commit the as

However for me this sounds like contradicting very basic rule of version
control usage that each commit should contain all logically relevant
changes together. For example when committing initial translation, I
think only sane solution is to commit first version of po file together
with Makefile/LINGUAS change, because those belong logically together.

However now Wiki instructs to work in different way. Are we really
changing this kind of conventions to adhere some strange Git customs?

-- 
Tommi Vainikainen
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Odd instructions for Git?

2009-04-04 Thread Simos
On Sat, Apr 4, 2009 at 8:27 PM, Tommi Vainikainen tvain...@gmail.com wrote:
 Hi,

 I was reading http://live.gnome.org/TranslationProject/GitHowTo and
 noticed that it says It is customary in Git to go for small commits; if
 you have more than one file, commit them separately, with a descriptive
 commit message for each commit. For example, if you edit the Makefile.am
 file for DOC_LINGUAS or the LINGUAS file, it is good to commit the as

 However for me this sounds like contradicting very basic rule of version
 control usage that each commit should contain all logically relevant
 changes together. For example when committing initial translation, I
 think only sane solution is to commit first version of po file together
 with Makefile/LINGUAS change, because those belong logically together.

 However now Wiki instructs to work in different way. Are we really
 changing this kind of conventions to adhere some strange Git customs?

Considering that in git it will be OK to write one-line commit
messages (ChangeLog file is not necessary),
I think it is better to have

git commit Makefile.am -m Added LL to DOC_LINGUAS
git commit LL.po -m Added LL translation
git commit LL/figures/*.png -m Added screenshots

instead of

git commit Makefile.am LL.po LL/figures/*.png -m Added LL to
DOC_LINGUAS, added LL translation and screenshots
or even
git commit -a -m Added LL to DOC_LINGUAS, added LL translation and screenshots

There is a limit for the commit message of 72 characters so that
changelog summaries will appear neat.

These are my own suggestions and are open to debate.
I think it is good to have this discussion (or any git discussion) on
the list, since the switch to git will
take place in a few weeks.

Regards,
Simos
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Odd instructions for Git?

2009-04-04 Thread Luca Ferretti
2009/4/4 Simos simos.li...@googlemail.com:
 Considering that in git it will be OK to write one-line commit
 messages (ChangeLog file is not necessary),
 I think it is better to have

 git commit Makefile.am -m Added LL to DOC_LINGUAS
 git commit LL.po -m Added LL translation
 git commit LL/figures/*.png -m Added screenshots


Hmmm, I was sure the move to a DVCS was planned to make life
easier Maybe bzr can handle this case better?? :D
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Odd instructions for Git?

2009-04-04 Thread Claude Paroz
Le samedi 04 avril 2009 à 21:41 +0100, Simos a écrit :
 On Sat, Apr 4, 2009 at 8:27 PM, Tommi Vainikainen tvain...@gmail.com wrote:
  Hi,
 
  I was reading http://live.gnome.org/TranslationProject/GitHowTo and
  noticed that it says It is customary in Git to go for small commits; if
  you have more than one file, commit them separately, with a descriptive
  commit message for each commit. For example, if you edit the Makefile.am
  file for DOC_LINGUAS or the LINGUAS file, it is good to commit the as
 
  However for me this sounds like contradicting very basic rule of version
  control usage that each commit should contain all logically relevant
  changes together. For example when committing initial translation, I
  think only sane solution is to commit first version of po file together
  with Makefile/LINGUAS change, because those belong logically together.
 
  However now Wiki instructs to work in different way. Are we really
  changing this kind of conventions to adhere some strange Git customs?
 
 Considering that in git it will be OK to write one-line commit
 messages (ChangeLog file is not necessary),
 I think it is better to have
 
 git commit Makefile.am -m Added LL to DOC_LINGUAS
 git commit LL.po -m Added LL translation
 git commit LL/figures/*.png -m Added screenshots
 
 instead of
 
 git commit Makefile.am LL.po LL/figures/*.png -m Added LL to
 DOC_LINGUAS, added LL translation and screenshots
 or even
 git commit -a -m Added LL to DOC_LINGUAS, added LL translation and 
 screenshots
 
 There is a limit for the commit message of 72 characters so that
 changelog summaries will appear neat.
 
 These are my own suggestions and are open to debate.

No, commits should always contain all files containing logically related
modifications. Committing the Makefile.am modification without the
corresponding po has no sense. In your example, I would commit it as:
git commit Makefile.am LL.po LL/figures/*.png 
Then an editor will appear, and the commit message should contain one
short description line, and possibly a longer description on a second
paragraph:

Added LL help translation

LL added to DOC_LINGUAS, screenshots added in figures, ...

However, in this case I think the short description is enough. People
aren't stupid and they can easily figure out what happened and why files
has been added/modified through consulting the logs/diffs.

Claude

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Odd instructions for Git?

2009-04-04 Thread Simos
On Sat, Apr 4, 2009 at 10:31 PM, Stéphane Raimbault
stephane.raimba...@gmail.com wrote:
 2009/4/4 Claude Paroz cla...@2xlibre.net:
 No, commits should always contain all files containing logically related
 modifications. Committing the Makefile.am modification without the
 corresponding po has no sense. In your example, I would commit it as:
 git commit Makefile.am LL.po LL/figures/*.png
 Then an editor will appear, and the commit message should contain one
 short description line, and possibly a longer description on a second
 paragraph:

 Added LL help translation

 LL added to DOC_LINGUAS, screenshots added in figures, ...

 However, in this case I think the short description is enough. People
 aren't stupid and they can easily figure out what happened and why files
 has been added/modified through consulting the logs/diffs.


 Yes, a commit must always be atomic (and so be easy to review or
 revert) and it's true for any VCS/DVCS able to handle changeset (SVN,
 git, hg, bzr, monotone, etc).

 Simos, please, could you revert this part in the wiki?

Hi Stéphane,

Feel free to make the correction as you see suitable.

Cheers,
Simos
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n