-
Notifications
You must be signed in to change notification settings - Fork 0
/
misc_cmds.cpp
134 lines (105 loc) · 2.92 KB
/
misc_cmds.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* M I S C _ C M D S . C P P
* BRL-CAD
*
* Published in 2020 by the United States Government.
* This work is in the public domain.
*
*/
/** @file misc_cmds.cpp
*
* Various commands not truly handled/implemented
* in repowork but mentioned in the git fast-import
* documentation.
*
*/
#include "repowork.h"
int
parse_alias(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
line.erase(0, 6); // Remove "alias " prefix
// For the moment, we don't support aliass so this never works...
std::cerr << "Unsupported command \"alias\" (specified: : " << line << ")\n";
return -1;
}
int
parse_cat_blob(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
// For the moment, we don't support cat_blobs so this never works...
std::cerr << "Unsupported command \"cat_blob\" - ignored\n";
return 0;
}
int
parse_checkpoint(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
// For the moment, we don't support checkpoints so this never works...
std::cerr << "Unsupported command \"checkpoint\" - ignored\n";
return 0;
}
int
parse_done(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
// For the moment, we don't support dones so this never works...
std::cerr << "Unsupported command \"done\"- ignored\n";
return 0;
}
int
parse_feature(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
line.erase(0, 8); // Remove "feature " prefix
// For the moment, we don't support any features so this never works...
std::cerr << "Unsupported command \"feature\" (specified: " << line << ")\n";
return -1;
}
int
parse_get_mark(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
// For the moment, we don't support get_marks so this never works...
std::cerr << "Unsupported command \"get_mark\" - ignored\n";
return -1;
}
int
parse_ls(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
// For the moment, we don't support lss so this never works...
std::cerr << "Unsupported command \"ls\" - ignored\n";
return 0;
}
int
parse_option(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
// For the moment, we don't support options so this never works...
std::cout << "Unsupported command \"option\" - ignored\n";
return -1;
}
int
parse_progress(git_fi_data *fi_data, std::ifstream &infile)
{
std::string line;
std::getline(infile, line);
std::cerr << line << "\n";
return 0;
}
// Local Variables:
// tab-width: 8
// mode: C++
// c-basic-offset: 4
// indent-tabs-mode: t
// c-file-style: "stroustrup"
// End:
// ex: shiftwidth=4 tabstop=8