[PATCH/RFC] add: support saving the last n versions of the index

2013-08-04 Thread Nguyễn Thái Ngọc Duy
When you do git add foo, change foo and git add foo again, the previous foo version is still in the repository, but its SHA-1 may be lost. git fsck --lost-found may help, but it may take more time to find out which blob is the old foo. This patch adds support for saving old index files, so that

[PATCH] remote-hg: Fix cloning and sharing bug

2013-08-04 Thread Antoine Pelisse
6796d49 (remote-hg: use a shared repository store) introduced sharing repository capability, but it broke backward-compatibility with already existing repositories. Indeed, 6796d49 assumes that .git/hg/.hg (the shared repository) will exist if .git/hg exists. This can be false for already

Re: [PATCH v2 10/19] documentation: add documentation of the index-v5 file format

2013-08-04 Thread Duy Nguyen
On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +== Header + sig (32-bits): Signature: + The signature is { 'D', 'I', 'R', 'C' } (stands for dircache) + + vnr (32-bits): Version number: + The current supported versions are 2, 3, 4 and 5. + + ndir

Re: [PATCH] remote-hg: Fix cloning and sharing bug

2013-08-04 Thread Jörn Hees
Hi, On 4 Aug 2013, at 12:38, Antoine Pelisse apeli...@gmail.com wrote: […] I also decided to always clone local repositories because what Jörn Hees said makes sense: If you have a local clone of a big repository, and then want to add a slow remote, you would have to reclone everything. I

Re: [bug resolved] remotes-hg: timezones are transformed

2013-08-04 Thread Jörn Hees
Hi, On 4 Aug 2013, at 01:17, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, Aug 3, 2013 at 11:36 AM, Jörn Hees d...@joernhees.de wrote: it seems that if you use the 1.8.3.4 remote-helpers/git-remote-hg to clone a mercurial repo the timezone information of commits gets

Re: [PATCH] remote-hg: Fix cloning and sharing bug

2013-08-04 Thread Felipe Contreras
On Sun, Aug 4, 2013 at 5:38 AM, Antoine Pelisse apeli...@gmail.com wrote: 6796d49 (remote-hg: use a shared repository store) introduced sharing repository capability, but it broke backward-compatibility with already existing repositories. Indeed, 6796d49 assumes that .git/hg/.hg (the shared

Re: [PATCH] remote-hg: Fix cloning and sharing bug

2013-08-04 Thread Felipe Contreras
On Sun, Aug 4, 2013 at 7:17 AM, Jörn Hees d...@joernhees.de wrote: Hi, On 4 Aug 2013, at 12:38, Antoine Pelisse apeli...@gmail.com wrote: […] I also decided to always clone local repositories because what Jörn Hees said makes sense: If you have a local clone of a big repository, and then

Re: [PATCH] remote-hg: Fix cloning and sharing bug

2013-08-04 Thread Jörn Hees
On 4 Aug 2013, at 15:31, Felipe Contreras felipe.contre...@gmail.com wrote: git config --get-regexp '^remote.*.url' is probably more appropriate. Either way, I don't see why such a change should be in the same patch. +1 This is my solution: --- a/contrib/remote-helpers/git-remote-hg.py

Re: [PATCH] remote-hg: Fix cloning and sharing bug

2013-08-04 Thread Antoine Pelisse
--- a/contrib/remote-helpers/git-remote-hg.py +++ b/contrib/remote-helpers/git-remote-hg.py @@ -391,11 +391,22 @@ def get_repo(url, alias): os.makedirs(dirname) else: shared_path = os.path.join(gitdir, 'hg') -if not os.path.exists(shared_path): -

Re: [PATCH] remote-hg: Fix cloning and sharing bug

2013-08-04 Thread Felipe Contreras
On Sun, Aug 4, 2013 at 8:51 AM, Jörn Hees d...@joernhees.de wrote: On 4 Aug 2013, at 15:31, Felipe Contreras felipe.contre...@gmail.com wrote: This is my solution: --- a/contrib/remote-helpers/git-remote-hg.py +++ b/contrib/remote-helpers/git-remote-hg.py @@ -391,11 +391,22 @@ def

Re: [PATCH 2/3] hooks/post-receive-email: force log messages in UTF-8

2013-08-04 Thread Alexey Shumkin
On Fri, Aug 02, 2013 at 04:23:38PM -0700, Jonathan Nieder wrote: Git commands write commit messages in UTF-8 by default, but that default can be overridden by the [i18n] commitEncoding and logOutputEncoding settings. With such a setting, the emails written by the post-receive-email hook use a

Re: [PATCH] Add missing test file for UTF-16.

2013-08-04 Thread brian m. carlson
On Sun, Aug 04, 2013 at 09:31:01AM +0700, Duy Nguyen wrote: Tested-by: Duy Nguyen pclo...@gmai.com I think you're missing an l in the domain name there. and sorry, my bad. I think we need your sign-off in this patch. I just ran across it because I'm going through all the TODO tests and seeing

Re: [PATCH 1/2] submodule: fix confusing variable name

2013-08-04 Thread Jens Lehmann
Am 03.08.2013 20:14, schrieb Jonathan Nieder: brian m. carlson wrote: cmd_summary reads the output of git diff, but reads in the submodule path into a variable called name. Since this variable does not contain the name of the submodule, but the path, rename it to be clearer what data it

Re: [PATCH 2/3] hooks/post-receive-email: force log messages in UTF-8

2013-08-04 Thread Jonathan Nieder
Alexey Shumkin wrote: On Fri, Aug 02, 2013 at 04:23:38PM -0700, Jonathan Nieder wrote: 1. Log messages use the configured log output encoding, which is meant to be whatever encoding works best with local terminals (and does not have much to do with what encoding should be used

Re: [PATCH 2/2] submodule: don't print status output with ignore=all

2013-08-04 Thread Jens Lehmann
Am 03.08.2013 20:24, schrieb Jonathan Nieder: brian m. carlson wrote: git status prints information for submodules, but it should ignore the status of those which have submodule.name.ignore set to all. Fix it so that it does properly ignore those which have that setting either in

Re: [PATCH 1/2] submodule: fix confusing variable name

2013-08-04 Thread Fredrik Gustafsson
On Sun, Aug 04, 2013 at 07:34:48PM +0200, Jens Lehmann wrote: But we'll have to use sm_path here (like everywhere else in the submodule script), because we'll run into problems under Windows otherwise (see 64394e3ae9 for details). Apart from that the patch is fine. We're still using path= in

Re: [PATCH] git-p4: use p4 fstat to interpret View setting

2013-08-04 Thread kazuki saitoh
Hi, Pete Thank you reply. Your theory is: there is a client spec, and p4 knows how to interpret these things, so instead of figuring out and implementing the algorithms for %% and * and ... in git-p4, just ask p4 directly. That's right. It is simple way to get my purpose unless break