Re: [PATCH 2/3] remote-hg: allow invalid bookmarks in a few edge cases

2014-03-19 Thread Antoine Pelisse
Hi Max, Thank you for working on this. I believe it would be fair that you forget about patch 1/3 as you fix it in this patch (2/3). Also, I think it would be best NOT to integrate a patch (mine) that breaks a test, as it would make bisect harder to use. Thanks, Antoine On Wed, Mar 19, 2014 at 1

Re: [PATCH 2/3] remote-hg: allow invalid bookmarks in a few edge cases

2014-03-19 Thread Antoine Pelisse
together (or all > three even?), and edit the message. But I'd like to properly attribute that > you discovered the issue, so perhaps I can add something like "Reported-by: > Antoine Pelisse" or so? Yes, I think you can squash all three commits into one, and use the repor

Re: [PATCH v4 2/2] Rename suffixcmp() to ends_with() and invert its result

2013-11-19 Thread Antoine Pelisse
On Tue, Nov 19, 2013 at 10:04 PM, Christian Couder wrote: > To avoid spamming the list again, I am going to send the following > patches from the 86 patch long series to replace prefixcmp() with > starts_with(): > > [PATCH v2 00/86] replace prefixcmp() with starts_with() > [PATCH v2 01/86] strbuf:

Re: What's cooking in git.git (Nov 2013, #05; Thu, 21)

2013-11-23 Thread Antoine Pelisse
On Fri, Nov 22, 2013 at 1:19 AM, Junio C Hamano wrote: > * rh/remote-hg-bzr-updates (2013-11-18) 9 commits > (merged to 'next' on 2013-11-20 at a36f3c4) > + remote-bzr, remote-hg: fix email address regular expression > + test-hg.sh: help user correlate verbose output with email test > + test-

[PATCH] remote-hg: fix hg sharedpath when git clone is moved

2013-11-23 Thread Antoine Pelisse
reflect the new absolute path. Check mercurial sharedpath file when getting the local hg repository, and update it manually with the new path if necessary. Signed-off-by: Antoine Pelisse --- contrib/remote-helpers/git-remote-hg | 4 contrib/remote-helpers/test-hg.sh| 11 +++ 2

Re: [PATCH] remote-hg: fix hg sharedpath when git clone is moved

2013-11-23 Thread Antoine Pelisse
On Sat, Nov 23, 2013 at 1:38 PM, Antoine Pelisse wrote: > remote-hg is using a mercurial shared clone to store all remotes objects > in one place. Unfortunately, the sharedpath is stored as an absolute > path by mercurial, creating a dependency on the location of the git > reposito

Re: [PATCH] remote-hg: fix hg sharedpath when git clone is moved

2013-11-23 Thread Antoine Pelisse
On Sat, Nov 23, 2013 at 5:32 PM, Felipe Contreras wrote: > On Sat, Nov 23, 2013 at 6:38 AM, Antoine Pelisse wrote: >> remote-hg is using a mercurial shared clone to store all remotes objects >> in one place. Unfortunately, the sharedpath is stored as an absolute >> path by

[PATCH] Prevent buffer overflows when path is too long

2013-11-26 Thread Antoine Pelisse
longer path, simply use strbuf to build it. Reported-by: Wataru Noguchi Signed-off-by: Antoine Pelisse --- abspath.c| 10 -- diffcore-order.c | 14 +- unpack-trees.c | 2 ++ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/abspath.c b/abspath.c index

Re: How to pre-empt git pull merge error?

2013-11-27 Thread Antoine Pelisse
>> On Wed, 27 Nov 2013 15:17:27 + >> Pete Forman wrote: >> >>> I am looking for a way of detecting up front whether a git pull or git >>> merge would fail. The sort of script I want to perform is to update a >>> server. >>> >>> git fetch >>> git okay >>> stop server >>> backup

Can't connect to git-scm.com

