[PATCH] builtin-commit.c: Not add duplicate S-o-b when commit

2012-07-26 Thread Jiang Xin
Scan the whole rfc2822 footer for duplicate S-o-b, not just the last line of the commit message. A commit may have multiple S-o-bs, or other tags, such as: some commit log... Signed-off-by: C O Mitter commit...@example.com Reported-by: R E Porter repor...@example.com Because the

[PATCH 2/2] difftool: Handle compare() returning -1

2012-07-26 Thread David Aguilar
Keep the temporary directory around when compare() cannot read its input files, which is indicated by -1. Defer tempdir creation to allow an early exit in setup_dir_diff(). Wrap the rest of the entry points in an exit_cleanup() function to handle removing temporary files and error reporting.

Test t/t7502-commit.sh failed

2012-07-26 Thread Jiang Xin
Test t/t7502-commit.sh failed. I guess it's commit v1.7.9.7-1-gf20f387 which breaks it. $ git log -1 --oneline --stat v1.7.9.7-1-gf20f387 f20f commit: check committer identity more strictly builtin/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Result of

Re: [PATCH] builtin-commit.c: Not add duplicate S-o-b when commit

2012-07-26 Thread Junio C Hamano
Jiang Xin worldhello@gmail.com writes: Scan the whole rfc2822 footer for duplicate S-o-b, not just the last line of the commit message. A commit may have multiple S-o-bs, or other tags, such as: some commit log... Signed-off-by: C O Mitter commit...@example.com

Re: [PATCH] builtin-commit.c: Not add duplicate S-o-b when commit

2012-07-26 Thread Jiang Xin
2012/7/26 Junio C Hamano gits...@pobox.com: After stating the observation like the above, please make it a habit to say which is bad because..., if you think it is a bad behaviour and the patch is about fixing it. Indead before I start, I examine git-commit and git-am, and find the behaviours

Re: [RFC 01/16] Implement a remote helper for svn in C.

2012-07-26 Thread Florian Achleitner
On Thursday 26 July 2012 02:46:07 Jonathan Nieder wrote: Hi, Florian Achleitner wrote: --- /dev/null +++ b/contrib/svn-fe/remote-svn.c @@ -0,0 +1,219 @@ + +#include cache.h +#include remote.h +#include strbuf.h +#include url.h +#include exec_cmd.h +#include run-command.h

Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.

2012-07-26 Thread Florian Achleitner
Hi! Most of this review went into the new version.. For the remaining points, some comments follow. On Monday 02 July 2012 06:07:41 Jonathan Nieder wrote: Hi, Florian Achleitner wrote: --- /dev/null +++ b/contrib/svn-fe/remote-svn.c @@ -0,0 +1,207 @@ + +#include stdlib.h

Re: [RFC 01/16] Implement a remote helper for svn in C.

2012-07-26 Thread Florian Achleitner
On Thursday 26 July 2012 03:14:43 Jonathan Nieder wrote: Florian Achleitner wrote: Yes, I incorporated your review in the new version, as far as applicable. But I didn't send you an answer on the detailed points. I will send an answer to the previous review .. Thanks. Now that I check,

Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.

2012-07-26 Thread Jonathan Nieder
Florian Achleitner wrote: Most of this review went into the new version.. For the remaining points, some comments follow. Thanks for this. On Monday 02 July 2012 06:07:41 Jonathan Nieder wrote: [...] + +static inline void printd(const char* fmt, ...) [...] Why not use trace_printf and

Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.

2012-07-26 Thread Steven Michalske
On Jul 2, 2012, at 4:07 AM, Jonathan Nieder jrnie...@gmail.com wrote: [...] diff: Use fifo instead of pipe: Retrieve the name of the pipe from env and open it for svndump. I'd prefer to avoid this if possible, since it means having to decide where the pipe goes on the filesystem. Can

[PATCH] i18n: leave \n out of translated diffstat

2012-07-26 Thread Nguyễn Thái Ngọc Duy
GETTEXT_POISON scrapes everything in translated strings, including \n. t4205.12 however needs this \n in matching the end result. Keep this \n out of translation to make t4205.12 happy. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- I haven't followed recent i18n patches closely.

Re: Test t/t7502-commit.sh failed

2012-07-26 Thread Jeff King
On Thu, Jul 26, 2012 at 02:27:52PM +0800, Jiang Xin wrote: Test t/t7502-commit.sh failed. I guess it's commit v1.7.9.7-1-gf20f387 which breaks it. $ git log -1 --oneline --stat v1.7.9.7-1-gf20f387 f20f commit: check committer identity more strictly builtin/commit.c | 2 +-

