1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
|
const char *zRepack = "git repack -adf";
gitmirror_message(VERB_NORMAL, "%s\n", zRepack);
fossil_system(zRepack);
}
/* Record this export into the sync log */
zMirrorAbs = file_canonical_name_dup(zMirror);
sync_log_entry(SYNC_PUSH, zMirrorAbs, "git");
fossil_free(zMirrorAbs);
/* Optionally do a "git push" */
zPushUrl = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
if( zPushUrl ){
char *zPushCmd;
UrlData url;
|
|
|
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
|
const char *zRepack = "git repack -adf";
gitmirror_message(VERB_NORMAL, "%s\n", zRepack);
fossil_system(zRepack);
}
/* Record this export into the sync log */
zMirrorAbs = file_canonical_name_dup(zMirror);
sync_log_entry(SYNC_PUSH, zMirrorAbs, "git", 0);
fossil_free(zMirrorAbs);
/* Optionally do a "git push" */
zPushUrl = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'");
if( zPushUrl ){
char *zPushCmd;
UrlData url;
|
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
|
if( rc ){
fossil_fatal("cannot push content using: %s", zPushCmd);
}else if( db_is_writeable("repository") ){
db_unprotect(PROTECT_CONFIG);
db_multi_exec("REPLACE INTO config(name,value,mtime)"
"VALUES('gitpush:%q',1,now())", zPushUrl);
db_protect_pop();
sync_log_entry(SYNC_PUSH, zPushUrl, "git-push");
}
fossil_free(zPushCmd);
}
}
/*
** Implementation of the "fossil git status" command.
|
|
|
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
|
if( rc ){
fossil_fatal("cannot push content using: %s", zPushCmd);
}else if( db_is_writeable("repository") ){
db_unprotect(PROTECT_CONFIG);
db_multi_exec("REPLACE INTO config(name,value,mtime)"
"VALUES('gitpush:%q',1,now())", zPushUrl);
db_protect_pop();
sync_log_entry(SYNC_PUSH, zPushUrl, "git-push", 0);
}
fossil_free(zPushCmd);
}
}
/*
** Implementation of the "fossil git status" command.
|