2013-11-28 Thread Antoine Pelisse
Hello, Should we be worried by this behavior ? git-scm.com is returning 301 to www.git-scm.com (I don't remember that it was happening before) And www.git-scm.com is returning 200: Sorry, no Host found. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

Re: [PATCH] Prevent buffer overflows when path is too long

2013-11-29 Thread Antoine Pelisse
On Tue, Nov 26, 2013 at 8:50 PM, Junio C Hamano wrote: > Antoine Pelisse writes: > >> Some buffers created with PATH_MAX length are not checked when being >> written, and can overflow if PATH_MAX is not big enough to hold the >> path. > > Perhaps it is time to up

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Antoine Pelisse
On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer wrote: > Make git read the index file version 5 without complaining. > > This version of the reader reads neither the cache-tree > nor the resolve undo data, however, it won't choke on an > index that includes such data. > > Helped-by: Junio C Haman

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Antoine Pelisse
On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer wrote: > +static int verify_hdr(void *mmap, unsigned long size) > +{ > + uint32_t *filecrc; > + unsigned int header_size; > + struct cache_header *hdr; > + struct cache_header_v5 *hdr_v5; > + > + if (size < sizeof(struc

Re: [PATCH v4 09/24] ls-files.c: use index api

2013-11-30 Thread Antoine Pelisse
On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer wrote: > @@ -447,6 +463,7 @@ int cmd_ls_files(int argc, const char **argv, const char > *cmd_prefix) > struct dir_struct dir; > struct exclude_list *el; > struct string_list exclude_list = STRING_LIST_INIT_NODUP; > + s

Re: git-blame segfault

2013-12-02 Thread Antoine Pelisse
On Mon, Dec 2, 2013 at 1:57 PM, Markus Trippelsdorf wrote: > When git is compiled with current gcc and "-march=native" > git-blame segfaults: > > For example: > > % gdb --args /var/tmp/git/git-blame gcc/tree-object-size.c > ... > Program received signal SIGSEGV, Segmentation fault. > 0x00

Re: [PATCH 0/5] use starts_with() and ends_with()

2013-12-02 Thread Antoine Pelisse
On Mon, Dec 2, 2013 at 8:29 PM, Christian Couder wrote: > From: Junio C Hamano >> >> Jeff King writes: >> >>> On Sun, Dec 01, 2013 at 08:49:13AM +0100, Christian Couder wrote: >>> This is a new patch series along the lines Junio suggested in this thread: http://thread.gmane.o

Re: Please update grep in the Windows Git distro

2013-12-02 Thread Antoine Pelisse
On Mon, Dec 2, 2013 at 8:36 PM, Tom Byrer wrote: > Seems that grep.exe is too outdated for some scripts: > https://github.com/creationix/nvm/issues/75#issuecomment-13735767 -o is not an option of POSIX grep [1] and you should probably not rely on it for portable script. [1]: http://pubs.opengrou

Re: git-blame segfault

2013-12-03 Thread Antoine Pelisse
On Tue, Dec 3, 2013 at 9:45 AM, Markus Trippelsdorf wrote: > Should be fixed in gcc soon. For the curious, here is the assembler diff > (bad vs. good): Cool, Thanks. Good to know this has nothing to do with Git :-) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a

Re: Unexpected cherry-pick behaviour

2013-12-11 Thread Antoine Pelisse
On Wed, Dec 11, 2013 at 11:04 AM, Paulo Matos wrote: > On 10/12/2013 19:34, Junio C Hamano wrote: >> >> Perhaps immediately after "cherry-pick" stopped and asked your help >> to resolve the conflicts, running >> >> $ git checkout --conflicts=diff3 gcc/tree-ssa-threadedge.c >> >> and lookin

Re: [PATCH 3/4] remote-hg: fix 'shared path' path

2013-12-13 Thread Antoine Pelisse
On Sat, Dec 7, 2013 at 2:09 PM, Felipe Contreras wrote: > If the repository is moved, the absolute path of the shared repository > would fail. > > Make sure it's always up-to-date. > > Reported-by: Michael Davis > Signed-off-by: Felipe Contreras > --- > contrib/remote-helpers/git-remote-hg | 3

Re: Unexpected cherry-pick behaviour

2013-12-14 Thread Antoine Pelisse
On Wed, Dec 11, 2013 at 12:19 PM, Paulo Matos wrote: > On 11/12/2013 11:09, Antoine Pelisse wrote: >>> >>> >>> I don't know how to interpret the fact that the line you sent (with the >>> obvious --conflicts being --conflict) outputs nothing... >&

[PATCH] Prevent buffer overflows when path is too long

2013-12-14 Thread Antoine Pelisse
memory on each call. Note that prefix_filename() returns this static buffer so each callers should copy or use the string immediately (this is currently true). Reported-by: Wataru Noguchi Signed-off-by: Antoine Pelisse --- abspath.c| 16 +--- diffcore-order.c | 11

Re: Unexpected cherry-pick behaviour

2013-12-14 Thread Antoine Pelisse
On Sat, Dec 14, 2013 at 8:33 PM, Junio C Hamano wrote: > Antoine Pelisse writes: > >> If you only want to see the diff applied to master, you >> should run: >> >> $ git diff --ours > > Does "git diff HEAD" have the same/similar effect? Yes, it d

Re: [PATCH v2 01/21] path.c: avoid PATH_MAX as buffer size from get_pathname()

2013-12-15 Thread Antoine Pelisse
On Sun, Dec 15, 2013 at 10:02 AM, Duy Nguyen wrote: > On Sun, Dec 15, 2013 at 3:35 PM, Torsten Bögershausen wrote: >> If we really want to go away from PATH_MAX, is a hard-coded value of 4096 so >> attractive ? >> Because we can either >> >> a) Re-define PATH_MAX in git-compat-util.h >> b) Use a

Re: [PATCH 2/3] prune_object_dir(): verify that path fits in the temporary buffer

2013-12-17 Thread Antoine Pelisse
On Tue, Dec 17, 2013 at 2:43 PM, Michael Haggerty wrote: > Dimension the buffer based on PATH_MAX rather than a magic number, and > verify that the path fits in it before continuing. > > Signed-off-by: Michael Haggerty > --- > > I don't think that this problem is remotely exploitable, because the

Re: [PATCH v4 2/3] diff: Let "git diff -O" read orderfile from any file, fail properly

2013-12-17 Thread Antoine Pelisse
On Tue, Dec 17, 2013 at 6:54 PM, Junio C Hamano wrote: > Samuel Bronson writes: > >> On Mon, Dec 16, 2013 at 4:32 PM, Junio C Hamano wrote: >>> Samuel Bronson writes: >>> for i in 1 2 do test_expect_success "orderfile using option ($i)" ' git diff -Oorder_file_

Re: git add -A fails in empty repository since 1.8.5

2013-12-18 Thread Antoine Pelisse
FWIW, git-bisect points to 84b8b5d (that is $gmane/230349). On Wed, Dec 18, 2013 at 9:06 AM, Thomas Ferris Nicolaisen wrote: > This was discussed on the Git user list recently [1]. > > #in a repo with no files >> git add -A > fatal: pathspec '.' did not match any files > > The same goes for git a

[PATCH] remote-hg: test 'shared_path' in a moved clone

2013-12-23 Thread Antoine Pelisse
Since e71d1378 (remote-hg: fix 'shared path' path, 2013-12-07), Mercurial 'shared_path' file is correctly updated whenever a clone is moved. Make sure it keeps working, especially as this is depending on a private Mercurial file. Signed-off-by: Antoine Pelisse --- contrib

[PATCH] remote-hg: do not fail on invalid bookmarks

2013-12-29 Thread Antoine Pelisse
reference. Warn the user about the invalid reference, and continue the import, instead of stopping right away. Signed-off-by: Antoine Pelisse --- contrib/remote-helpers/git-remote-hg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-h

Re: [PATCH] remote-hg: do not fail on invalid bookmarks

2013-12-29 Thread Antoine Pelisse
On Sun, Dec 29, 2013 at 11:24 PM, Mike Hommey wrote: > On Sun, Dec 29, 2013 at 12:30:02PM +0100, Antoine Pelisse wrote: >> Mercurial can have bookmarks pointing to "nullid" (the empty root >> revision), while Git can not have references to it. >> When cloni

Re: [PATCH] remote-hg: do not fail on invalid bookmarks

2014-01-06 Thread Antoine Pelisse
Thanks for noticing, I can reproduce at work, I will try to come-up with an improved version soon, Cheers, Antoine On Mon, Jan 6, 2014 at 2:52 PM, Torsten Bögershausen wrote: > On 2013-12-29 12.30, Antoine Pelisse wrote: >> Mercurial can have bookmarks pointing to "nullid&qu

Re: What's cooking in git.git (Aug 2013, #06; Tue, 27)

2013-08-27 Thread Antoine Pelisse
On Tue, Aug 27, 2013 at 9:22 PM, Junio C Hamano wrote: > * jh/remote-hg-fetch-fix (2013-07-25) 2 commits > (merged to 'next' on 2013-07-25 at 33161ad) > + Revert "remotes-hg: bugfix for fetching non local remotes" > (merged to 'next' on 2013-07-24 at 9c96641) > + remotes-hg: bugfix for fetch

Re: [PATCH 1/8] remote-bzr: fix export of utf-8 authors

2013-08-28 Thread Antoine Pelisse
On Wed, Aug 28, 2013 at 10:48 PM, Felipe Contreras wrote: > On Wed, Aug 28, 2013 at 3:05 PM, Matthieu Moy > wrote: >> Felipe Contreras writes: >> >>> + echo greg >> content && >>> + git add content && >>> + git commit -m one >> >> test_commit would make it shorter. > > And it would m

Re: Re* [PATCH 1/8] remote-bzr: fix export of utf-8 authors

2013-08-29 Thread Antoine Pelisse
On Thu, Aug 29, 2013 at 11:24 PM, Junio C Hamano wrote: > -- >8 -- > Subject: [PATCH 9/8] contrib/remote-helpers: style updates for test scripts > > During the review of the main series it was noticed that these test > scripts can use updates to conform to our coding style better, but > fixing the

Re: [PATCH] mingw-multibyte: fix memory acces violation and path length limits.

2013-10-03 Thread Antoine Pelisse
I've not followed the thread so much but, in that entry.c::checkout_entry,() we do: memcpy(path, state->base_dir, len); strcpy(path + len, ce->name); which can of course result in memory violation if PATH is not long enough. On Thu, Oct 3, 2013 at 12:26 AM, Wataru Noguchi wrote: > Hi, > > At la

Re: Git tag output order is incorrect (IMHO)

2013-10-16 Thread Antoine Pelisse
On Wed, Oct 16, 2013 at 7:56 PM, Jeff King wrote: > On Sun, Sep 08, 2013 at 04:03:11AM -0400, Jeff King wrote: > >> > I have some free time to come, and would like to work on that feature. >> > Does the offer still hold ? >> > If it does, I would be interested in your patches. >> >> I'm sorry I ha

Re: [RFC/PATCH] doc: git-foo was obsoleted several years ago

2013-10-17 Thread Antoine Pelisse
On Thu, Oct 17, 2013 at 1:13 PM, Jakub Narębski wrote: >> Felipe Contreras writes: >>> diff --git a/Documentation/git-checkout.txt >>> b/Documentation/git-checkout.txt >>> index ca118ac..8d98383 100644 >>> --- a/Documentation/git-checkout.txt >>> +++ b/Documentation/git-checkout.txt >>> @@ -1,9 +

BUG: PATHSPEC_PREFER_CWD requires arguments

2013-10-18 Thread Antoine Pelisse
Hello, I ran into the following bug today: "BUG: PATHSPEC_PREFER_CWD requires arguments". It's not that bad because I'm trying to run `git log --merge` on an already resolved conflict. Still, I don't think I should hit a "BUG:" :-) Here is a script to reproduce: git init . >a git add a git commit

[PATCH] remote-hg: unquote C-style paths when exporting

2013-10-18 Thread Antoine Pelisse
h ". It has been tested with quotes, spaces, and utf-8 encoded file-names. Signed-off-by: Antoine Pelisse --- contrib/remote-helpers/git-remote-hg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 92d994e..014

[PATCH] Prevent buffer overflows when path is too big

2013-10-19 Thread Antoine Pelisse
Noguchi Signed-off-by: Antoine Pelisse --- abspath.c| 10 +++--- diffcore-order.c | 2 +- entry.c | 14 ++ unpack-trees.c | 2 ++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/abspath.c b/abspath.c index 64adbe2..0e60ba4 100644 --- a/abspath.c

Re: [msysGit] [PATCH] Prevent buffer overflows when path is too big

2013-10-20 Thread Antoine Pelisse
My main motive was to not *stop* the process when a long path is met. Because somebody created a repository on Linux with a long file-name doesn't mean you should not be able to clone it *at all* on Windows. On Sun, Oct 20, 2013 at 12:33 PM, Duy Nguyen wrote: > On Sun, Oct 20, 2013 at 12:47 PM, T

Re: [PATCH] remote-hg: unquote C-style paths when exporting

2013-10-22 Thread Antoine Pelisse
On Tue, Oct 22, 2013 at 9:13 PM, Junio C Hamano wrote: > Antoine Pelisse writes: > >> git-fast-import documentation says that paths can be C-style quoted. >> Unfortunately, the current remote-hg helper doesn't unquote quoted >> path and pass them as-is to Mercuri

Re: [PATCH] remote-hg: unquote C-style paths when exporting

2013-10-23 Thread Antoine Pelisse
On Wed, Oct 23, 2013 at 2:45 AM, Felipe Contreras wrote: > On Tue, Oct 22, 2013 at 3:49 PM, Antoine Pelisse wrote: > >> It is true that I have expected "valid output" from git-fast-export. >> And I don't have in mind any easy solution to detect that the output &g

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Antoine Pelisse
On Wed, Oct 23, 2013 at 2:55 PM, Nguyễn Thái Ngọc Duy wrote: > The old code does not do boundary check so any paths longer than > PATH_MAX can cause buffer overflow. Replace it with strbuf to handle > paths of arbitrary length. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > To get this topic go

Re: [PATCH 1/2] entry.c: convert checkout_entry to use strbuf

2013-10-23 Thread Antoine Pelisse
On Wed, Oct 23, 2013 at 3:04 PM, Duy Nguyen wrote: > On Wed, Oct 23, 2013 at 7:58 PM, Antoine Pelisse wrote: >>> diff --git a/entry.c b/entry.c >>> index acc892f..d955af5 100644 >>> --- a/entry.c >>> +++ b/entry.c >>> @@ -237,16 +237,18 @@

Re: Re* [PATCH] remote-hg: unquote C-style paths when exporting

2013-10-23 Thread Antoine Pelisse
On Wed, Oct 23, 2013 at 5:44 PM, Junio C Hamano wrote: > Antoine Pelisse writes: > >>> def c_style_unescape(string): >>> if string[0] == string[-1] == '"': >>> return string.decode('string-escape')[1:-1] >>>

Re: Feature request: "author branch" in commit object

2013-07-03 Thread Antoine Pelisse
On Tue, Jul 2, 2013 at 10:34 PM, Ed Hutchins wrote: > On the other hand > trying to figure > out the history of events from a large directed graph of commits > without any clue about > what topics first spawned each commit is actively harmful in many > cases (trying to display > a clear history of

Re: git gui replaces amend message when prepare-commit-msg hook is used

2013-07-04 Thread Antoine Pelisse
>> Your problem is that your hook script is not checking $2 so it is >> overwriting the message even when you do not want to do so. > > No, it isn't. Not by git-gui at least. Check /tmp/hook.log with the > hook I provided... So what you mean is that the hook is not executed with the correct parame

Re: git gui replaces amend message when prepare-commit-msg hook is used

2013-07-05 Thread Antoine Pelisse
On Thu, Jul 4, 2013 at 2:46 PM, Orgad Shaneh wrote: > On Thu, Jul 4, 2013 at 3:42 PM, Antoine Pelisse wrote: >>>> Your problem is that your hook script is not checking $2 so it is >>>> overwriting the message even when you do not want to do so. >>> >&

Re: t0008 hang on streaming test (OS X)

2013-07-10 Thread Antoine Pelisse
On Wed, Jul 10, 2013 at 6:36 PM, Brian Gernhardt wrote: > I am somewhat stuck on how to fix it. Any ideas? I don't have anything to reproduce here, but usually I start investigating this kind of problems by attaching the hung process with gdb to see the current state (if it's stuck in a specific

Re: [RFC/PATCH 1/4] builtin: add git-check-mailmap command

2013-07-10 Thread Antoine Pelisse
On Wed, Jul 10, 2013 at 9:03 PM, Eric Sunshine wrote: > +static void check_mailmap(struct string_list *mailmap, const char *contact) > +{ > + const char *name, *mail; > + size_t namelen, maillen; > + struct ident_split ident; > + char term = null_out ? '\0' : '\n'; > + > +

Re: [PATCH] [SIGNED-OFF] remotes-hg: bugfix for fetching non local remotes

2013-07-24 Thread Antoine Pelisse
On Tue, Jul 23, 2013 at 11:40 PM, Joern Hees wrote: > 6796d49 introduced a bug by making shared_path == ".git/hg' which > will most likely exist already, causing a new remote never to be > cloned and subsequently causing hg.share to fail with error msg: > "mercurial.error.RepoError: repository .gi

Re: [PATCH] [SIGNED-OFF] remotes-hg: bugfix for fetching non local remotes

2013-07-24 Thread Antoine Pelisse
On Wed, Jul 24, 2013 at 11:59 AM, Jörn Hees wrote: > On 24.07.2013, at 10:52, Antoine Pelisse wrote: >> I think the best way would be to create the shared repository in >> .git/hg/$share, with $share being a path that can't be a remote name >> (so that it doesn't c

Re: [PATCH v3] remotes-hg: bugfix for fetching non local remotes

2013-07-25 Thread Antoine Pelisse
On Thu, Jul 25, 2013 at 9:12 PM, Felipe Contreras wrote: > Besides, I don't see > the point of having a '.shared/.hg' directory, and nothing else on > that '.shared' folder. Is it not already true about the ".git/hg/$alias/clone/" directory ? > So, here's my patch. If only Junio read them. > > S

Re: [PATCH v3] remotes-hg: bugfix for fetching non local remotes

2013-07-25 Thread Antoine Pelisse
On Thu, Jul 25, 2013 at 10:40 PM, Felipe Contreras wrote: > That's true. Maybe something like: > > for x in repos: > local_hg = os.path.join(shared_path, x, 'clone', '.hg') > if os.path.exists(local_hg): > shutil.copytree(local_hg, hg_path) > break I think that would work, but I think

Re: [PATCH 2/2] Don't close pack fd when free'ing pack windows

2013-07-31 Thread Antoine Pelisse
On Wed, Jul 31, 2013 at 9:51 PM, Brandon Casey wrote: > --- > This email message is for the sole use of the intended recipient(s) and may > contain > confidential information. Any unauthorized review, use, disclosure

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

2013-08-04 Thread Antoine Pelisse
. Reported-by: Joern Hees Suggested-by: Felipe Contreras Signed-off-by: Antoine Pelisse --- Hey, OK, I think this version will work in all cases. Either you clone local and then remote, or remote and then local, or old version local and then remote, or old version remote and then local: You

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): > -

[PATCH] remote-hg: add shared repo upgrade

2013-08-05 Thread Antoine Pelisse
From: Felipe Contreras 6796d49 (remote-hg: use a shared repository store) introduced a bug by making the shared repository '.git/hg', which is already used before that patch, so clones that happened before that patch, fail after that patch, because there's no shared Mercurial repo. It's trivial

[PATCH] remote-hg: add shared repo upgrade

2013-08-05 Thread Antoine Pelisse
. It's trivial to upgrade to the new organization by copying the Mercurial repo from one of the remotes (e.g. 'origin'), so let's do so. Reported-by: Joern Hees Signed-off-by: Felipe Contreras Signed-off-by: Antoine Pelisse --- contrib/remote-helpers/git-remote-hg | 21 ++

Re: [PATCH] remote-hg: add shared repo upgrade

2013-08-05 Thread Antoine Pelisse
On Mon, Aug 5, 2013 at 9:31 PM, Felipe Contreras wrote: > On Mon, Aug 5, 2013 at 2:22 PM, Antoine Pelisse wrote: >> From: Felipe Contreras >> >> 6796d49 (remote-hg: use a shared repository store) introduced a bug by >> making the shared repository '.git/hg',

[PATCH] remote-hg: fix path when cloning with tilde expansion

2013-08-05 Thread Antoine Pelisse
Fix that by using python os.path.expanduser method. Signed-off-by: Antoine Pelisse --- contrib/remote-helpers/git-remote-hg |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 02404dc..4bbd296 1

Re: [PATCH] remote-hg: fix path when cloning with tilde expansion

2013-08-05 Thread Antoine Pelisse
On Mon, Aug 5, 2013 at 10:30 PM, Felipe Contreras wrote: > On Mon, Aug 5, 2013 at 3:12 PM, Antoine Pelisse wrote: >> $ git clone hg::~/my/repository && cd repository && git fetch >> >> Fix that by using python os.path.expanduser method. > > Shouldn

Re: [PATCH] remote-hg: add shared repo upgrade

2013-08-05 Thread Antoine Pelisse
On Mon, Aug 5, 2013 at 11:02 PM, Junio C Hamano wrote: > Antoine Pelisse writes: > Is the untold > and obvious-to-those-who-are-familiar-with-this-codepath assumption > that it is guaranteed that there is at most one "*/clone/.hg" under > shared_path? No, there is no

Re: [PATCH] remote-hg: add shared repo upgrade

2013-08-05 Thread Antoine Pelisse
On Tue, Aug 6, 2013 at 8:36 AM, Junio C Hamano wrote: > Antoine Pelisse writes: > Quoting that part I was asking about again: > >> +# check and upgrade old organization >> +hg_path = os.path.join(shared_path, '.hg') >> +i

Re: [PATCH 3/4] pack-objects: do not print usage when repacking

2013-08-07 Thread Antoine Pelisse
On Wed, Aug 7, 2013 at 4:00 PM, Stefan Beller wrote: > --- > builtin/pack-objects.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c > index 1742ea1..0bd8f3b 100644 > --- a/builtin/pack-objects.c > +++ b/builtin/pack-objects.

[PATCH 1/2] remote-hg: add shared repo upgrade

2013-08-09 Thread Antoine Pelisse
. It's trivial to upgrade to the new organization by copying the Mercurial repo from one of the remotes (e.g. 'origin'), so let's do so. If we can't find any existing repo, we create an empty one. Reported-by: Joern Hees Signed-off-by: Felipe Contreras Signed-off-

[PATCH] remote-hg: fix path when cloning with tilde expansion

2013-08-09 Thread Antoine Pelisse
tch Expand the tilde when checking if the path is absolute, so that we don't fix a path that doesn't need to be. Signed-off-by: Antoine Pelisse --- On Mon, Aug 5, 2013 at 10:30 PM, Felipe Contreras wrote: > Shouldn't that be the job of the shell? (s/~/$HOME/) I'm not sure wh

Re: [PATCH] remote-hg: fix path when cloning with tilde expansion

2013-08-09 Thread Antoine Pelisse
On Fri, Aug 9, 2013 at 8:49 PM, Junio C Hamano wrote: > Antoine Pelisse writes: >> On Mon, Aug 5, 2013 at 10:30 PM, Felipe Contreras >> wrote: >>> Shouldn't that be the job of the shell? (s/~/$HOME/) >> >> I'm not sure what you mean here. Doe

Re: [PATCH 2/2] remote-hg: add shared repo upgrade

2013-08-09 Thread Antoine Pelisse
On Fri, Aug 9, 2013 at 10:03 PM, Felipe Contreras wrote: > 6796d49 (remote-hg: use a shared repository store) introduced a bug by > making the shared repository '.git/hg', which is already used before > that patch, so clones that happened before that patch, fail after that > patch, because there's

Re: [PATCH] remote-hg: fix path when cloning with tilde expansion

2013-08-09 Thread Antoine Pelisse
Confusion everywhere :-) On Fri, Aug 9, 2013 at 10:53 PM, Junio C Hamano wrote: > Antoine Pelisse writes: > >> So when we run: >> >> git clone hg::~/my/repo >> >> Git will remove the "hg::" part, and Mercurial will expand tilde and >> c

Re: [PATCH] remote-hg: fix path when cloning with tilde expansion

2013-08-09 Thread Antoine Pelisse
On Fri, Aug 9, 2013 at 11:45 PM, Junio C Hamano wrote: > OK, so clone works, but subsequent fetch from the cloned resoitory > does not? "git fetch hg::~/my_repo" will still work but the call to > "git config" done near the place your patch touches does not store > "hg::~/my_repo" because it think

Re: [PATCH] remote-hg: fix path when cloning with tilde expansion

2013-08-10 Thread Antoine Pelisse
On Sat, Aug 10, 2013 at 9:07 AM, Felipe Contreras wrote: > On Sat, Aug 10, 2013 at 1:50 AM, Junio C Hamano wrote: >> Felipe Contreras writes: >> >>> If I clone ~/git, and then change my username, and move my home >>> directory, doing a 'git fetch' in ~/git wouldn't work anymore, because >>> we h

Re: [PATCH v2 0/2] remote-hg: shared repo upgrade fix

2013-08-10 Thread Antoine Pelisse
break > +if not os.path.exists(hg_path): > +shutil.move(local_hg, hg_path) > +shutil.rmtree(os.path.join(shared_path, x, 'clone')) > > # setup shared repo (if not there) > try: FWIW, Reviewed-by: Antoine Pelisse

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Antoine Pelisse
On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller wrote: > builtin/repack.c | 410 > + > contrib/examples/git-repack.sh | 194 +++ > git-repack.sh | 194 --- I'm still not sure I understand the tr

Re: Git tag output order is incorrect (IMHO)

2013-08-20 Thread Antoine Pelisse
On Sat, Jul 20, 2013 at 2:22 AM, Jeff King wrote: > I do plan to finish it eventually, but if anyone else feels like picking > it up, I'd be glad to review patches and/or share my work-in-progress as > a starting point. Hi Jeff, I have some free time to come, and would like to work on that featur

Re: [PATCH] stream_to_pack: xread does not guarantee to read all requested bytes

2013-08-20 Thread Antoine Pelisse
On Tue, Aug 20, 2013 at 5:00 PM, Junio C Hamano wrote: > Johannes Sixt writes: > >> The deflate loop in bulk-checkin::stream_to_pack expects to get all bytes >> from a file that it requests to read in a single function call. But it >> used xread(), which does not give that guarantee. Replace it b

[PATCH] git-commit: search author pattern against mailmap

2013-08-23 Thread Antoine Pelisse
w git-commit to find if an entry exists in mailmap file for that pattern, and use that instead. Signed-off-by: Antoine Pelisse --- Hi, I would use that feature at work where I happen to commit some work for other colleagues, while we heavily rely on mailmap file to have decent indents. On the

Re: How to set tab size for hunks in “git add -p”?

2013-08-23 Thread Antoine Pelisse
On Fri, Aug 23, 2013 at 7:28 PM, Янчарук Александр wrote: > But those settings seems does not affect on |git add -p|. How to set tab > size for hunks in *git add -p* command? That's because "git add -p" doesn't go through less/pager. You can certainly change the tabs size for your terminal with "

Re: [PATCH] git-commit: search author pattern against mailmap

2013-08-23 Thread Antoine Pelisse
On Fri, Aug 23, 2013 at 9:03 PM, Junio C Hamano wrote: > OK, so how about labelling it as a bugfix, like this perhaps? We > obviously need a test or two, though. OK, I will resubmit tomorrow with some tests. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a messa

[PATCH] commit: search author pattern against mailmap

2013-08-24 Thread Antoine Pelisse
c to find a matching existing author to honor the mailmap, and use the name and email after applying the mailmap. Signed-off-by: Antoine Pelisse --- builtin/commit.c | 7 ++- t/t4203-mailmap.sh | 11 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/builtin/commit.

contrib/credential/netrc/git-credential-netrc: Use of uninitialized value in string

2013-08-24 Thread Antoine Pelisse
You need a passphrase to unlock the secret key for user: "Antoine Pelisse " 2048-bit RSA key, ID DE2A8792, created 2010-12-31 (main key ID A066A853) gpg: encrypted with 2048-bit RSA key, ID DE2A8792, created 2010-12-31 "Antoine Pelisse " compare host [smtp.gmail.com:587]

Re: [PATCH] commit: search author pattern against mailmap

2013-08-25 Thread Antoine Pelisse
On Sun, Aug 25, 2013 at 7:16 AM, Junio C Hamano wrote: > Jeff King writes: >> Do we need to clear_mailmap before returning to avoid a leak? > > Good question. What I queued yesterday seems to have a call to > clear_mailmap(&mailmap) before that return. Indeed, the version you queued has clear_ma

[PATCH] commit: search author pattern against mailmap

2013-08-25 Thread Antoine Pelisse
c to find a matching existing author to honor the mailmap, and use the name and email after applying the mailmap. Signed-off-by: Antoine Pelisse --- Hey, So I kept clear_mailmap() where you put it, but I think it could be moved right after get_revision(). That is because I think format_commit_messag

Re: [PATCH] commit: search author pattern against mailmap

2013-08-25 Thread Antoine Pelisse
On Sun, Aug 25, 2013 at 12:30 PM, Jeff King wrote: > On Sun, Aug 25, 2013 at 12:01:29PM +0200, Antoine Pelisse wrote: > >> So I kept clear_mailmap() where you put it, but I think it could be moved >> right after get_revision(). That is because I think format_commit_message() &

Re: [PATCH] commit: search author pattern against mailmap

2013-08-25 Thread Antoine Pelisse
On Sun, Aug 25, 2013 at 6:51 PM, Jeff King wrote: > On Sun, Aug 25, 2013 at 03:37:24PM +0200, Antoine Pelisse wrote: > >> So we would stop passing mailmap string_list along down to map_user(), >> and the mailmap file (or blob) would be read the first time it's >> n

[PATCH] diff: Fixes shortstat number of files

2012-11-22 Thread Antoine Pelisse
at doesn't. Signed-off-by: Antoine Pelisse --- diff.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index e89a201..5c6bcbd 100644 --- a/diff.c +++ b/diff.c @@ -1704,9 +1704,8 @@ static void show_shortstats(struct diffstat_t *data, struct diff_

[PATCH] diff: Fixes shortstat number of files

2012-11-22 Thread Antoine Pelisse
at doesn't. Signed-off-by: Antoine Pelisse --- diff.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index e89a201..5c6bcbd 100644 --- a/diff.c +++ b/diff.c @@ -1704,9 +1704,8 @@ static void show_shortstats(struct diffstat_t *data, struct diff_

[PATCH] diff: Fixes shortstat number of files

2012-11-23 Thread Antoine Pelisse
at doesn't. Signed-off-by: Antoine Pelisse --- diff.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index e89a201..5c6bcbd 100644 --- a/diff.c +++ b/diff.c @@ -1704,9 +1704,8 @@ static void show_shortstats(struct diffstat_t *data, struct diff_

[PATCH] fast-export: Allow pruned-references in mark file

2012-11-24 Thread Antoine Pelisse
references have been removed by prune because some marks will refer to non-existing commits. Let's warn when we have a mark for a commit we don't know. Also, increment the last_idnum before, so we don't override the mark. Signed-off-by: Antoine Pelisse --- builtin/fast-export.c | 11

[PATCH] Fix typo in remote set-head usage

2012-11-25 Thread Antoine Pelisse
parenthesis are not matching in `builtin_remote_sethead_usage` as a square bracket is closing something never opened. --- This will also break all translation files, should I also send a patch to update them ? Cheers, Antoine Pelisse builtin/remote.c |2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] diff: Fixes shortstat number of files

