@matheusbsbs / matheus-bagliano / commits / 0b868e0240
Fork 0

Remove --branch-log from fast-import.

The --branch-log option and its associated code hasn't been used in several months, as its not really very useful for debugging fast-import or a frontend. I don't plan on supporting it in this state long-term, so I'm killing it now before it gets distributed to a wider audience. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Feb 6, 2007 at 00:15 UTC 0b868e0240eb7f6d3dd137171b07f0860665b6e5
2 files changed -39
Documentation/git-fast-import.txt
-7
@@ -53,13 +53,6 @@ OPTIONS
53 Frontends can use this file to validate imports after they
54 have been completed.
55
56 ---branch-log=<file>::
57 - Records every tag and commit made to a log file. (This file
58 - can be quite verbose on large imports.) This particular
59 - option has been primarily intended to facilitate debugging
60 - gfi and has limited usefulness in other contexts. It may
61 - be removed in future versions.
62 -
56
57 Performance
58 -----------
fast-import.c
-32
@@ -297,7 +297,6 @@ static struct tag *last_tag;
297 static struct strbuf command_buf;
298 static uintmax_t next_mark;
299 static struct dbuf new_data;
300 -static FILE* branch_log;
300
301
302 static void alloc_objects(unsigned int cnt)
@@ -1730,18 +1729,6 @@ static void cmd_new_commit(void)
1729 NULL, b->sha1, next_mark))
1730 b->pack_id = pack_id;
1731 b->last_commit = object_count_by_type[OBJ_COMMIT];
1733 -
1734 - if (branch_log) {
1735 - int need_dq = quote_c_style(b->name, NULL, NULL, 0);
1736 - fprintf(branch_log, "commit ");
1737 - if (need_dq) {
1738 - fputc('"', branch_log);
1739 - quote_c_style(b->name, NULL, branch_log, 0);
1740 - fputc('"', branch_log);
1741 - } else
1742 - fprintf(branch_log, "%s", b->name);
1743 - fprintf(branch_log," :%ju %s\n",next_mark,sha1_to_hex(b->sha1));
1744 - }
1732 }
1733
1734 static void cmd_new_tag(void)
@@ -1821,18 +1808,6 @@ static void cmd_new_tag(void)
1808 t->pack_id = MAX_PACK_ID;
1809 else
1810 t->pack_id = pack_id;
1824 -
1825 - if (branch_log) {
1826 - int need_dq = quote_c_style(t->name, NULL, NULL, 0);
1827 - fprintf(branch_log, "tag ");
1828 - if (need_dq) {
1829 - fputc('"', branch_log);
1830 - quote_c_style(t->name, NULL, branch_log, 0);
1831 - fputc('"', branch_log);
1832 - } else
1833 - fprintf(branch_log, "%s", t->name);
1834 - fprintf(branch_log," :%ju %s\n",from_mark,sha1_to_hex(t->sha1));
1835 - }
1811 }
1812
1813 static void cmd_reset_branch(void)
@@ -1886,11 +1861,6 @@ int main(int argc, const char **argv)
1861 max_active_branches = strtoul(a + 18, NULL, 0);
1862 else if (!strncmp(a, "--export-marks=", 15))
1863 mark_file = a + 15;
1889 - else if (!strncmp(a, "--branch-log=", 13)) {
1890 - branch_log = fopen(a + 13, "w");
1891 - if (!branch_log)
1892 - die("Can't create %s: %s", a + 13, strerror(errno));
1893 - }
1864 else
1865 die("unknown option %s", a);
1866 }
@@ -1929,8 +1899,6 @@ int main(int argc, const char **argv)
1899 dump_tags();
1900 unkeep_all_packs();
1901 dump_marks();
1932 - if (branch_log)
1933 - fclose(branch_log);
1902
1903 total_count = 0;
1904 for (i = 0; i < ARRAY_SIZE(object_count_by_type); i++)