commit 5865db93a7d40e4748d09337e70154096c889c78
Author: Dhruva Krishnamurthy <dhruvakm@gmail.com>
Date:   Wed Jun 25 19:06:42 2014 -0700

    Support logical path for files with tag

diff --git a/libutil/getdbpath.c b/libutil/getdbpath.c
index fc466f0..b098376 100644
--- a/libutil/getdbpath.c
+++ b/libutil/getdbpath.c
@@ -211,7 +211,10 @@ setupdbpath(int verbose)
 	char *p;
 	static char msg[1024];
 
-	if (!getcwd(cwd, MAXPATHLEN)) {
+	/* Prefer shorter paths over long realpath if GTAGSLOGICALPATH is set */
+	if (getenv("GTAGSLOGICALPATH") && (p = getenv("PWD"))) {
+		strncpy(cwd, p, sizeof(cwd) - 1);
+	} else if (!getcwd(cwd, MAXPATHLEN)) {
 		gtags_dbpath_error = "cannot get current directory.";
 		return -1;
 	}
