All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] diff: support making output friendlier for fine, grand users
@ 2008-10-29  5:23 Petr Baudis
  2008-10-29 15:07 ` David Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Petr Baudis @ 2008-10-29  5:23 UTC (permalink / raw)
  To: git
  Cc: Johannes Schindelin, Scott Chacon, Tom Preston-Werner, Jeff King,
	J.H., Sam Vilain, Christian Couder, Kai Blin

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Scott Chacon <schacon@gmail.com>
Signed-off-by: Tom Preston-Werner <tom@github.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: J.H. <warthog19@eaglescrag.net>
Signed-off-by: Sam Vilain <sam@vilain.net>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Kai Blin <kai@samba.org>
Acked-by: Petr Baudis <pasky@suse.cz>
Enabled-by: Cascade "Smooth" Amber <clarity@tiedhouse.com>
---
 diff.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/diff.c b/diff.c
index e368fef..0e2c14a 100644
--- a/diff.c
+++ b/diff.c
@@ -2489,6 +2489,9 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
 	else if (!prefixcmp(arg, "--output=")) {
 		options->file = fopen(arg + strlen("--output="), "w");
 		options->close_file = 1;
+	}
+	else if (!strcmp(arg, "--pirate")) {
+		printf("Arrrr!  These be yer fine changes, me 'earty!!\n");
 	} else
 		return 0;
 	return 1;
-- 
1.5.4.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] diff: support making output friendlier for fine, grand users
  2008-10-29  5:23 [PATCH 1/1] diff: support making output friendlier for fine, grand users Petr Baudis
@ 2008-10-29 15:07 ` David Brown
  2008-10-29 15:28   ` Johannes Schindelin
  2008-10-29 17:06 ` [PATCH] increase git el1T3nEss Jeff King
  2008-10-29 22:24 ` [PATCH 1/1] diff: support making output friendlier for fine, grand users Petr Baudis
  2 siblings, 1 reply; 8+ messages in thread
From: David Brown @ 2008-10-29 15:07 UTC (permalink / raw)
  To: Petr Baudis
  Cc: git, Johannes Schindelin, Scott Chacon, Tom Preston-Werner,
	Jeff King, J.H., Sam Vilain, Christian Couder, Kai Blin

On Tue, Oct 28, 2008 at 10:23:52PM -0700, Petr Baudis wrote:

>+	}
>+	else if (!strcmp(arg, "--pirate")) {
>+		printf("Arrrr!  These be yer fine changes, me 'earty!!\n");

We need to wait until Sept 19 to apply this patch, however.

David

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] diff: support making output friendlier for fine, grand users
  2008-10-29 15:07 ` David Brown
@ 2008-10-29 15:28   ` Johannes Schindelin
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Schindelin @ 2008-10-29 15:28 UTC (permalink / raw)
  To: David Brown
  Cc: Petr Baudis, git, Scott Chacon, Tom Preston-Werner, Jeff King,
	J.H., Sam Vilain, Christian Couder, Kai Blin

Hi,

On Wed, 29 Oct 2008, David Brown wrote:

> On Tue, Oct 28, 2008 at 10:23:52PM -0700, Petr Baudis wrote:
> 
> >+	}
> >+	else if (!strcmp(arg, "--pirate")) {
> >+		printf("Arrrr!  These be yer fine changes, me 'earty!!\n");
> 
> We need to wait until Sept 19 to apply this patch, however.

We could back-date it, of course.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] increase git el1T3nEss
  2008-10-29  5:23 [PATCH 1/1] diff: support making output friendlier for fine, grand users Petr Baudis
  2008-10-29 15:07 ` David Brown
@ 2008-10-29 17:06 ` Jeff King
  2008-10-29 17:11   ` Miklos Vajna
  2008-10-29 20:28   ` Daniel Barkalow
  2008-10-29 22:24 ` [PATCH 1/1] diff: support making output friendlier for fine, grand users Petr Baudis
  2 siblings, 2 replies; 8+ messages in thread
From: Jeff King @ 2008-10-29 17:06 UTC (permalink / raw)
  To: Petr Baudis
  Cc: git, Johannes Schindelin, Scott Chacon, Tom Preston-Werner, J.H.,
	Sam Vilain, Christian Couder, Kai Blin

The uptake of git by script kiddies has been disappointingly
minimal. Let's make it more palatable by allowing mixed-case
and l33t-speak commands.

Signed-off-by: Jeff King <peff@peff.net>
---
This commit was made by "git c0mM1t".

 git.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/git.c b/git.c
index 89feb0b..fd0ca67 100644
--- a/git.c
+++ b/git.c
@@ -261,6 +261,31 @@ static int run_command(struct cmd_struct *p, int argc, const char **argv)
 	return 0;
 }
 
