git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ilya Kantor <iliakan@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [git for translators] How to always generate conflicts for merges?
Date: Thu, 25 Jul 2019 20:42:09 +0300	[thread overview]
Message-ID: <15314A71-8121-428D-A62D-08E1C1AC0E1B@gmail.com> (raw)
In-Reply-To: <xmqqtvbaoysd.fsf@gitster-ct.c.googlers.com>

Hi Junio,

There's a repo for each language, with the same file structure.

For example, English version (upstream):
https://github.com/javascript-tutorial/en.javascript.info/blob/master/1-js/01-getting-started/1-intro/article.md

Japanese:
https://github.com/javascript-tutorial/ja.javascript.info/blob/master/1-js/01-getting-started/1-intro/article.md

As English version is updated, changes need to be delivered to translations.
That's done with "git pull upstream master" from translations.

As the text structure (paragraphs) is the same, usually merges give conflicts exactly in the places where English version changed.

Sometimes though, e.g. when a new chapter is added to upstream, the merge just goes through "successfully".

That's what I'd like to avoid, as all changes need to be human-controlled.

---
Ilya Kantor
https://javascript.info

> On 25 Jul 2019, at 19:37, Junio C Hamano <gitster@pobox.com> wrote:
> 
> Ilya Kantor <iliakan@gmail.com> writes:
> 
>> We're using Git to manage translations of an open-source book, and
>> most of time it works well. But there's also a problem.
>> 
>> When we pull changes from upstream (English) to translation
>> (e.g. Japanese), git auto-merges them.
>> 
>> Sometimes there conflicts, but not all the time.
>> 
>> For example, when a new file is added to English, it just gets
>> auto-merged into Japanese.  But all new changes must be
>> human-controlled, translated.
>> 
>> Is there a way to force git always generate a conflict, even if
>> changes could be auto-merged?
> 
> I am not sure what the workflow here and if it makes sense.  When
> you have a file, "chapter47.txt", whose original is in English, the
> translation projects (there are N of them, one for each language)
> will have their own "chapter47.txt" that has translated text in the
> same place?  It looks to me that, working that way, the project for
> translating into e.g. Japanese have no way to keep any of the
> original English version, in which case why are you even "merging"
> the English version in the first place?
> 
> I would have understood if the original "chapter47.txt" is translated
> into "chapter47_ja.txt" and friends, like "chapter47_fr.txt", all of
> which sit next to the original "chapter47.txt".  Then merging an
> updated version of the original from time to time would make perfect
> sense to me---that would give you a way to see what changed in the
> original (e.g. "git show --first-parent -m -p master chapter47.txt")
> to guide you find the places you would need to make corresponding
> changes to the variant of your language, e.g. "chapter47_??.txt".
> 


  reply	other threads:[~2019-07-25 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 13:42 [git for translators] How to always generate conflicts for merges? Ilya Kantor
2019-07-25 14:25 ` Santiago Torres Arias
2019-07-25 16:37 ` Junio C Hamano
2019-07-25 17:42   ` Ilya Kantor [this message]
2019-07-26 20:40     ` Sergey Lukashev

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=15314A71-8121-428D-A62D-08E1C1AC0E1B@gmail.com \
    --to=iliakan@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).