[PATCH 21/86] imap-send: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- imap-send.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/imap-send.c b/imap-send.c index 6f5cc4f..670de9f 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1263,7 +1263,7 @@ static int count_messages(struct

[PATCH 08/86] transport*: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- transport-helper.c | 16 transport.c| 28 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/transport-helper.c b/transport-helper.c index b32e2d6..bf8d7a0 100644

[PATCH 38/86] pager: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pager.c b/pager.c index fa19765..cd7bc43 100644 --- a/pager.c +++ b/pager.c @@ -151,7 +151,7 @@ int decimal_width(int number) static int pager_command_config

[PATCH 42/86] pathspec: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- pathspec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pathspec.c b/pathspec.c index ad1a9f5..182b162 100644 --- a/pathspec.c +++ b/pathspec.c @@ -150,7 +150,7 @@ static unsigned prefix_pathspec(struct

[PATCH 15/86] fetch-pack: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- fetch-pack.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fetch-pack.c b/fetch-pack.c index a0e0350..1526ed1 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -176,9 +176,9 @@ static void

[PATCH 03/86] fast-import: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- fast-import.c | 80 +-- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/fast-import.c b/fast-import.c index f4d9969..14f69a1 100644 --- a/fast-import.c +++ b/fast

[PATCH 68/86] builtin/name-rev: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/name-rev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 20fcf8c..2b74220 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -101,9 +101,9

[PATCH 62/86] builtin/init-db: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/init-db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/init-db.c b/builtin/init-db.c index 78aa387..7fe9d8c 100644 --- a/builtin/init-db.c +++ b/builtin/init-db.c @@ -266,7 +266,7 @@ static int

[PATCH 75/86] builtin/rev-parse: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/rev-parse.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index c76b89d..b6c92e0 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev

[PATCH 80/86] builtin/symbolic-ref: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/symbolic-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c index f481959..868fab4 100644 --- a/builtin/symbolic-ref.c +++ b/builtin/symbolic-ref.c @@ -65,7

[PATCH 82/86] builtin/tar-tree: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/tar-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/tar-tree.c b/builtin/tar-tree.c index ba3ffe6..7f225cc 100644 --- a/builtin/tar-tree.c +++ b/builtin/tar-tree.c @@ -34,7 +34,7 @@ int

[PATCH 85/86] builtin/upload-archive: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/upload-archive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/upload-archive.c b/builtin/upload-archive.c index af2da35..298bc76 100644 --- a/builtin/upload-archive.c +++ b/builtin/upload-archive.c

[PATCH 84/86] builtin/update-ref: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/update-ref.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/update-ref.c b/builtin/update-ref.c index 702e90d..d81d959 100644 --- a/builtin/update-ref.c +++ b/builtin/update-ref.c

[PATCH 86/86] strbuf: remove prefixcmp() as it has been replaced with has_prefix()

2013-11-08 Thread Christian Couder
prefixcmp() is now useless as the previous commit replaced it everywhere with has_prefix(). So let's now remove it. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- git-compat-util.h | 1 - strbuf.c | 9 - 2 files changed, 10 deletions(-) diff --git a/git-compat

[PATCH 77/86] builtin/shortlog: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/shortlog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/shortlog.c b/builtin/shortlog.c index c226f76..3f35682 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -65,7 +65,7 @@ static

[PATCH 83/86] builtin/unpack-objects: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/unpack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 2217d7b..dc2dd77 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c

[PATCH 67/86] builtin/merge: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/merge.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/merge.c b/builtin/merge.c index 02a69c1..5c70cec 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -453,17 +453,17 @@ static

[PATCH 72/86] builtin/receive-pack: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/receive-pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 67ce1ef..a4de530 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c

[PATCH 79/86] builtin/show-ref: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/show-ref.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 9f3f5e3..5e978aa 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -37,8 +37,8 @@ static

[PATCH 69/86] builtin/notes: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/notes.c b/builtin/notes.c index d459e23..4bc7385 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -347,7 +347,7 @@ static struct notes_tree

[PATCH 60/86] builtin/help: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/help.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/help.c b/builtin/help.c index f1e236b..2478e9a 100644 --- a/builtin/help.c +++ b/builtin/help.c @@ -100,7 +100,7 @@ static int

[PATCH 61/86] builtin/index-pack: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/index-pack.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 9e9eb4b..183cf1f 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1534,9

[PATCH 81/86] builtin/tag: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/tag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/tag.c b/builtin/tag.c index ea55f1d..e72 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -259,7 +259,7 @@ static int git_tag_config(const

[PATCH 74/86] builtin/remote: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/remote.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index b9a1024..e45358c 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -261,7 +261,7 @@ static const

[PATCH 66/86] builtin/merge-recursive: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/merge-recursive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c index e7f1a39..73896dc 100644 --- a/builtin/merge-recursive.c +++ b/builtin/merge

[PATCH 73/86] builtin/reflog: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/reflog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index 6eb24c8..f1a2578 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -610,12 +610,12 @@ static int

[PATCH 63/86] builtin/log: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/log.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 77d0f5f..054e663 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -390,7 +390,7 @@ static int git_log_config

[PATCH 70/86] builtin/pack-objects: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- 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 e86cd57..45ee54a 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2031,7

[PATCH 65/86] builtin/mailinfo: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/mailinfo.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index 24a772d..c5da04c 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -328,11

[PATCH 76/86] builtin/send-pack: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/send-pack.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/send-pack.c b/builtin/send-pack.c index 4482f16..0c29e69 100644 --- a/builtin/send-pack.c +++ b/builtin/send-pack.c @@ -115,15

[PATCH 64/86] builtin/ls-remote: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/ls-remote.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index 25e83cf..9050072 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -50,11 +50,11

[PATCH 78/86] builtin/show-branch: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/show-branch.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/show-branch.c b/builtin/show-branch.c index 001f29c..dc0b406 100644 --- a/builtin/show-branch.c +++ b/builtin/show

[PATCH 71/86] builtin/prune: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/prune.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/prune.c b/builtin/prune.c index 6366917..59682ff 100644 --- a/builtin/prune.c +++ b/builtin/prune.c @@ -80,7 +80,7 @@ static int prune_dir

[PATCH 16/86] git: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- git.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git.c b/git.c index cb5208d..f077f49 100644 --- a/git.c +++ b/git.c @@ -54,7 +54,7 @@ static int handle_options(const char ***argv, int *argc, int

[PATCH 22/86] help: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- help.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/help.c b/help.c index f068925..b41d2d5 100644 --- a/help.c +++ b/help.c @@ -148,7 +148,7 @@ static void list_commands_in_dir(struct cmdnames *cmds

[PATCH 30/86] http-push: replace prefixcmd() with has_prefix()

2013-11-08 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- http-push.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-push.c b/http-push.c index 69200ba..0994344 100644 --- a/http-push.c +++ b/http-push.c @@ -771,7 +771,7 @@ static void handle_new_lock_ctx(struct

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-11 Thread Christian Couder
On Sat, Nov 9, 2013 at 3:24 PM, Thomas Rast t...@thomasrast.ch wrote: Christian Couder chrisc...@tuxfamily.org writes: Christian Couder (86): strbuf: add has_prefix() to be used instead of prefixcmp() diff: replace prefixcmd() with has_prefix() fast-import: replace prefixcmd

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Even though we already added has_suffix() for tail matches, it is not too late to rethink, as it is not in 'master' yet. One thing I noticed is that it is probably misnamed, or at least in a way that invites confusion. Can people tell which one of

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: After a look at some languages, Python has startwith() and endswith(), and Java has startWith() and endsWith(). But while we are at it, why not ends_with() and begins_with()? To me using an underscore

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-17 Thread Christian Couder
From: Jeff King p...@peff.net On Wed, Nov 13, 2013 at 07:47:03AM +0100, Christian Couder wrote: My preference is: 1) with an s 2) start 3) underscore so that gives: starts_with() and ends_with() FWIW, that looks good to me, too. Whether there is confusion over the meaning

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

2013-11-17 Thread Christian Couder
-by: Christian Couder chrisc...@tuxfamily.org --- builtin/clone.c | 2 +- builtin/fetch.c | 2 +- builtin/merge-recursive.c | 2 +- builtin/remote.c | 6 +++--- builtin/repack.c | 2 +- connected.c | 2 +- git-compat-util.h | 2

[PATCH v4 1/2] builtin/remote: remove postfixcmp() and use suffixcmp() instead

2013-11-17 Thread Christian Couder
nowhere else, it makes more sense to remove it and use suffixcmp() instead in builtin/remote.c, rather than to remove suffixcmp(). Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/remote.c | 14 +++--- 1 file changed, 3

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-18 Thread Christian Couder
On Sun, Nov 17, 2013 at 9:52 AM, Christian Couder chrisc...@tuxfamily.org wrote: From: Jeff King p...@peff.net On Wed, Nov 13, 2013 at 07:47:03AM +0100, Christian Couder wrote: My preference is: 1) with an s 2) start 3) underscore so that gives: starts_with() and ends_with() FWIW

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