Re: False positive from orphaned_commit_warning() ?

2012-07-26 Thread Paul Gortmaker
On 12-07-25 05:52 PM, Junio C Hamano wrote: Paul Gortmaker paul.gortma...@windriver.com writes: Has anyone else noticed false positives coming from the orphan check? Thanks. This should fix it. Indeed it does. Thanks for the fix (and git in general). Paul. -- builtin/checkout.c |

[PATCH 0/5] test-lib: filesystem prerequisites

2012-07-26 Thread Michael J Gruber
This mini series provides and makes use of test prerequisites for case insensitivity, symlinks and unicode conversion. SYMLINKS existed before but was not used in t0050. CASE_INSENSITIVE_FS was defined in t0003 rather than test-lib (and redone in t0050). UTF8_NFD_TO_NFC did not exist but was

[PATCH 4/5] test-lib: provide UTF8 behaviour as a prerequisite

2012-07-26 Thread Michael J Gruber
UTF8 behaviour of the filesystem (conversion from nfd to nfc) plays a role in several tests and is tested in several tests. Therefore, move the test from t0050 into the test lib and use the prerequisite in t0050. Signed-off-by: Michael J Gruber g...@drmicha.warpmail.net --- t/README

[PATCH 2/5] t0050: use the CASE_INSENSITIVE_FS test prereq

2012-07-26 Thread Michael J Gruber
Signed-off-by: Michael J Gruber g...@drmicha.warpmail.net --- t/t0050-filesystem.sh | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh index 1542cf6..df9498b 100755 --- a/t/t0050-filesystem.sh +++

Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.

