git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] Internationalization of git-gui

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 21, 2007, 14:22 UTC
Message-ID
<Pine.LNX.4.64.0707211427190.14781@racer.site>
In-Reply-To
<200707211433.29318.stimming@tuhh.de>
Hi,
On Sat, 21 Jul 2007, Christian Stimming wrote:
Show 5 quoted lines
> This patch starts over from before the first i18n patch has been applied 
> and takes into account all discussion with Shawn. Currently I don't 
> quite know how to apply these patches to the "mob" branch because one 
> would have to first revert those patches from me that have been applied 
> there... Thanks.

Usually you solve this by forcing a non-fastforwarding push. IOW you really revert part of the history. You would not even have had to call "git revert" or "git reset", since you started from a defined commit, d36cd968378cd3e509434b1b9f43f1417fdba57e.

_However_: Junio already pushed into the 'mob' branch, and if you would have forced a non-fastforwarding push, this commit would have been lost. At least from the repo's POV.

So the only real option that makes sense is for you to register as a user at repo.or.cz, send me your user name, and for me to add you as user so that you can push into your own branch easily.

FWIW, this is what I did with your patch series:
- I looked at the first diff to find out which version of git-gui.sh it 
  was based on:
	diff --git a/git-gui.sh b/git-gui.sh
	index c5ff7c8..0c5ca46 100755
	--- a/git-gui.sh
	+++ b/git-gui.sh
  Ah, okay, git-gui.sh was at c5ff7c8.  What commit was that?  Ask "git 
  log --raw":
	...
	commit d36cd968378cd3e509434b1b9f43f1417fdba57e
	Author: Shawn O. Pearce <spearce@spearce.org>
	Date:   Thu Jul 19 00:43:16 2007 -0400
	    git-gui: Avoid unnecessary global statements when possible
	    [commit message]
	:100755 100755 0aabfba... c5ff7c8... M  git-gui.sh
  Good.  So it is based on d36cd968.  (If my decorate patch would be in 
  'master', I could have told you an easy name like "shawn/master~3" or 
  some such).
- I started a new branch:
  git checkout -b christian-new d36cd968
- Then I saved all your mails into an own mbox with my mail program.  I 
  had to edit that mbox a little, since you sent the complete headers in 
  the body, not in the mail header.  So I just stripped all the 
  mail headers and only left the ones from the mail bodies.
- After that I applied the patches with
  git am -i <mbox-file>
  I like the interactive mode, especially since Pine likes to add a dummy 
  mail at the beginning of the mbox file, which I do not want to commit, 
  of course ;-)
- There were no conflicts at all, and just to see that nothing untoward 
  happened, I compared the diffstats with "git log --stat shawn/master.."
  Come to think of it, it's even easier to check the object name of the 
  new git-gui.sh: "git ls-files --stage" says
	...
	100755 95dac55[...] 0       git-gui.sh
  Worked.  (I could also have said "git log --raw" to see that.)
- Just a quick "make && ./git-gui" test.  Ooops:
	$ LC_ALL=C make
	Generating catalog po/de.msg
	msgfmt --statistics --tcl po/de.po -l de -d po/
	po/de.po:32:9: invalid multibyte sequence
	po/de.po:36:18: invalid multibyte sequence
	po/de.po:48:32: invalid multibyte sequence
	...
  Looking into line 32 I see an ISO-8859-1 'ü'.  But in the header it says 
  that it's UTF-8.  Just a quick try: change that to ISO-8859-1, and 
  'make' says:
	$ LC_ALL=C make
	Generating catalog po/de.msg
	msgfmt --statistics --tcl po/de.po -l de -d po/
	62 translated messages.
  Much better.
  Okay, let's fix that up.  First stash the changes:
	$ git stash encoding fix
  Then find out which commit added po/de.msg:
	$ git log -1 po/de.po
	...
	    Initial German translation [...]
  Now on to editing the patch series:
	$ git rebase -i HEAD~5
  Mark "Initial German translation [...]" with the command "edit" instead 
  of "pick".  Save, and wait for half a second.
	...
	You can amend the commit now, with
	        git commit --amend
  Apply the stashed changes, and make sure that it's what I want:
	$ git stash apply
	...
	$ git diff
	...
	-"Content-Type: text/plain; charset=UTF-8\n"
	+"Content-Type: text/plain; charset=ISO-8859-1\n"
	...
  Yes!  Amend the commit, and for good measure, sign off on it (after 
  reading it, of course):
	$ git commit --amend -s po/de.po
  Mention that the encoding was changed by me, so if it is wrong, it is 
  all my fault, not yours.
  Now finish "rebasing"...
	$ git rebase --continue
  Make sure that it works now:
	$ make libdir=$(pwd)/lib && ./git-gui
  Yep.  Everything's fine.
  (Usually I go through this procedure in less than 3 minutes, but today I 
  took more than double that, since I wrote this email explaining my 
  actions...)
