Re: [PATCH v3] gitk: Add a "Copy commit summary" command

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

Re: [PATCH v3] gitk: Add a "Copy commit summary" command

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:47

Eric Sunshine [off-list ref] writes:
quoted
Signed-off-by: Beat Bolli <redacted>
Reviewed-by: Eric Sunshine <redacted>
Reviewed-by: Johannes Sixt <redacted>
You should drop these Reviewed-by: footers, as they imply that the
code was thoroughly digested and the implementation deemed correct.
... and the most importantly, the named people said that themselves.

I do not think that happened here (yet).
quoted
+proc copysummary {} {
+    global rowmenuid
+
+    set format "%h (\"%s\", %ad)"
+    set summary [exec git show -s --pretty=format:$format --date=short \
+                 $rowmenuid]
+
+    clipboard clear
+    clipboard append $summary
+}
+
I think this is a reasonable implementation.  The usual "spawning a
process for each commit is too expensive" would not apply, because
it is done on demand only for the single commit that the end-user
specified.

Re: [PATCH v3] gitk: Add a "Copy commit summary" command

From: Beat Bolli <hidden>
Date: 2016-06-15 23:05:47

On 17.07.15 19:28, Junio C Hamano wrote:
Eric Sunshine [off-list ref] writes:
quoted
quoted
Signed-off-by: Beat Bolli <redacted>
Reviewed-by: Eric Sunshine <redacted>
Reviewed-by: Johannes Sixt <redacted>
You should drop these Reviewed-by: footers, as they imply that the
code was thoroughly digested and the implementation deemed correct.
... and the most importantly, the named people said that themselves.

I do not think that happened here (yet).
quoted
quoted
+proc copysummary {} {
+    global rowmenuid
+
+    set format "%h (\"%s\", %ad)"
+    set summary [exec git show -s --pretty=format:$format --date=short \
+                 $rowmenuid]
+
+    clipboard clear
+    clipboard append $summary
+}
+
I think this is a reasonable implementation.  The usual "spawning a
process for each commit is too expensive" would not apply, because
it is done on demand only for the single commit that the end-user
specified.
Thanks, Junio! That was my thought as well.

So, the question remains now if adding something like
--abbrev=$autosellen (maybe only if it's not set to its default value),
as Paul suggested, would make sense.

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