Fossil SCM

In git export/status, apply the same URL logic as [076b7694046c4] to avoid attempting to URL-parse git@... URLs and gracefully handle scp aliases which start with 'http'.

stephan 2026-11-22 13:52 UTC trunk
Commit b500e561aa053ec4f4cd52987e4d023dacd90cef5bb3c7e0b7f83926eb1ef528
1 file changed +6 -2
+6 -2
--- src/export.c
+++ src/export.c
@@ -1718,11 +1718,13 @@
17181718
/* Optionally do a "git push" */
17191719
zPushUrl = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
17201720
if( zPushUrl ){
17211721
char *zPushCmd;
17221722
UrlData url;
1723
- if( sqlite3_strglob("http*", zPushUrl)==0 ){
1723
+ if( fossil_strnicmp(zPushUrl, "http://", 7)==0
1724
+ || fossil_strnicmp(zPushUrl, "https://", 8)==0
1725
+ ){
17241726
url_parse_local(zPushUrl, 0, &url);
17251727
zPushCmd = mprintf("git push --mirror %s", url.canonical);
17261728
}else{
17271729
zPushCmd = mprintf("git push --mirror %s", zPushUrl);
17281730
}
@@ -1801,11 +1803,13 @@
18011803
z = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
18021804
if( z==0 ){
18031805
fossil_print("Autopush: off\n");
18041806
}else{
18051807
UrlData url;
1806
- if( sqlite3_strglob("http*", z)==0 ){
1808
+ if( fossil_strnicmp(z, "http://", 7)==0
1809
+ || fossil_strnicmp(z, "https://", 8)==0
1810
+ ){
18071811
url_parse_local(z, 0, &url);
18081812
fossil_print("Autopush: %s\n", url.canonical);
18091813
}else{
18101814
fossil_print("Autopush: %s\n", z);
18111815
}
18121816
--- src/export.c
+++ src/export.c
@@ -1718,11 +1718,13 @@
1718 /* Optionally do a "git push" */
1719 zPushUrl = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
1720 if( zPushUrl ){
1721 char *zPushCmd;
1722 UrlData url;
1723 if( sqlite3_strglob("http*", zPushUrl)==0 ){
 
 
1724 url_parse_local(zPushUrl, 0, &url);
1725 zPushCmd = mprintf("git push --mirror %s", url.canonical);
1726 }else{
1727 zPushCmd = mprintf("git push --mirror %s", zPushUrl);
1728 }
@@ -1801,11 +1803,13 @@
1801 z = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
1802 if( z==0 ){
1803 fossil_print("Autopush: off\n");
1804 }else{
1805 UrlData url;
1806 if( sqlite3_strglob("http*", z)==0 ){
 
 
1807 url_parse_local(z, 0, &url);
1808 fossil_print("Autopush: %s\n", url.canonical);
1809 }else{
1810 fossil_print("Autopush: %s\n", z);
1811 }
1812
--- src/export.c
+++ src/export.c
@@ -1718,11 +1718,13 @@
1718 /* Optionally do a "git push" */
1719 zPushUrl = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
1720 if( zPushUrl ){
1721 char *zPushCmd;
1722 UrlData url;
1723 if( fossil_strnicmp(zPushUrl, "http://", 7)==0
1724 || fossil_strnicmp(zPushUrl, "https://", 8)==0
1725 ){
1726 url_parse_local(zPushUrl, 0, &url);
1727 zPushCmd = mprintf("git push --mirror %s", url.canonical);
1728 }else{
1729 zPushCmd = mprintf("git push --mirror %s", zPushUrl);
1730 }
@@ -1801,11 +1803,13 @@
1803 z = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
1804 if( z==0 ){
1805 fossil_print("Autopush: off\n");
1806 }else{
1807 UrlData url;
1808 if( fossil_strnicmp(z, "http://", 7)==0
1809 || fossil_strnicmp(z, "https://", 8)==0
1810 ){
1811 url_parse_local(z, 0, &url);
1812 fossil_print("Autopush: %s\n", url.canonical);
1813 }else{
1814 fossil_print("Autopush: %s\n", z);
1815 }
1816

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button