- Push to repo.or.cz (which is my 'origin' remote):
	$ git push origin HEAD:refs/heads/christian-new
- Now for the real fun: rebase it on top of Shawn's new master:
	# I have installed a remote 'shawn' pointing to git-gui.git
	$ git fetch shawn
	$ git rebase shawn/master
	...
  Worked.  Just like that.  Brilliant.
- Let's just cherry-pick Junio's change, which is the latest commit in 
  origin/mob:
	$ git cherry-pick origin/mob
	Auto-merged Makefile
	CONFLICT (content): Merge conflict in Makefile
	Automatic cherry-pick failed.  After resolving the conflicts,
	mark the corrected paths with 'git-add <paths>'
	and commit the result.
	When commiting, use the option '-c 2d29ab2' to retain authorship 
	and message.
  Conflict in Makefile.  Okay, no problem, edit it.  Ah, of course, Shawn 
  asked for automatic inferring of the available languages, while Junio 
  added "ja".  Just take the current version (the version between "<<<<" 
  and "====").
	$ git add -u
	$ git commit -c 2d29ab2
- Make the current revision my new 'master'.  That branch already exists, 
  and I am on 'christian-new', though.  No problem:
	$ git branch -M christian-new master
  (But if you do that with "-M", which means _force_ rename, make sure 
  twice that this is really what you want.)
- Push it.
	$ git push origin +master
	...
	refs/heads/master: da7b699[...] -> cc2b761b[...]
  The "+" is necessary, since I rebased it...
  If there were more pushers than just me, I'd verify that da7b699 is 
  indeed the old state of my master:
	$ git reflog
	...
	d36cd96... HEAD@{20}: checkout: moving from master to christian-new
	da7b699... HEAD@{21}: commit [...]
  Yep.
Good.  Happy.

Ciao, Dscho

Previous: Christian StimmingNext: Junio C Hamano
Message 30 of 48 in “Re: [PATCH] Internationalization of git-gui”
  1. Brett SchwarzJul 19, 2007
  2. Shawn O. PearceJul 20, 2007
  3. Christian StimmingJul 20, 2007
  4. Shawn O. PearceJul 21, 2007
  5. Christian StimmingJul 21, 2007
  6. Shawn O. PearceJul 21, 2007
  7. Christian StimmingJul 21, 2007
  8. Christian StimmingJul 21, 2007
  9. Christian StimmingJul 21, 2007
  10. Christian StimmingJul 21, 2007
  11. Christian StimmingJul 21, 2007
  12. David KastrupJul 21, 2007
  13. Simon 'corecode' SchubertJul 21, 2007
  14. David KastrupJul 21, 2007
  15. Christian StimmingJul 21, 2007
  16. Christian StimmingJul 21, 2007
  17. David KastrupJul 21, 2007
  18. Christian StimmingJul 22, 2007
  19. Edgar ToernigJul 22, 2007
  20. Christian StimmingJul 23, 2007
  21. David KastrupJul 21, 2007
  22. Shawn O. PearceJul 22, 2007
  23. Junio C HamanoJul 22, 2007
  24. Christian StimmingJul 22, 2007
  25. Johannes SchindelinJul 22, 2007
  26. Christian StimmingJul 22, 2007
  27. Johannes SchindelinJul 22, 2007
  28. Shawn O. PearceJul 22, 2007
  29. Christian StimmingJul 22, 2007
  30. Johannes SchindelinJul 21, 2007
  31. Junio C HamanoJul 21, 2007
  32. Christian StimmingJul 21, 2007
  33. Johannes SchindelinJul 21, 2007
  34. Junio C HamanoJul 21, 2007
  35. Johannes SchindelinJul 21, 2007
  36. Christian StimmingJul 22, 2007
  37. Johannes SchindelinJul 22, 2007
  38. Add glossary that can be converted into a po file for each language.Christian Stimming, Jul 23, 2007
  39. Junio C HamanoJul 24, 2007
  40. Junio C HamanoJul 24, 2007
  41. Christian StimmingJul 24, 2007
  42. Johannes SchindelinJul 21, 2007
  43. Junio C HamanoJul 21, 2007
  44. Johannes SchindelinJul 21, 2007
  45. Shawn O. PearceJul 22, 2007
  46. Christian StimmingJul 23, 2007
  47. Shawn O. PearceJul 24, 2007
  48. Christian StimmingJul 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.