Fossil

Check-in [a0a5be0e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:New information about the git export shown by "fossil git status".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:a0a5be0e976c77cbcf86db31aaad4c3d797794f92b15e12f18ac6a68921f6bce
User & Date: drh 2019-04-22 15:22:12
Context
2019-04-23
01:05
On a "fossil git export", run appropriate "git update-ref" commands to make sure that all refs/heads point to the latest check-ins for the branch, even in cases there the branch has been renamed on the Fossil side by a tag. check-in: ab68afe9 user: drh tags: trunk
2019-04-22
15:22
New information about the git export shown by "fossil git status". check-in: a0a5be0e user: drh tags: trunk
15:09
Fix a problem in the git-export database schema upgrade logic. check-in: 84949f51 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/export.c.

1526
1527
1528
1529
1530
1531
1532

1533
1534
1535
1536
1537
1538
1539
....
1547
1548
1549
1550
1551
1552
1553














1554
1555
1556
1557
1558
1559
1560
** Implementation of the "fossil git status" command.
**
** Show the status of a "git export".
*/
void gitmirror_status_command(void){
  char *zMirror;
  char *z;

  db_find_and_open_repository(0, 0);
  verify_all_options();
  zMirror = db_get("last-git-export-repo", 0);
  if( zMirror==0 ){
    fossil_print("Git mirror:  none\n");
    return;
  }
................................................................................
  if( z==0 ){
    fossil_print("Autopush:    off\n");
  }else{
    UrlData url;
    url_parse_local(z, 0, &url);
    fossil_print("Autopush:    %s\n", url.canonical);
  }














}

/*
** COMMAND: git
**
** Usage: %fossil git SUBCOMMAND
**







>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>







1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
....
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
** Implementation of the "fossil git status" command.
**
** Show the status of a "git export".
*/
void gitmirror_status_command(void){
  char *zMirror;
  char *z;
  int n, k;
  db_find_and_open_repository(0, 0);
  verify_all_options();
  zMirror = db_get("last-git-export-repo", 0);
  if( zMirror==0 ){
    fossil_print("Git mirror:  none\n");
    return;
  }
................................................................................
  if( z==0 ){
    fossil_print("Autopush:    off\n");
  }else{
    UrlData url;
    url_parse_local(z, 0, &url);
    fossil_print("Autopush:    %s\n", url.canonical);
  }
  n = db_int(0,
    "SELECT count(*) FROM event"
    " WHERE type='ci'"
    "   AND mtime>coalesce((SELECT value FROM mconfig"
                          "  WHERE key='start'),0.0)"
  );
  if( n==0 ){
    fossil_print("Status:      up-to-date\n");
  }else{
    fossil_print("Status:      %d check-ins awaiting export\n", n);
  }
  n = db_int(0, "SELECT count(*) FROM mmark WHERE isfile");
  k = db_int(0, "SELECT count(*) FROm mmark WHERE NOT isfile");
  fossil_print("Exported:    %d check-ins and %d file blobs\n", k, n);
}

/*
** COMMAND: git
**
** Usage: %fossil git SUBCOMMAND
**