From: Pavel Roskin <proski@gnu.org>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH] Cogito chicken-and-egg problem
Date: Tue, 26 Apr 2005 13:02:22 -0400 [thread overview]
Message-ID: <1114534942.26856.10.camel@dv> (raw)
In-Reply-To: <Pine.LNX.4.21.0504261229220.30848-100000@iabervon.org>
Hello, Daniel!
On Tue, 2005-04-26 at 12:38 -0400, Daniel Barkalow wrote:
> > Also, the dependency on commit-id was dropped from my patch for some
> > reason. I believe it's still needed. Also, we need a dependency on
> > cat-file, which is used by commit-id internally.
>
> commit-id doesn't really use cat-file; the way it calls gitXnormid.sh
There is gitXnormid.sh in the current cogito. Please update your tree.
> definitely suppresses that section.
That's not what I see if I remove cat-file but leave commit-id in my
$HOME/bin:
proski@dv:~/src/cogito$ make cg-version
/home/proski/bin/commit-id: line 35: cat-file: command not found
Invalid id: f9f0459b5b39cf83143c91ae39b4eaf187cf678a
Generating cg-version...
proski@dv:~/src/cogito$
> In fact, commit-id with no arguments
> is simply an easy-to-remember way of doing "cat .git/HEAD" using a much
> more complicated script. Earlier, I sent a patch to just do this, since it
> avoids the whole issue.
That would be fine with me.
> (Also, .git/HEAD is a dependancy, since you want to redo the version
> script if you commit; but if you don't have it, that's okay and just means
> you're building from a tarball, which is described completely by VERSION)
It should be a conditional dependency, i.e. it should be a dependency
if .git exists.
It seems to me that the whole idea of including SHA1 in cg-version is
broken. SHA1 is not human readable. But if the maintainers insist on
having SHA1 in cg-version, I want it to be done without causing build
warnings for new users.
Here's an alternative patch.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Index: Makefile
===================================================================
--- f262000f302b749e485f5eb971e6aabefbb85680/Makefile (mode:100644 sha1:4f01bbbbb3fd0e53e9ce968f167b6dae68fcfa92)
+++ uncommitted/Makefile (mode:100644)
@@ -87,12 +87,21 @@
http-pull: LIBS += -lcurl
+ifneq (,$(wildcard .git))
+cg-version: $(VERSION) .git/HEAD
+ @echo Generating cg-version...
+ @rm -f $@
+ @echo "#!/bin/sh" > $@
+ @echo "echo \"$(shell cat $(VERSION)) ($(shell cat .git/HEAD))\"" >> $@
+ @chmod +x $@
+else
cg-version: $(VERSION)
@echo Generating cg-version...
@rm -f $@
@echo "#!/bin/sh" > $@
- @PATH=.:$(PATH) echo "echo \"$(shell cat $(VERSION)) ($(shell commit-id))\"" >> $@
+ @echo "echo \"$(shell cat $(VERSION))\"" >> $@
@chmod +x $@
+endif
install: $(PROG) $(SCRIPTS) $(SCRIPT) $(GEN_SCRIPT)
install -m755 -d $(DESTDIR)$(bindir)
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2005-04-26 16:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-26 16:06 [PATCH] Cogito chicken-and-egg problem Pavel Roskin
2005-04-26 16:38 ` Daniel Barkalow
2005-04-26 17:02 ` Pavel Roskin [this message]
2005-04-26 17:48 ` Daniel Barkalow
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=1114534942.26856.10.camel@dv \
--to=proski@gnu.org \
--cc=barkalow@iabervon.org \
--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).