2012-07-26 Thread Jonathan Nieder
(cc-ing Ram since he's also knowledgeable about remote-helper protocol) Florian Achleitner wrote: On Thursday 26 July 2012 06:40:39 Jonathan Nieder wrote: Though I still think the way forward is to keep using plain pipes internally for now

Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.

2012-07-26 Thread Florian Achleitner
On Thursday 26 July 2012 04:08:42 Jonathan Nieder wrote: Florian Achleitner wrote: On Monday 02 July 2012 06:07:41 Jonathan Nieder wrote: [...] + +static inline void printd(const char* fmt, ...) [...] Why not use trace_printf and avoid the complication? Hm.. I tried. It

Re: [PATCH 1/3] retain reflogs for deleted refs

2012-07-26 Thread Alexey Muranov
On 26 Jul 2012, at 14:47, Nguyen Thai Ngoc Duy wrote: So we haven't found any way to present both branches foo and foo/bar on file system at the same time. How about when we a new branch introduces such a conflict, we push the new branch directly to packed-refs? If we need either of them on a

Re: Test t/t7502-commit.sh failed

2012-07-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Jul 26, 2012 at 02:27:52PM +0800, Jiang Xin wrote: ... not ok - 21 committer is automatic # # # echo negative # ( # sane_unset GIT_COMMITTER_EMAIL # sane_unset

Re: Test t/t7502-commit.sh failed

2012-07-26 Thread Jeff King
On Thu, Jul 26, 2012 at 09:34:27AM -0700, Junio C Hamano wrote: not ok - 21 committer is automatic [...] I am not sure that the test is really all that useful. The point seems to be that we fall back to some kind of system-based ident, but that is not portable. I think the point is to

Re: [PATCH 1/3] retain reflogs for deleted refs

2012-07-26 Thread Alexey Muranov
On 26 Jul 2012, at 18:59, Jeff King wrote: Not to mention git itself, as it splits up the refs/remotes hierarchy into subdirectories. I think deprecating / is out of the question. -Peff Ok, i guess you know better than me, my vision of Git is probably still too simplistic. -Alexey.-- To

Re: [PATCH v2 4/4] allow recovery from command name typos

2012-07-26 Thread Jeff King
On Fri, Jul 27, 2012 at 01:08:34AM +0800, Tay Ray Chuan wrote: Perhaps we should audit isatty() calls and replace them with a helper function that does this kind of thing consistently in a more robust way (my recent favorite is Linus's somewhat anal logic used in

Re: [RFC 1/4 v2] Implement a basic remote helper for svn in C.

2012-07-26 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: [...] + +enum cmd_result { SUCCESS, NOT_HANDLED, ERROR }; [...] Hm.. the enum now has SUCCESS, NOT_HANDLED, TERMINATE. Much nicer. I think this tristate return value could be avoided entirely because... ... it isn't needed at the moment. I am

Re: [PATCH 3/3] difftool: Disable --symlinks on cygwin

2012-07-26 Thread David Aguilar
On Thu, Jul 26, 2012 at 4:31 AM, Erik Faye-Lund kusmab...@gmail.com wrote: On Wed, Jul 25, 2012 at 5:14 AM, David Aguilar dav...@gmail.com wrote: Symlinks are not ubiquitous on Windows so make --no-symlinks the default. Signed-off-by: David Aguilar dav...@gmail.com --- I don't have cygwin so

Re: [PATCH] i18n: leave \n out of translated diffstat

2012-07-26 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: diff --git a/diff.c b/diff.c index 62cbe14..95706a5 100644 --- a/diff.c +++ b/diff.c @@ -1397,7 +1397,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions) if (!files) { assert(insertions ==

Re: [PATCH 1/3] retain reflogs for deleted refs

2012-07-26 Thread Jeff King
On Thu, Jul 26, 2012 at 10:46:01AM -0700, Junio C Hamano wrote: Bleh. It seems that we did too good a job in coming up with a list of disallowed ref characters; they really are things you don't want in your filenames at all. :) Why do no need to even worry about ~ vs : vs whatever in the

Re: [PATCH v2 4/4] allow recovery from command name typos

2012-07-26 Thread Junio C Hamano
Tay Ray Chuan rcta...@gmail.com writes: On Thu, Jul 26, 2012 at 1:57 AM, Junio C Hamano gits...@pobox.com wrote: Tay Ray Chuan rcta...@gmail.com writes: If suggestions are available (based on Levenshtein distance) and if the terminal isatty(), present a prompt to the user to select one of

Re: [PATCH v2 4/4] allow recovery from command name typos

2012-07-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: - isatty(0) check in cmd_revert to set opts.edit automatically. This one should match merge's behavior. ... So I think the only one that could be improved is the one in cmd_revert. Yeah, that matches the result of my grep. Thanks for sanity checking.

Re: [PATCH 0/5] test-lib: filesystem prerequisites

2012-07-26 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: This mini series provides and makes use of test prerequisites for case insensitivity, symlinks and unicode conversion. SYMLINKS existed before but was not used in t0050. CASE_INSENSITIVE_FS was defined in t0003 rather than test-lib (and

Re: [PATCH v2 4/4] allow recovery from command name typos

2012-07-26 Thread Jeff King
On Thu, Jul 26, 2012 at 10:59:51AM -0700, Junio C Hamano wrote: The credential code uses git_terminal_prompt, which actually opens /dev/tty directly. So it is probably sane to use for your new prompt, but it does not (and should not) rely on isatty. I think using git_terminal_prompt()

Re: [PATCH 0/5] test-lib: filesystem prerequisites

2012-07-26 Thread Jeff King
On Thu, Jul 26, 2012 at 11:16:45AM -0700, Junio C Hamano wrote: Consolidating the logic to set necessary prerequisites used in various scripts is very good, but I am not sure adding them to test-lib and run them unconditionally is a good idea. SYMLINKS is used by 47 among 595 tests, which is

[PATCH v2 1/2] difftool: Wrap long lines for readability

2012-07-26 Thread David Aguilar
Keep everything within 80 columns. Wrap the user-facing messages too. Signed-off-by: David Aguilar dav...@gmail.com --- Unchanged since last time -- resending for patch 2/2 git-difftool.perl | 46 -- 1 file changed, 32 insertions(+), 14 deletions(-)

Re: Test t/t7502-commit.sh failed

2012-07-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: Yes, and they are given that chance. This is not about the behavior of git, but about stupid assumptions by the test. OK. I'm close to finished with a series that I think will at least make it better. Stay tuned. ;-) -- To unsubscribe from this list: send

Re: [PATCH 0/5] test-lib: filesystem prerequisites

2012-07-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: That looks like a maintenance annoyance. Can't we just have the prerequisite-checker lazily perform the test on demand and cache the result? It should be OK as long as: 1. The prereq is careful about its pre- and post- conditions. We already make sure

[PATCH 0/6] t7502 fixes

2012-07-26 Thread Jeff King
On Thu, Jul 26, 2012 at 03:33:59PM -0400, Jeff King wrote: I'm close to finished with a series that I think will at least make it better. Stay tuned. Here it is. I was able to replicate the original problem by munging my /etc/passwd, and I've confirmed that this series fixes it by skipping the

[PATCH 2/6] t7502: properly quote GIT_EDITOR

2012-07-26 Thread Jeff King
One of the tests tries to ensure that editor is not run due to an early failure. However, it needs to quote the pathname of the trash directory used in $GIT_EDITOR, since git will pass it along to the shell. In other words, the test would pass whether the code was correct or not, since the

[PATCH 3/6] t7502: narrow checks for author/committer name in template

2012-07-26 Thread Jeff King
t7502.20 and t7502.21 check that the author and committer name are mentioned in the commit message template under certain circumstances. However, they end up checking a much larger and unnecessary portion of the template. Let's narrow their checks to the specific lines. While we're at it, let's

[PATCH 4/6] t7502: drop confusing test_might_fail call

2012-07-26 Thread Jeff King
In t7502.20, we run git commit and check that it warns us that the author and committer identity are not the same (this is always the case in the test environment, since we set up the idents differently). Instead of actually making a commit, we have a clean index, so the git commit we run will

[PATCH 5/6] t7502: handle systems where auto-identity is broken

2012-07-26 Thread Jeff King
Test t7502.21 checks whether we write the committer name into COMMIT_EDITMSG when it has been automatically determined. However, not all systems can produce valid automatic identities. Prior to f20f387 (commit: check committer identity more strictly), this test worked even when we did not have a

[PATCH 6/6] t7502: test early quit from commit with bad ident

2012-07-26 Thread Jeff King
In commit f20f387, git commit notices and dies much earlier when we have a bogus commit identity. That commit did not add a test because we cannot do so reliably (namely, we can only trigger the behavior on a system where the automatically generated identity is bogus). However, now that we have a

Re: [PATCH v9] git on Mac OS and precomposed unicode

2012-07-26 Thread Robin Rosenberg
Just a couple of nitpicks. Torsten Bögershausen skrev 2012-07-08 15.50: diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c [...] +static size_t has_utf8(const char *s, size_t maxlen, size_t *strlen_c) +{ + const uint8_t *utf8p = (const uint8_t*) s; + size_t

Re: [PATCH 0/6] t7502 fixes

2012-07-26 Thread Junio C Hamano
All patches look very sensible. Thanks. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

The GitTogether

2012-07-26 Thread Scott Chacon
For the last few years, there has been a gathering of Gitty people in Mountain View directly following the GSoC Mentor Summit that is referred to as a GitTogether: https://git.wiki.kernel.org/index.php/GitTogether A few of us have been talking about what we would like to do this year and

Re: [PATCH v9] git on Mac OS and precomposed unicode

2012-07-26 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: Just a couple of nitpicks. Polishing is always good and better late than never, but for a topic that has long been graduated to 'master' already, it would be easier to review and discuss if it came as a patch form relative to the codebase

[PATCH 3/2] test-lib: provide case insensitivity as a prerequisite

2012-07-26 Thread Junio C Hamano
And on top, Michael's [1/5] would become like this, and [2/5] would apply unchanged. -- 8 -- From: Michael J Gruber g...@drmicha.warpmail.net Date: Thu, 26 Jul 2012 15:39:53 +0200 Case insensitivity plays a role in several tests and is tested in several tests. Therefore, move the test from t003

Extract Git::SVN from git-svn, take 2.

2012-07-26 Thread Michael G. Schwern
Same as before, now with tab indentation in the new Perl tests. As before, patch #3 is 132k and will be rejected by some of the lists. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN.

2012-07-26 Thread Michael G. Schwern
From: Michael G. Schwern schw...@pobox.com Put them in a new module called Git::SVN::Utils. Yeah, not terribly original and it will be a dumping ground. But its better than having them in the main git-svn program. At least they can be documented and tested. * fatal() is used by many classes.

[PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

2012-07-26 Thread Michael G. Schwern
From: Michael G. Schwern schw...@pobox.com Also it can compile on its own now, yay! --- git-svn.perl | 4 perl/Git/SVN.pm | 9 +++-- t/Git-SVN/00compile.t | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index

[PATCH 4/2] test-lib: provide UTF8 behaviour as a prerequisite

2012-07-26 Thread Junio C Hamano
And Michael's [4/5] would become like this (again, [3/5] does not need any change). -- 8 -- From: Michael J Gruber g...@drmicha.warpmail.net Date: Thu, 26 Jul 2012 15:39:56 +0200 UTF8 behaviour of the filesystem (conversion from nfd to nfc) plays a role in several tests and is tested in

Extract remaining classes from git-svn

2012-07-26 Thread Michael G. Schwern
This series of patches extracts the remaining classes from git-svn. They're all simple extractions and functionally have no change. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH 1/8] Prepare Git::SVN::Log for extraction from git-svn.

2012-07-26 Thread Michael G. Schwern
From: Michael G. Schwern schw...@pobox.com * Load Git command functions itself. * Can't access the git-svn switch lexical any more, but its only used by Git::SVN::Log so turn it into a Git::SVN::Log global. * Load Git::SVN as needed. No need to load it always, its only used twice. * Moved a

[PATCH 2/8] Extract Git::SVN::Log from git-svn.

2012-07-26 Thread Michael G. Schwern
From: Michael G. Schwern schw...@pobox.com Straight cut paste. Also noticed Git::SVN::Ra wasn't in the compile test. It is now. --- git-svn.perl | 395 +- perl/Git/SVN/Log.pm | 395 ++

[PATCH 8/8] Fix indents to match style.

2012-07-26 Thread Michael G. Schwern
From: Michael G. Schwern schw...@pobox.com --- git-svn.perl | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 584e93a..4d173d4 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -31,14 +31,14 @@ use Git::SVN::Migration; use

[PATCH 7/8] Extract Git::SVN::GlobSpec from git-svn.

2012-07-26 Thread Michael G. Schwern
From: Michael G. Schwern schw...@pobox.com Straight cut paste. That's the last class. * Make Git::SVN load it on its own, its the only thing that needs it. --- git-svn.perl | 59 perl/Git/SVN.pm | 2 ++

[PATCH 4/8] Extract Git::SVN::Migration from git-svn.

2012-07-26 Thread Michael G. Schwern
From: Michael G. Schwern schw...@pobox.com Straight cut paste. --- git-svn.perl | 258 +- perl/Git/SVN/Migration.pm | 258 ++ perl/Makefile | 1 + t/Git-SVN/00compile.t | 3

[PATCH 5/8] Load all the modules in one place and before running code.

2012-07-26 Thread Michael G. Schwern
From: Michael G. Schwern schw...@pobox.com Just makes the code easier to follow. No functional change. Also eliminate an unused lexical $SVN. --- git-svn.perl | 44 +--- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/git-svn.perl

Re: [PATCH] builtin-commit.c: Not add duplicate S-o-b when commit

2012-07-26 Thread Jiang Xin
2012/7/27 Junio C Hamano gits...@pobox.com: Signed-off-by: A Signed-off-by: B Reported-by: C So I guess duplicate S-o-b is not intentional. I think the two commands are doing randomly different things on garbage input. The order in the input (i.e. your original) does not make

Re: [PATCH 2/4] Prepare Git::SVN for extraction into its own file.

2012-07-26 Thread Junio C Hamano
Michael G. Schwern schw...@pobox.com writes: From: Michael G. Schwern schw...@pobox.com This means it should be able to load without git-svn being loaded. * Load Git.pm on its own and all the needed command functions. * It needs to grab at a git-svn lexical $_prefix representing the

Re: [PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN.

2012-07-26 Thread Junio C Hamano
Michael G. Schwern schw...@pobox.com writes: From: Michael G. Schwern schw...@pobox.com Put them in a new module called Git::SVN::Utils. Yeah, not terribly original and it will be a dumping ground. But its better than having them in the main git-svn program. At least they can be

Re: [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

2012-07-26 Thread Junio C Hamano
Michael G. Schwern schw...@pobox.com writes: From: Michael G. Schwern schw...@pobox.com Also it can compile on its own now, yay! Hmmm. If you swap the order of steps 3/4 and 4/4 by creating Git/SVN.pm that only has these variable definitions (i.e. our $X and use vars $X) and make

Re: [PATCH 2/4] Prepare Git::SVN for extraction into its own file.

2012-07-26 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Michael G. Schwern schw...@pobox.com writes: From: Michael G. Schwern schw...@pobox.com This means it should be able to load without git-svn being loaded. * Load Git.pm on its own and all the needed command functions. * It needs to grab at a

Re: [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

2012-07-26 Thread Jonathan Nieder
Junio C Hamano wrote: Michael G. Schwern schw...@pobox.com writes: Also it can compile on its own now, yay! Hmmm. I agree with Michael's yay and also think it's fine that after patch 3 it isn't there yet. That's because git-svn.perl doesn't use Git::SVN on its own but helps it out a little.