[PATCH] cg-commit: prefix the relative path to the message file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Makes the -M switch work from a subdirectory.

Signed-off-by: Jonas Fonseca <fonseca@xxxxxxx>

---

Jim Meyering <jim@xxxxxxxxxxxx> wrote Wed, Aug 23, 2006:
> Hello,

Hi,

> I discovered that "cg-commit -M MSG-FILE ..." fails when run from
> a subdirectory, and when MSG-FILE is a relative file name.
> This is using cogito-0.17.3-2 from Debian/unstable, but the problem
> remains when using the latest cogito sources, pulled minutes ago.

The attached patch should fix this problem.

---

 cg-commit |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cg-commit b/cg-commit
index 0cec58f..5cebd81 100755
--- a/cg-commit
+++ b/cg-commit
@@ -398,7 +398,7 @@ fi
 
 if [ "$msgfile" ]; then
 	[ "$written" ] && echo >>"$LOGMSG"
-	cat "$msgfile" >>"$LOGMSG" || exit 1
+	cat "$_git_relpath$msgfile" >>"$LOGMSG" || exit 1
 	written=1
 fi
 

-- 
Jonas Fonseca
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]