Sorry, lets try this again. Felix Am Freitag, den 11.05.2012, 17:21 +0200 schrieb Uli Schlachter: > Hi, > > the patch itself looks fine to me. The commit message could need some love > (e.g. shorter summary), but I can live with that. However: > > $ git am -s /tmp/fetch\>UID\>.awesome-dev\>5322.awesome-dev%3E5322 > * Running commit-msg hook > warn: Summary is a bit long. (60 characters) > Applying: Return condition value instead of conditional true/false in > fatal: patch fragment without header at line 22: @@ -213,10 +212,7 @@ end > Patch failed at 0001 Return condition value instead of conditional true/false > in > When you have resolved this problem run "git am --resolved". > If you would prefer to skip this patch, instead run "git am --skip". > To restore the original branch and stop patching run "git am --abort". > > Could you re-send with the result from git format-patch attached as a file? > > Thanks, > Uli > > (Oh and I don't think that that the current state is more readable than what > you suggest) > > On 11.05.2012 17:09, felix wrote: > > From 6022805772c5f2897699f1e825f030e5db4635d7 Mon Sep 17 00:00:00 2001 > > From: Felix <[email protected]> Date: Fri, 11 May 2012 16:52:24 > > +0200 Subject: [PATCH] Return condition value instead of conditional > > true/false in tasklist.filter.{currenttag,focused} > > > > Patterns like > > > > if condition then return true else return false end > > > > could be simplified to > > > > return condition > > > > Is that something wanted in the awesome code base? I'm fine with the > > rejection of this patch in favour of readability. > > > > Signed-off-by: Felix <[email protected]> --- > > lib/awful/widget/tasklist.lua.in | 8 ++------ 1 Datei geändert, 2 Zeilen > > hinzugefügt(+), 6 Zeilen entfernt(-) > > > > diff --git a/lib/awful/widget/tasklist.lua.in > > b/lib/awful/widget/tasklist.lua.in index c52e4cd..c3c47ef 100644 --- > > a/lib/awful/widget/tasklist.lua.in +++ b/lib/awful/widget/tasklist.lua.in > > @@ -154,8 +154,7 @@ end -- @return true if c is on screen, false otherwise > > function filter.alltags(c, screen) -- Only print client on the same screen > > as this widget - if c.screen ~= screen then return false end - return > > true + return c.screen == screen end > > > > --- Filtering function to include only the clients from currently selected > > tags. @@ -213,10 +212,7 @@ end -- @return true if c is focused on screen, > > false otherwise function filter.focused(c, screen) -- Only print client on > > the same screen as this widget - if c.screen == screen and > > capi.client.focus == c then - return true - end - return > > false + return c.screen == screen and capi.client.focus == c end > > > > setmetatable(_M, { __call = function(_, ...) return new(...) end }) > >
From 57eb59f579a2b685eeeeddb13a8971ab7ca0c01f Mon Sep 17 00:00:00 2001 From: Felix <[email protected]> Date: Fri, 11 May 2012 17:42:45 +0200 Subject: [PATCH] Return condition value instead of conditional true/false Patterns like if condition then return true else return false end could be simplified to return condition Signed-off-by: Felix <[email protected]> --- lib/awful/widget/tasklist.lua.in | 8 ++------ 1 Datei geändert, 2 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-) diff --git a/lib/awful/widget/tasklist.lua.in b/lib/awful/widget/tasklist.lua.in index c52e4cd..c3c47ef 100644 --- a/lib/awful/widget/tasklist.lua.in +++ b/lib/awful/widget/tasklist.lua.in @@ -154,8 +154,7 @@ end -- @return true if c is on screen, false otherwise function filter.alltags(c, screen) -- Only print client on the same screen as this widget - if c.screen ~= screen then return false end - return true + return c.screen == screen end --- Filtering function to include only the clients from currently selected tags. @@ -213,10 +212,7 @@ end -- @return true if c is focused on screen, false otherwise function filter.focused(c, screen) -- Only print client on the same screen as this widget - if c.screen == screen and capi.client.focus == c then - return true - end - return false + return c.screen == screen and capi.client.focus == c end setmetatable(_M, { __call = function(_, ...) return new(...) end }) -- 1.7.10.1
signature.asc
Description: This is a digitally signed message part
