git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@ucw.cz>
To: Jonas Fonseca <fonseca@diku.dk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Cleanup cogito command usage reporting
Date: Mon, 30 May 2005 10:45:58 +0200	[thread overview]
Message-ID: <20050530084558.GE1036@pasky.ji.cz> (raw)
In-Reply-To: <20050530030521.GA13232@diku.dk>

Dear diary, on Mon, May 30, 2005 at 05:05:21AM CEST, I got a letter
where Jonas Fonseca <fonseca@diku.dk> told me that...
> [ Sorry for the resend. This should bring all usage strings in sync. I
>   forgot to add the new options. ]
> 
>  - Synchronize usage strings with those in cg-help. The command
>    identifiers are still not as descriptive, though.

Ok, I'll focus on this point (the rest seems fine). I think it's
inferior this way, since you are losing information, and for no benefit.

> diff --git a/cg-clone b/cg-clone
> --- a/cg-clone
> +++ b/cg-clone
> @@ -15,11 +15,12 @@
> -USAGE="cg-clone [-s] LOCATION [<directory>]"
> +USAGE="cg-clone [-s] LOCATION [DESTINATION]"
> @@ -30,7 +31,7 @@ if [ "$1" = "-s" ]; then
>  fi
>  
>  location=$1
> -[ "$location" ] || die "usage: cg-clone [-s] SOURCE_LOC [DESTDIR]"
> +[ "$location" ] || usage

LOCATION -> SOURCE_LOC is fine in this context (if we would ever want
DEST_LOC, it would be better to stick with SOURCE_LOC, though). But
DESTDIR->DESTINATION is losing information. In cogito.txt you describe
DESTINATION as a general target location, but it's really a directory
here. And it's shorter.

> diff --git a/cg-export b/cg-export
> --- a/cg-export
> +++ b/cg-export
> @@ -22,7 +22,7 @@ USAGE="cg-export DESTINATION [TREE]"
>  dest=$1
>  id=$(tree-id $2)
>  
> -([ "$dest" ] && [ "$id" ]) || die "usage: cg-export DEST [TREE_ID]"
> +([ "$dest" ] && [ "$id" ]) || usage

I'm for DESTDIR here too, and what harm does the _ID part make here? I
think it's non-obvious otherwise - "TREE" can be understood as some
directory name too.

> diff --git a/cg-help b/cg-help
> --- a/cg-help
> +++ b/cg-help
> @@ -43,7 +43,7 @@ Available commands:
>  	cg-export	DEST [TREE_ID]
>  	cg-help		[COMMAND]
>  	cg-init
> -	cg-log		[-c] [-f] [-m] [-r FROM_ID[:TO_ID]] [FILE]...
> +	cg-log		[-c] [-f] [-m] [-uUSERNAME] [-r FROM_ID[:TO_ID]] [FILE]...
>  	cg-ls		[TREE_ID]
>  	cg-merge	[-c] [-b BASE_ID] FROM_ID
>  	cg-mkpatch	[-m] [-s] [-r FROM_ID[:TO_ID]]

So what about bringing those in sync too? (Or alternatively letting it
be now and build the output dynamically in another patch.)

> diff --git a/cg-merge b/cg-merge
> --- a/cg-merge
> +++ b/cg-merge
> @@ -38,11 +38,11 @@ fi
>  base=
>  if [ "$1" = "-b" ]; then
>  	shift
> -	[ "$1" ] || die "usage: cg-merge [-c] [-b BASE_ID] FROM_ID"
> +	[ "$1" ] || usage

I think BASE_ID->REVISION is loosing information too. What about
BASE_COMMIT or something?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

  reply	other threads:[~2005-05-30  8:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-30  2:36 [PATCH] Cleanup cogito command usage reporting Jonas Fonseca
2005-05-30  3:05 ` Jonas Fonseca
2005-05-30  8:45   ` Petr Baudis [this message]
2005-05-31  1:36     ` Jonas Fonseca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050530084558.GE1036@pasky.ji.cz \
    --to=pasky@ucw.cz \
    --cc=fonseca@diku.dk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).