2012-11-26 Thread Antoine Pelisse
bly should the way it's done in stat. That is with something like this: if (!data->files[i]->is_interesting && (added + deleted == 0)) { continue; } Cheers, Antoine Pelisse -- Forwarded message -- From: Junio C Ha

Re: [PATCH] fast-export: Allow pruned-references in mark file

2012-11-26 Thread Antoine Pelisse
On Mon, Nov 26, 2012 at 12:37 PM, Felipe Contreras wrote: > On Mon, Nov 26, 2012 at 5:03 AM, Junio C Hamano wrote: >> Is this a safe and sane thing to do, and if so why? Could you >> describe that in the log message here? > Why would fast-export try to export something that was pruned? Doesn't >

Re: [PATCH] fast-export: Allow pruned-references in mark file

2012-11-26 Thread Antoine Pelisse
> If that's the case, I don't think it should throw a warning even just skip > them. Removing the warning seems fine to me. > Then, in the actual export if some of these objects are referenced the > export would fail anyway (but they won't). Of course it will fail to export anything that requir

[PATCH] Fix typo in remote set-head usage

2012-11-26 Thread Antoine Pelisse
parenthesis are not matching in `builtin_remote_sethead_usage` as a square bracket is closing something never opened. Signed-off-by: Antoine Pelisse --- builtin/remote.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/remote.c b/builtin/remote.c index a5a4b23

Re: [PATCH] fast-export: Allow pruned-references in mark file

2012-11-26 Thread Antoine Pelisse
> I am not sure I follow the above, but anyway, I think the patch does > is safe because (1) future "fast-export" will not refer to these > pruned objects in its output (we have decided that these pruned > objects are not used anywhere in the history so nobody will refer to > them) and (2) we still

Re: [PATCH] fast-export: Allow pruned-references in mark file

2012-12-01 Thread Antoine Pelisse
> Yeah, I think I agree that you would need to make sure that the > other side does not use the revision marked with :2, once you retire > the object you originally marked with :2 by pruning. Shouldn't the > second export show :1 and :3 but not :2? It feels like a bug in the > exporter to me that t

Re: [PATCH 0/5] "diff --stat" counting fixes

2012-12-01 Thread Antoine Pelisse
Hi Junio, That does make a lot of sense and I would have indeed missed a couple of things here. I've been thinking about that "Unmerged" line quite a lot, and I can't get myself any good reason to keep it. Would you mind taking a couple of minutes to make it clear ? I feel like (but I can obviou

Re: Use of a mailmap file with git-log

2012-12-10 Thread Antoine Pelisse
Hi, I was thinking about that last week. It could indeed be very interesting to have mailmap applied to git-log and especially to git-log --author/--committer. My first look at the code let me think that we would need to change the parse_commit_buffer to replace, at reading time, the name of auth

[PATCH 0/5] Allow git log to use mailmap file

2012-12-11 Thread Antoine Pelisse
of the new option [1]: http://thread.gmane.org/gmane.comp.version-control.git/211270 Antoine Pelisse (5): Use split_ident_line to parse author and committer mailmap: Remove buffer length limit in map_user mailmap: Add mailmap structure to rev_info and pp pretty: Use mailmap to display

  1   2   3   >