Files
haikuports/dev-vcs/git/patches/git-1.8.3.4.patchset
Ingo Weinhold 28faa080b8 Add recipe and patches for git 1.8.3.4
The user settings files have moved from $HOME to
~/config/settings/git/.
2013-08-13 21:58:26 +02:00

79 lines
2.0 KiB
Plaintext

From c35cdc07a85b42e2c90b12dc6b824133ad2b6452 Mon Sep 17 00:00:00 2001
From: Ingo Weinhold <ingo_weinhold@gmx.de>
Date: Tue, 13 Aug 2013 08:07:25 +0200
Subject: git-web--browse.sh: use "open" on Haiku
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 1d72ec7..e3f254c 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -132,6 +132,10 @@ if test -z "$browser" ; then
if test -x /usr/bin/cygstart; then
browser_candidates="cygstart $browser_candidates"
fi
+ # /boot/system/haiku_loader indicates Haiku
+ if test -f /boot/system/haiku_loader; then
+ browser_candidates="open $browser_candidates"
+ fi
for i in $browser_candidates; do
init_browser_path $i
--
1.8.3.4
From 4627da2e350c3bc0dcff780db2c8fdce1aedf52e Mon Sep 17 00:00:00 2001
From: Ingo Weinhold <ingo_weinhold@gmx.de>
Date: Tue, 13 Aug 2013 21:03:59 +0200
Subject: On Haiku use the user settings directory instead of HOME
diff --git a/path.c b/path.c
index 04ff148..8668534 100644
--- a/path.c
+++ b/path.c
@@ -5,6 +5,11 @@
#include "strbuf.h"
#include "string-list.h"
+#ifdef __HAIKU__
+# include <FindDirectory.h>
+# include <StorageDefs.h>
+#endif
+
#ifndef get_st_mode_bits
/*
* The replacement lstat(2) we use on Cygwin is incomplete and
@@ -139,6 +144,19 @@ char *git_path(const char *fmt, ...)
void home_config_paths(char **global, char **xdg, char *file)
{
+#ifdef __HAIKU__
+ char settingsPath[B_PATH_NAME_LENGTH];
+
+ *xdg = NULL;
+
+ if (global) {
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, true, settingsPath,
+ sizeof(settingsPath)) == B_OK) {
+ *global = mkpathdup("%s/git/%s", settingsPath, file);
+ } else
+ *global = NULL;
+ }
+#else
char *xdg_home = getenv("XDG_CONFIG_HOME");
char *home = getenv("HOME");
char *to_free = NULL;
@@ -161,6 +179,7 @@ void home_config_paths(char **global, char **xdg, char *file)
*xdg = mkpathdup("%s/git/%s", xdg_home, file);
free(to_free);
+#endif
}
char *git_path_submodule(const char *path, const char *fmt, ...)
--
1.8.3.4