2013-11-19 Thread Christian Couder
From: Jonathan Nieder jrnie...@gmail.com Christian Couder wrote: And in vcs-svn/fast_export.c there was already an ends_with() function that did the same thing. Let's used the renamed one while at it. Yes, despite the change in signature this shouldn't slow anything down. Thanks

[PATCH v2 02/86] diff: replace prefixcmp() with starts_with()

2013-11-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- diff.c | 56 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/diff.c b/diff.c index a04a34d..4b42997 100644 --- a/diff.c +++ b/diff.c @@ -235,7 +235,7 @@ int

[PATCH v2 00/86] replace prefixcmp() with starts_with()

2013-11-19 Thread Christian Couder
possible to squash many of the commits together if it is prefered. Christian Couder (86): strbuf: add starts_with() to be used instead of prefixcmp() diff: replace prefixcmp() with starts_with() fast-import: replace prefixcmp() with starts_with() remote*: replace prefixcmp() with starts_with

[PATCH v2 01/86] strbuf: add starts_with() to be used instead of prefixcmp()

2013-11-19 Thread Christian Couder
name to replace prefixcmp(). Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- git-compat-util.h | 1 + strbuf.c | 9 + 2 files changed, 10 insertions(+) diff --git a/git-compat-util.h b/git-compat-util.h index 37f0ba0..e441a6b 100644 --- a/git-compat-util.h +++ b/git

