[bug#33454] describe: Delete directory argument from 'display-checkout-info'.

Message ID 20181121142706.21058-1-go.wigust@gmail.com
State Accepted
Headers show
Series [bug#33454] describe: Delete directory argument from 'display-checkout-info'. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Oleg Pykhalov Nov. 21, 2018, 2:27 p.m. UTC
This commit is a following 1255400faabfcf0ca1666d17f2f34ea0d49f6b1f which
added unused optional 'directory' argument.

* guix/scripts/describe.scm (display-checkout-info): Delete directory
argument.
---
 guix/scripts/describe.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ludovic Courtès Nov. 27, 2018, 10:25 a.m. UTC | #1
Oleg Pykhalov <go.wigust@gmail.com> skribis:

> This commit is a following 1255400faabfcf0ca1666d17f2f34ea0d49f6b1f which
> added unused optional 'directory' argument.
>
> * guix/scripts/describe.scm (display-checkout-info): Delete directory
> argument.

LGTM!  I had overlooked this…

Thanks,
Ludo’.
Oleg Pykhalov Nov. 27, 2018, 5:13 p.m. UTC | #2
ludo@gnu.org (Ludovic Courtès) writes:

> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> This commit is a following 1255400faabfcf0ca1666d17f2f34ea0d49f6b1f which
>> added unused optional 'directory' argument.
>>
>> * guix/scripts/describe.scm (display-checkout-info): Delete directory
>> argument.
>
> LGTM!

OK, pushed as 01262f1ece37d5ae9af56c1de6c4eefc758f35ba

Thanks,
Oleg.

Patch

diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index d817d7f7c..761f212f0 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -84,11 +84,11 @@  Display information about the channels currently in use.\n"))
         (format #t (G_ "~%;; warning: GUIX_PACKAGE_PATH=\"~a\"~%")
                 string))))))
 
-(define* (display-checkout-info fmt #:optional directory)
+(define (display-checkout-info fmt)
   "Display information about the current checkout according to FMT, a symbol
 denoting the requested format.  Exit if the current directory does not lie
 within a Git checkout."
-  (let* ((program    (or directory (car (command-line))))
+  (let* ((program    (car (command-line)))
          (directory  (catch 'git-error
                        (lambda ()
                          (repository-discover (dirname program)))