Re: [PATCH 3/3] git checkout --nodwim

7 messages, 7 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 3/3] git checkout --nodwim

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:34

Alex Riesen [off-list ref] writes:
On Sun, Oct 18, 2009 at 10:01, Junio C Hamano [off-list ref] wrote:
quoted
+               OPT_SET_INT(0, "nodwim", &dwim_new_local_branch,
+                           "do not dwim local branch creation", 0),
Isn't there a special negation support for --no-something in parse-options?
There probably is, but this is a whetherbaloon patch without documentation
and pretty much Porcelain only, so I took the lazy route.

Helping hands in polishing it up is very welcome.

[PATCH] Use "--no-" prefix to switch off some of checkout dwimmery

From: Alex Riesen <hidden>
Date: 2016-06-15 22:47:34

The one which guesses local branch name from a remote reference.

Signed-off-by: Alex Riesen <redacted>
---

Junio C Hamano, Sun, Oct 18, 2009 21:53:51 +0200:
Alex Riesen [off-list ref] writes:
quoted
On Sun, Oct 18, 2009 at 10:01, Junio C Hamano [off-list ref] wrote:
quoted
+               OPT_SET_INT(0, "nodwim", &dwim_new_local_branch,
+                           "do not dwim local branch creation", 0),
Isn't there a special negation support for --no-something in parse-options?
There probably is, but this is a whetherbaloon patch without documentation
and pretty much Porcelain only, so I took the lazy route.

Helping hands in polishing it up is very welcome.
Maybe like this?

BTW, can parse-options take care of the " (default)" addition?

 builtin-checkout.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 6ec9b83..22b023b 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -632,8 +632,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 		OPT_STRING(0, "conflict", &conflict_style, "style",
 			   "conflict style (merge or diff3)"),
 		OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),
-		OPT_SET_INT(0, "nodwim", &dwim_new_local_branch,
-			    "do not dwim local branch creation", 0),
+		OPT_SET_INT(0, "dwim", &dwim_new_local_branch,
+			    "Guess local branch from remote reference (default)", 0),
 		OPT_END(),
 	};
 	int has_dash_dash;
-- 
1.6.5.1.50.g84e6e

Re: [PATCH 3/3] git checkout --nodwim

From: Avery Pennarun <hidden>
Date: 2016-06-15 22:47:35

On Sun, Oct 18, 2009 at 3:53 PM, Junio C Hamano [off-list ref] wrote:
Alex Riesen [off-list ref] writes:
quoted
On Sun, Oct 18, 2009 at 10:01, Junio C Hamano [off-list ref] wrote:
quoted
+               OPT_SET_INT(0, "nodwim", &dwim_new_local_branch,
+                           "do not dwim local branch creation", 0),
Isn't there a special negation support for --no-something in parse-options?
There probably is, but this is a whetherbaloon patch without documentation
and pretty much Porcelain only, so I took the lazy route.

Helping hands in polishing it up is very welcome.
I find the idea of an option for "don't do what I mean" to be pretty
entertaining.  Or maybe just misleading :)

Have fun,

Avery

Re: [PATCH 3/3] git checkout --nodwim

From: Nanako Shiraishi <hidden>
Date: 2016-06-15 22:47:35

Quoting Avery Pennarun [off-list ref]
On Sun, Oct 18, 2009 at 3:53 PM, Junio C Hamano [off-list ref] wrote:
quoted
Helping hands in polishing it up is very welcome.
I find the idea of an option for "don't do what I mean" to be pretty
entertaining.  Or maybe just misleading :)

Have fun,

Avery
As Junio asked for helping hands, let's try to be helpful and constructive.

Maybe "don't second-guess" explains it better?

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

Re: [PATCH 3/3] git checkout --nodwim

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:47:35

Hi,

On Thu, 22 Oct 2009, Nanako Shiraishi wrote:
Quoting Avery Pennarun [off-list ref]
quoted
On Sun, Oct 18, 2009 at 3:53 PM, Junio C Hamano [off-list ref] wrote:
quoted
Helping hands in polishing it up is very welcome.
I find the idea of an option for "don't do what I mean" to be pretty
entertaining.  Or maybe just misleading :)

Have fun,

Avery
As Junio asked for helping hands, let's try to be helpful and constructive.

Maybe "don't second-guess" explains it better?
My take on it:

1) --no-porcelain

2) we all are bike-shedding, not being constructive at all

Ciao,
Dscho

Re: [PATCH 3/3] git checkout --nodwim

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:47:36

On Thu, Oct 22, 2009 at 2:27 AM, Johannes Schindelin
[off-list ref] wrote:
My take on it:

1) --no-porcelain

2) we all are bike-shedding, not being constructive at all
In that case, I propose "--yellow".

-- 
Erik "kusma" Faye-Lund

Re: [PATCH 3/3] git checkout --nodwim

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:47:36

Johannes Schindelin venit, vidit, dixit 22.10.2009 02:27:
Hi,

On Thu, 22 Oct 2009, Nanako Shiraishi wrote:
quoted
Quoting Avery Pennarun [off-list ref]
quoted
On Sun, Oct 18, 2009 at 3:53 PM, Junio C Hamano [off-list ref] wrote:
quoted
Helping hands in polishing it up is very welcome.
I find the idea of an option for "don't do what I mean" to be pretty
entertaining.  Or maybe just misleading :)

Have fun,

Avery
As Junio asked for helping hands, let's try to be helpful and constructive.

Maybe "don't second-guess" explains it better?
My take on it:

1) --no-porcelain
Between --no-dwim and --no-porcelain, maybe --no-wimp is a good compromise?
2) we all are bike-shedding, not being constructive at all
That's the fun part!

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help