Re: Joining cg-*-id
From: Pavel Roskin <hidden>
Date: 2016-06-15 22:42:06
On Tue, 2005-09-20 at 00:58 +0200, Petr Baudis wrote:
Dear diary, on Tue, Sep 20, 2005 at 12:30:21AM CEST, I got a letter where Pavel Roskin [off-list ref] told me that...quoted
The value is having one command, one manpage and one place to fix little bugs and add more functionality. Potentially, cg-Xnormid could be incorporated into that script, so bash wouldn't have to open one more file.Well, cg-Xnormid is basically pointless if it's not going to be a common backend for multiple other commands. So I'd say either supersede it with git-rev-parse or just merge it with cg-object-id.
Agreed.
quoted
Please don't apply my patch yet - I forgot to document the optional argument. I'll try to make cg-object-id now.Which patch?
The one that adds USAGE. Never mind - I see it's fixed already. As for merging, I see that the existing *-id scripts are a mess. For instance, cg-parent returns parents separated by spaces, but cg-diff used "head -1" on its output to get the first parent, i.e it assumes newline separated output. Another thing that is broken is "cg-commit-id origin^" - apparently the "^" parsing is only designed for cg-parent-id. I think I'll start a local branch for fixing this, and then I'll send separate patches. -- Regards, Pavel Roskin