git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <J.Sixt@eudaptics.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] Avoid double-slash in path names that depend on $(sharedir).
Date: Mon, 11 Jun 2007 11:10:47 +0200	[thread overview]
Message-ID: <466D1197.FAA7B7EE@eudaptics.com> (raw)
In-Reply-To: 7v645usy4c.fsf@assigned-by-dhcp.pobox.com

Junio C Hamano wrote:
> 
> Johannes Sixt <johannes.sixt@telecom.at> writes:
> 
> > diff --git a/Makefile b/Makefile
> > index af84af9..c23031c 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -144,7 +144,7 @@ STRIP ?= strip
> >  prefix = $(HOME)
> >  bindir = $(prefix)/bin
> >  gitexecdir = $(bindir)
> > -sharedir = $(prefix)/share/
> > +sharedir = $(prefix)/share
> >  template_dir = $(sharedir)/git-core/templates/
> >  ifeq ($(prefix),/usr)
> >  sysconfdir = /etc
> 
> This suggests that we would also want to drop the trailing slash
> from template_dir, doesn't it?
> 
> I took a brief look at builtin-init-db.c but it seems that the
> code is safe with or without the trailing slash there.

It amounts to this on top of my other patch. It's not worth it,
if you ask me.

--- 8< ---
From: Johannes Sixt <johannes.sixt@telecom.at>
Subject: [PATCH] Remove trailing slash from $(template_dir).

This is just a consistency cleanup. sharedir is defined a line above
template_dir and doesn't have the trailing slash, either.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 Makefile           |    2 +-
 builtin-init-db.c  |    2 +-
 templates/Makefile |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index c23031c..7091a4b 100644
--- a/Makefile
+++ b/Makefile
@@ -145,7 +145,7 @@ prefix = $(HOME)
 bindir = $(prefix)/bin
 gitexecdir = $(bindir)
 sharedir = $(prefix)/share
-template_dir = $(sharedir)/git-core/templates/
+template_dir = $(sharedir)/git-core/templates
 ifeq ($(prefix),/usr)
 sysconfdir = /etc
 else
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 4df9fd0..0be2d2e 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -7,7 +7,7 @@
 #include "builtin.h"
 
 #ifndef DEFAULT_GIT_TEMPLATE_DIR
-#define DEFAULT_GIT_TEMPLATE_DIR "/usr/share/git-core/templates/"
+#define DEFAULT_GIT_TEMPLATE_DIR "/usr/share/git-core/templates"
 #endif
 
 #ifdef NO_TRUSTABLE_FILEMODE
diff --git a/templates/Makefile b/templates/Makefile
index b8352e7..aaa39d3 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -7,7 +7,7 @@ endif
 INSTALL ?= install
 TAR ?= tar
 prefix ?= $(HOME)
-template_dir ?= $(prefix)/share/git-core/templates/
+template_dir ?= $(prefix)/share/git-core/templates
 # DESTDIR=
 
 # Shell quote (do not use $(call) to accommodate ancient setups);
-- 
1.5.2.1.176.g7084-dirty

      reply	other threads:[~2007-06-11  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11  8:02 [PATCH] Avoid double-slash in path names that depend on $(sharedir) Johannes Sixt
2007-06-11  8:18 ` Junio C Hamano
2007-06-11  9:10   ` Johannes Sixt [this message]

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=466D1197.FAA7B7EE@eudaptics.com \
    --to=j.sixt@eudaptics.com \
    --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).