+static char deelite(char in) {
+	if (isalpha(in))
+		return tolower(in);
+	switch (in) {
+	case '0': return 'o';
+	case '1': return 'i';
+	case '3': return 'e';
+	case '5': return 's';
+	case '7': return 'l';
+	}
+	return in;
+}
+
+static int elitecmp(const char *a, const char *b) {
+	while (1) {
+		char ca = deelite(*a), cb = deelite(*b);
+		if (ca != cb)
+			return ca < cb ? -1 : 1;
+		if (!ca)
+			return 0;
+		a++;
+		b++;
+	}
+}
+
 static void handle_internal_command(int argc, const char **argv)
 {
 	const char *cmd = argv[0];
@@ -381,7 +406,7 @@ static void handle_internal_command(int argc, const char **argv)
 
 	for (i = 0; i < ARRAY_SIZE(commands); i++) {
 		struct cmd_struct *p = commands+i;
-		if (strcmp(p->cmd, cmd))
+		if (elitecmp(p->cmd, cmd))
 			continue;
 		exit(run_command(p, argc, argv));
 	}
-- 
1.6.0.3.764.ge6f2.dirty

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] increase git el1T3nEss
  2008-10-29 17:06 ` [PATCH] increase git el1T3nEss Jeff King
@ 2008-10-29 17:11   ` Miklos Vajna
  2008-10-29 20:28   ` Daniel Barkalow
  1 sibling, 0 replies; 8+ messages in thread
From: Miklos Vajna @ 2008-10-29 17:11 UTC (permalink / raw)
  To: Jeff King
  Cc: Petr Baudis, git, Johannes Schindelin, Scott Chacon,
	Tom Preston-Werner, J.H., Sam Vilain, Christian Couder, Kai Blin

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

On Wed, Oct 29, 2008 at 01:06:31PM -0400, Jeff King <peff@peff.net> wrote:
> The uptake of git by script kiddies has been disappointingly
> minimal. Let's make it more palatable by allowing mixed-case
> and l33t-speak commands.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> This commit was made by "git c0mM1t".

Testcase?

(I hope it was not serious, just like my question. ;-)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] increase git el1T3nEss
  2008-10-29 17:06 ` [PATCH] increase git el1T3nEss Jeff King
  2008-10-29 17:11   ` Miklos Vajna
@ 2008-10-29 20:28   ` Daniel Barkalow
  2008-10-29 21:50     ` Jeff King
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Barkalow @ 2008-10-29 20:28 UTC (permalink / raw)
  To: Jeff King
  Cc: Petr Baudis, git, Johannes Schindelin, Scott Chacon,
	Tom Preston-Werner, J.H., Sam Vilain, Christian Couder, Kai Blin

On Wed, 29 Oct 2008, Jeff King wrote:

> The uptake of git by script kiddies has been disappointingly
> minimal. Let's make it more palatable by allowing mixed-case
> and l33t-speak commands.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> This commit was made by "git c0mM1t".
> 
>  git.c |   27 ++++++++++++++++++++++++++-
>  1 files changed, 26 insertions(+), 1 deletions(-)
> 
> diff --git a/git.c b/git.c
> index 89feb0b..fd0ca67 100644
> --- a/git.c
> +++ b/git.c
> @@ -261,6 +261,31 @@ static int run_command(struct cmd_struct *p, int argc, const char **argv)
>  	return 0;
>  }
>  
> +static char deelite(char in) {
> +	if (isalpha(in))
> +		return tolower(in);
> +	switch (in) {
> +	case '0': return 'o';
> +	case '1': return 'i';
> +	case '3': return 'e';
> +	case '5': return 's';
> +	case '7': return 'l';

Your mapping doesn't comply with ISO 1337.5p34k; 1 can be l (in addition 
to i), and 7 is T. Also, you're missing 4.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] increase git el1T3nEss
  2008-10-29 20:28   ` Daniel Barkalow
@ 2008-10-29 21:50     ` Jeff King
  0 siblings, 0 replies; 8+ messages in thread
From: Jeff King @ 2008-10-29 21:50 UTC (permalink / raw)
  To: Daniel Barkalow
  Cc: Petr Baudis, git, Johannes Schindelin, Scott Chacon,
	Tom Preston-Werner, J.H., Sam Vilain, Christian Couder, Kai Blin

On Wed, Oct 29, 2008 at 04:28:16PM -0400, Daniel Barkalow wrote:

> Your mapping doesn't comply with ISO 1337.5p34k; 1 can be l (in addition 
> to i), and 7 is T. Also, you're missing 4.

Patches welcome.

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] diff: support making output friendlier for fine, grand users
  2008-10-29  5:23 [PATCH 1/1] diff: support making output friendlier for fine, grand users Petr Baudis
  2008-10-29 15:07 ` David Brown
  2008-10-29 17:06 ` [PATCH] increase git el1T3nEss Jeff King
@ 2008-10-29 22:24 ` Petr Baudis
  2 siblings, 0 replies; 8+ messages in thread
From: Petr Baudis @ 2008-10-29 22:24 UTC (permalink / raw)
  To: git, A Large Angry SCM
  Cc: Johannes Schindelin, Scott Chacon, Tom Preston-Werner, Jeff King,
	J.H., Sam Vilain, Christian Couder, Kai Blin

On Tue, Oct 28, 2008 at 10:23:52PM -0700, Petr Baudis wrote:
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> Signed-off-by: Scott Chacon <schacon@gmail.com>
> Signed-off-by: Tom Preston-Werner <tom@github.com>
> Signed-off-by: Jeff King <peff@peff.net>
> Signed-off-by: J.H. <warthog19@eaglescrag.net>
> Signed-off-by: Sam Vilain <sam@vilain.net>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> Signed-off-by: Kai Blin <kai@samba.org>
> Acked-by: Petr Baudis <pasky@suse.cz>
> Enabled-by: Cascade "Smooth" Amber <clarity@tiedhouse.com>

Sponsored-by: A Large Angry SCM <gitzilla@gmail.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-10-29 22:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29  5:23 [PATCH 1/1] diff: support making output friendlier for fine, grand users Petr Baudis
2008-10-29 15:07 ` David Brown
2008-10-29 15:28   ` Johannes Schindelin
2008-10-29 17:06 ` [PATCH] increase git el1T3nEss Jeff King
2008-10-29 17:11   ` Miklos Vajna
2008-10-29 20:28   ` Daniel Barkalow
2008-10-29 21:50     ` Jeff King
2008-10-29 22:24 ` [PATCH 1/1] diff: support making output friendlier for fine, grand users Petr Baudis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.