[PATCH v2 86/86] strbuf: remove prefixcmp() as it has been replaced with starts_with()

2013-11-19 Thread Christian Couder
prefixcmp() is now useless as the previous commit replaced it everywhere with starts_with(). So let's now remove it. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- git-compat-util.h | 1 - strbuf.c | 9 - 2 files changed, 10 deletions(-) diff --git a/git-compat

[PATCH v2 08/86] transport*: replace prefixcmp() with starts_with()

2013-11-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- transport-helper.c | 16 transport.c| 28 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/transport-helper.c b/transport-helper.c index b32e2d6..96de26d 100644

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

2013-11-20 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Antoine Pelisse apeli...@gmail.com writes: I'm not exactly sure I understand the point of not squashing all those patches together ? It's not like one is going without the others, or that the commit message provides some new information (except for

Re: GSoC 2014: Summary so far, discussion starter: how to improve?

2013-11-21 Thread Christian Couder
On Thu, Nov 21, 2013 at 9:36 AM, Thomas Rast t...@thomasrast.ch wrote: Thomas Rast t...@thomasrast.ch writes: * Find an org admin and backup. In previous years Shawn and Peff did this. Would you do it again? If Shawn and Peff don't answer, it probably means that you should volunteer :-)

Re: [PATCH] drop support for experimental loose objects

2013-11-21 Thread Christian Couder
On Thu, Nov 21, 2013 at 5:04 PM, Joey Hess j...@kitenet.net wrote: BTW, I've also seen git cat-file --batch report wrong sizes for objects, sometimes without crashing. This is particularly problimatic because if the object size is wrong, it's very hard to detect the actual end of the object

Re: [PATCH] drop support for experimental loose objects

2013-11-22 Thread Christian Couder
On Fri, Nov 22, 2013 at 10:58 AM, Jeff King p...@peff.net wrote: On Thu, Nov 21, 2013 at 09:19:25PM +0100, Christian Couder wrote: Yeah, I think it might report wrong size in case of replaced objects for example. I looked at that following Junio's comment about the sha1_object_info() API

Re: [PATCH] drop support for experimental loose objects

2013-11-22 Thread Christian Couder
On Fri, Nov 22, 2013 at 12:24 PM, Jeff King p...@peff.net wrote: On Fri, Nov 22, 2013 at 12:04:01PM +0100, Christian Couder wrote: In sha1_file.c, there is: void *read_sha1_file_extended(const unsigned char *sha1, enum object_type *type

[PATCH 1/5] replace_object: don't check read_replace_refs twice

2013-11-30 Thread Christian Couder
the check in do_lookup_replace_object(). Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- replace_object.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/replace_object.c b/replace_object.c index d0b1548..cdcaf8c 100644 --- a/replace_object.c +++ b/replace_object.c @@ -97,9 +97,6

[PATCH 0/5] teach replace objects to sha1_object_info_extended()

2013-11-30 Thread Christian Couder
a test that fails. Patch 5/5 adds a call to lookup_replace_object_extended() in sha1_object_info_extended() and makes the previous test pass. Christian Couder (5): replace_object: don't check read_replace_refs twice introduce lookup_replace_object_extended() to pass flags Add an unsigned flags

[PATCH 2/5] introduce lookup_replace_object_extended() to pass flags

2013-11-30 Thread Christian Couder
Currently, there is only one caller to lookup_replace_object() that can benefit from passing it some flags, but we expect that there could be more. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- cache.h | 6 ++ sha1_file.c | 3 +-- 2 files changed, 7 insertions(+), 2

[PATCH 5/5] sha1_file: perform object replacement in sha1_object_info_extended()

2013-11-30 Thread Christian Couder
sha1_object_info_extended() should perform object replacement if it is needed. The simplest way to do that is to make it call lookup_replace_object_extended(). And now its unsigned flags parameter is used as it is passed to lookup_replace_object_extended(). Signed-off-by: Christian Couder

[PATCH 4/5] t6050: show that git cat-file --batch fails with replace objects

2013-11-30 Thread Christian Couder
a3fb2e1845a1aaf129b7975048973414dc172173 | git cat-file --batch a3fb2e1845a1aaf129b7975048973414dc172173 commit 231 fatal: object a3fb2e1845a1aaf129b7975048973414dc172173 change size!? The goal of this patch is to show this breakage. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t

[PATCH 3/5] Add an unsigned flags parameter to sha1_object_info_extended()

2013-11-30 Thread Christian Couder
This parameter is not used yet, but it will be used to tell sha1_object_info_extended() if it should perform object replacement or not. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/cat-file.c | 2 +- cache.h| 2 +- sha1_file.c| 6 +++--- streaming.c

[PATCH 2/5] builtin/remote: remove postfixcmp() and use suffixcmp() instead

2013-11-30 Thread Christian Couder
nowhere else, it makes more sense to remove it and use suffixcmp() instead in builtin/remote.c, rather than to remove suffixcmp(). Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/remote.c | 14 +++--- 1 file changed, 3

[PATCH 3/5] strbuf: introduce starts_with() and ends_with()

2013-11-30 Thread Christian Couder
-by: Christian Couder chrisc...@tuxfamily.org --- git-compat-util.h | 2 ++ strbuf.c | 18 ++ vcs-svn/fast_export.c | 11 +-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 7776f12..b73916b 100644 --- a/git

[PATCH 5/5] strbuf: remove prefixcmp() and suffixcmp()

2013-11-30 Thread Christian Couder
As starts_with() and ends_with() have been used to replace prefixcmp() and suffixcmp() respectively, we can now remove them. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- git-compat-util.h | 2 -- strbuf.c | 18 -- 2 files changed, 20 deletions(-) diff

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

2013-11-30 Thread Christian Couder
that. Christian Couder (5): environment: normalize use of prefixcmp() by removing != 0 builtin/remote: remove postfixcmp() and use suffixcmp() instead strbuf: introduce starts_with() and ends_with() Replace {pre,suf}fixcmp() with {starts,ends}_with() strbuf: remove prefixcmp() and suffixcmp

[PATCH 1/5] environment: normalize use of prefixcmp() by removing != 0

2013-11-30 Thread Christian Couder
To be able to automatically convert prefixcmp() to starts_with() we need first to make sure that prefixcmp() is always used in the same way. So let's remove != 0 after prefixcmp(). Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- environment.c | 2 +- 1 file changed, 1 insertion

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

2013-12-02 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Jeff King p...@peff.net 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.org/gmane.comp.version-control.git/238054/ I send

Re: Fwd: [PATCH 4/5] Replace {pre,suf}fixcmp() with {starts,ends}_with()

2013-12-03 Thread Christian Couder
On Tue, Dec 3, 2013 at 1:46 PM, Jeff King p...@peff.net wrote: This made it through to me, but not the list. There are at least two things going on: 1. The message is 172K, which is over the 100K limit imposed by vger; the list is silently dropping it. 2. In my case, the direct

Re: [PATCH 0/5] teach replace objects to sha1_object_info_extended()

2013-12-03 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Jeff King p...@peff.net writes: On Mon, Dec 02, 2013 at 09:52:25AM -0500, Jeff King wrote: I find it a little funny that we reuse the READ_SHA1_FILE_REPLACE flag directly in lookup_replace_object. That means that it is now a meaningful flag for

Re: [PATCH 0/5] teach replace objects to sha1_object_info_extended()

2013-12-03 Thread Christian Couder
From: Jeff King p...@peff.net On Sat, Nov 30, 2013 at 02:51:18PM +0100, Christian Couder wrote: Here is a patch series to improve the way sha1_object_info_extended() behaves when it is passed a replaced object. Overall looks OK to me. Thanks for reviewing it. [...] I checked

Re: Fwd: [PATCH 4/5] Replace {pre,suf}fixcmp() with {starts,ends}_with()

2013-12-04 Thread Christian Couder
On Wed, Dec 4, 2013 at 11:02 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Christian Couder christian.cou...@gmail.com writes: Ok, the commit is in the use_starts_ends_with branch on this github repo: https://github.com/chriscool/git.git I looked

Re: What's cooking in git.git (Dec 2013, #01; Wed, 4)

2013-12-04 Thread Christian Couder
On Thu, Dec 5, 2013 at 2:23 AM, Junio C Hamano gits...@pobox.com wrote: * cc/starts-n-ends-with (2013-12-04) 4 commits - replace {pre,suf}fixcmp() with {starts,ends}_with() - strbuf: introduce starts_with() and ends_with() - builtin/remote: remove postfixcmp() and use suffixcmp() instead

[PATCH v2 00/10] teach replace objects to sha1_object_info_extended()

2013-12-07 Thread Christian Couder
. 'short' (which is the default), 'medium' and 'full' formats are supported. This could be considered another patch series, but it is also related, because it uses sha1_object_info() and it fixes its use in builtin/replace.c by unsetting the global variable read_replace_refs in cmd_replace(). Christian

[PATCH v2 10/10] Documentation/git-replace: describe --format option

2013-12-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-replace.txt | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index f373ab4..7a07828 100644 --- a/Documentation/git

[PATCH v2 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-07 Thread Christian Couder
': this also lists the sha1 of the replacement objects 'full': this shows the sha1 and the type of both the replaced and the replacement objects Some documentation and some tests will follow. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin

[PATCH v2 09/10] builtin/replace: unset read_replace_refs

2013-12-07 Thread Christian Couder
object which might be different. To fix this bug, and because git replace should work at a level before replacement takes place, let's unset the read_replace_refs global variable at the beginning of cmd_replace(). Suggested-by: Jeff King p...@peff.net Signed-off-by: Christian Couder chrisc

[PATCH v2 04/10] Add an unsigned flags parameter to sha1_object_info_extended()

2013-12-07 Thread Christian Couder
This parameter is not used yet, but it will be used to tell sha1_object_info_extended() if it should perform object replacement or not. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/cat-file.c | 2 +- cache.h| 2 +- sha1_file.c| 6 +++--- streaming.c

[PATCH v2 06/10] sha1_file: perform object replacement in sha1_object_info_extended()

2013-12-07 Thread Christian Couder
sha1_object_info_extended() should perform object replacement if it is needed. The simplest way to do that is to make it call lookup_replace_object_extended(). And now its unsigned flags parameter is used as it is passed to lookup_replace_object_extended(). Signed-off-by: Christian Couder

[PATCH v2 03/10] Introduce lookup_replace_object_extended() to pass flags

2013-12-07 Thread Christian Couder
Currently, there is only one caller to lookup_replace_object() that can benefit from passing it some flags, but we expect that there could be more. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- cache.h | 6 ++ sha1_file.c | 3 +-- 2 files changed, 7 insertions(+), 2

[PATCH v2 02/10] replace_object: don't check read_replace_refs twice

2013-12-07 Thread Christian Couder
the check in do_lookup_replace_object(). Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- replace_object.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/replace_object.c b/replace_object.c index d0b1548..cdcaf8c 100644 --- a/replace_object.c +++ b/replace_object.c @@ -97,9 +97,6

Re: [PATCH v2 09/10] builtin/replace: unset read_replace_refs

2013-12-07 Thread Christian Couder
On Sat, Dec 7, 2013 at 8:02 PM, Jakub Narebski jna...@gmail.com wrote: Wasn't replace mechanism tightened, so that replacing object must be the same type as replaced object? Yes, but if --force is used or if the replace ref is created with git update-ref, then it is not enforced. Is there a

Re: [PATCH v2 08/10] t6050: add tests for listing with --format

2013-12-08 Thread Christian Couder
From: Eric Sunshine sunsh...@sunshineco.com On Sat, Dec 7, 2013 at 11:21 AM, Christian Couder chrisc...@tuxfamily.org wrote: This patch adds tests for git replace -l --format=fmt. Only tests when fmt is 'medium' and 'full' are needed because 'short' is the same as with no --format option

[PATCH v3 03/10] Introduce lookup_replace_object_extended() to pass flags

2013-12-10 Thread Christian Couder
Currently, there is only one caller to lookup_replace_object() that can benefit from passing it some flags, but we expect that there could be more. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- cache.h | 6 ++ sha1_file.c | 3 +-- 2 files changed, 7 insertions(+), 2

[PATCH v3 01/10] Rename READ_SHA1_FILE_REPLACE flag to LOOKUP_REPLACE_OBJECT

2013-12-10 Thread Christian Couder
. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- cache.h | 4 ++-- sha1_file.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cache.h b/cache.h index ce377e1..873a6b5 100644 --- a/cache.h +++ b/cache.h @@ -760,11 +760,11 @@ int daemon_avoid_alias(const char *path

[PATCH v3 02/10] replace_object: don't check read_replace_refs twice

2013-12-10 Thread Christian Couder
the check in do_lookup_replace_object(). Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- replace_object.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/replace_object.c b/replace_object.c index d0b1548..cdcaf8c 100644 --- a/replace_object.c +++ b/replace_object.c @@ -97,9 +97,6

[PATCH v3 00/10] teach replace objects to sha1_object_info_extended()

2013-12-10 Thread Christian Couder
(). Christian Couder (10): Rename READ_SHA1_FILE_REPLACE flag to LOOKUP_REPLACE_OBJECT replace_object: don't check read_replace_refs twice Introduce lookup_replace_object_extended() to pass flags Add an unsigned flags parameter to sha1_object_info_extended() t6050: show that git cat-file --batch

[PATCH v3 09/10] builtin/replace: unset read_replace_refs

2013-12-10 Thread Christian Couder
object which might be different. To fix this bug, and because git replace should work at a level before replacement takes place, let's unset the read_replace_refs global variable at the beginning of cmd_replace(). Suggested-by: Jeff King p...@peff.net Signed-off-by: Christian Couder chrisc

[PATCH v3 04/10] Add an unsigned flags parameter to sha1_object_info_extended()

2013-12-10 Thread Christian Couder
This parameter is not used yet, but it will be used to tell sha1_object_info_extended() if it should perform object replacement or not. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/cat-file.c | 2 +- cache.h| 2 +- sha1_file.c| 6 +++--- streaming.c

[PATCH v3 05/10] t6050: show that git cat-file --batch fails with replace objects

2013-12-10 Thread Christian Couder
a3fb2e1845a1aaf129b7975048973414dc172173 | git cat-file --batch a3fb2e1845a1aaf129b7975048973414dc172173 commit 231 fatal: object a3fb2e1845a1aaf129b7975048973414dc172173 change size!? The goal of this patch is to show this breakage. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t

[PATCH v3 06/10] sha1_file: perform object replacement in sha1_object_info_extended()

2013-12-10 Thread Christian Couder
sha1_object_info_extended() should perform object replacement if it is needed. The simplest way to do that is to make it call lookup_replace_object_extended(). And now its unsigned flags parameter is used as it is passed to lookup_replace_object_extended(). Signed-off-by: Christian Couder

[PATCH v3 08/10] t6050: add tests for listing with --format

2013-12-10 Thread Christian Couder
This patch adds tests for git replace -l --format=fmt. 'short', 'medium' and 'full' are the only allowed values for fmt. 'short' is the same as with no --format option. Tests for 'medium' and 'full' are the most needed. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050

[PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-10 Thread Christian Couder
': this also lists the sha1 of the replacement objects 'full': this shows the sha1 and the type of both the replaced and the replacement objects Some documentation and some tests will follow. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin

[PATCH v3 10/10] Documentation/git-replace: describe --format option

2013-12-10 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-replace.txt | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index f373ab4..7a07828 100644 --- a/Documentation/git

Re: [PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-18 Thread Christian Couder
On Wed, Dec 18, 2013 at 1:37 PM, Karsten Blees karsten.bl...@gmail.com wrote: Am 11.12.2013 08:46, schrieb Christian Couder: +enum repl_fmt { SHORT, MEDIUM, FULL }; SHORT is predefined on Windows, could you choose another name? Ok, I will change to: enum repl_fmt { SHORT_FMT, MEDIUM_FMT

Re: [PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-19 Thread Christian Couder
On Wed, Dec 18, 2013 at 6:37 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder christian.cou...@gmail.com writes: On Wed, Dec 18, 2013 at 1:37 PM, Karsten Blees karsten.bl...@gmail.com wrote: Am 11.12.2013 08:46, schrieb Christian Couder: +enum repl_fmt { SHORT, MEDIUM, FULL

Re: [PATCH 02/12] Convert starts_with() to skip_prefix() for option parsing

2013-12-20 Thread Christian Couder
On Fri, Dec 20, 2013 at 8:04 AM, Jeff King p...@peff.net wrote: On Fri, Dec 20, 2013 at 07:51:00AM +0100, Johannes Sixt wrote: for (i = 1; i argc *argv[i] == '-'; i++) { const char *arg = argv[i]; + const char *optarg; - if (starts_with(arg,

Re: [PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-21 Thread Christian Couder
On Thu, Dec 19, 2013 at 7:58 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder christian.cou...@gmail.com writes: I think this last one might be useful for people replacing objects with objects that have another type. ... which IIUC is strongly discouraged---didn't you have

[PATCH v1 1/3] replace: add --graft option

2014-05-22 Thread Christian Couder
be straightforward to convert grafts to replace refs, with something like: cat .git/info/grafts | while read line do git replace --graft $line; done Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 84 ++- 1 file

[PATCH v1 0/3] Add --graft option to git replace

2014-05-22 Thread Christian Couder
About the documentation, maybe we should add that --graft can now be used instead of grafts in .git/info/grafts, and maybe we could add an example that shows how it can be done. Christian Couder (3): replace: add --graft option replace: add test for --graft Documentation: replace: add

[PATCH v1 2/3] replace: add test for --graft

2014-05-22 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..ca45a84 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -351,4 +351,16

[PATCH v12 10/11] trailer: add tests for commands in config file

2014-05-24 Thread Christian Couder
And add a few other tests for some special cases. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t7513-interpret-trailers.sh | 124 ++ 1 file changed, 124 insertions(+) diff --git a/t/t7513

<    1   2   3   4   5   6   7   8   9   10   >