Re: [PATCH 12/13] revert: Introduce skip-all to cleanup sequencer data

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

Re: [PATCH 12/13] revert: Introduce skip-all to cleanup sequencer data

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:30

Ramkumar Ramachandra [off-list ref] writes:
quoted hunk
diff --git a/builtin/revert.c b/builtin/revert.c
index 5c0b97e..eb68068 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -46,6 +46,9 @@ enum replay_action { REVERT, CHERRY_PICK };
 struct replay_opts {
 	enum replay_action action;
 
+	/* --skip-all */
+	int skipall_oper;
Yikes what is that "oper" doing there?  Don't truncate a word in the
middle only to shorten names and make it unclear what you want to say. Is
that operand? operation? In this case, I think "int skip_all" is
sufficient, and you can lose the comment that adds no extra information.

Re: [PATCH 12/13] revert: Introduce skip-all to cleanup sequencer data

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:51:32

Hi Junio,

Junio C Hamano writes:
Ramkumar Ramachandra [off-list ref] writes:
quoted
diff --git a/builtin/revert.c b/builtin/revert.c
index 5c0b97e..eb68068 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -46,6 +46,9 @@ enum replay_action { REVERT, CHERRY_PICK };
 struct replay_opts {
      enum replay_action action;

+     /* --skip-all */
+     int skipall_oper;
Yikes what is that "oper" doing there?  Don't truncate a word in the
middle only to shorten names and make it unclear what you want to say. Is
that operand? operation? In this case, I think "int skip_all" is
sufficient, and you can lose the comment that adds no extra information.
Interesting side note: I'd initially wanted to use "skip_all" and
"continue", but "continue" is a C keyword.  That's why I'd reluctantly
suffixed "_oper" to both for consistency.

-- Ram

Re: [PATCH 12/13] revert: Introduce skip-all to cleanup sequencer data

From: Miles Bader <hidden>
Date: 2016-06-15 22:51:32

Ramkumar Ramachandra [off-list ref] writes:
Interesting side note: I'd initially wanted to use "skip_all" and
"continue", but "continue" is a C keyword.  That's why I'd reluctantly
suffixed "_oper" to both for consistency.
It seems a good idea to restrict such uglification to only those cases
where it's necessary, not make _everything_ ugly just for the sake of
consistency.....

[The traditional thing to do with C-keyword conflicts, when there's no
obvious and natural alternative, seems to just be intentional mispelling
-- "continu", "kontinue", "cont", "_continue", whatever.  Yes, they're
ugly, but people will know why you did it, and they'll forgive you.]

-Miles

-- 
Helpmate, n. A wife, or bitter half.

Re: [PATCH 12/13] revert: Introduce skip-all to cleanup sequencer data

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:51:32

Hi Miles,

Miles Bader writes:
Ramkumar Ramachandra [off-list ref] writes:
quoted
Interesting side note: I'd initially wanted to use "skip_all" and
"continue", but "continue" is a C keyword.  That's why I'd reluctantly
suffixed "_oper" to both for consistency.
It seems a good idea to restrict such uglification to only those cases
where it's necessary, not make _everything_ ugly just for the sake of
consistency.....

[The traditional thing to do with C-keyword conflicts, when there's no
obvious and natural alternative, seems to just be intentional mispelling
-- "continu", "kontinue", "cont", "_continue", whatever.  Yes, they're
ugly, but people will know why you did it, and they'll forgive you.]
Interesting.  Are there such examples in the Git codebase as well?

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