Lines 100-105
Link Here
|
100 |
struct cvs_filelist *cf; |
100 |
struct cvs_filelist *cf; |
101 |
struct stat st1, st2; |
101 |
struct stat st1, st2; |
102 |
char *fpath, *logmsg, repo[PATH_MAX]; |
102 |
char *fpath, *logmsg, repo[PATH_MAX]; |
|
|
103 |
char *f, path[PATH_MAX]; |
103 |
struct stat st; |
104 |
struct stat st; |
104 |
struct trigger_list *line_list; |
105 |
struct trigger_list *line_list; |
105 |
struct trigger_line *line; |
106 |
struct trigger_line *line; |
Lines 165-192
Link Here
|
165 |
|
166 |
|
166 |
if (added != NULL && !RB_EMPTY(added)) { |
167 |
if (added != NULL && !RB_EMPTY(added)) { |
167 |
fprintf(fp, "%s Added Files:", CVS_LOGMSG_PREFIX); |
168 |
fprintf(fp, "%s Added Files:", CVS_LOGMSG_PREFIX); |
168 |
RB_FOREACH(cf, cvs_flisthead, added) |
169 |
RB_FOREACH(cf, cvs_flisthead, added) { |
169 |
fprintf(fp, "\n%s\t%s", CVS_LOGMSG_PREFIX, |
170 |
f = cf->file_path; |
170 |
dir != NULL ? basename(cf->file_path) : |
171 |
if (dir != NULL) { |
171 |
cf->file_path); |
172 |
if (strlcpy(path, f, sizeof(path)) >= |
|
|
173 |
sizeof(path)) |
174 |
fatal("cvs_logmsg_create: truncation"); |
175 |
f = basename(path); |
176 |
} |
177 |
fprintf(fp, "\n%s\t%s", CVS_LOGMSG_PREFIX, f); |
178 |
} |
172 |
fputs("\n", fp); |
179 |
fputs("\n", fp); |
173 |
} |
180 |
} |
174 |
|
181 |
|
175 |
if (removed != NULL && !RB_EMPTY(removed)) { |
182 |
if (removed != NULL && !RB_EMPTY(removed)) { |
176 |
fprintf(fp, "%s Removed Files:", CVS_LOGMSG_PREFIX); |
183 |
fprintf(fp, "%s Removed Files:", CVS_LOGMSG_PREFIX); |
177 |
RB_FOREACH(cf, cvs_flisthead, removed) |
184 |
RB_FOREACH(cf, cvs_flisthead, removed) { |
178 |
fprintf(fp, "\n%s\t%s", CVS_LOGMSG_PREFIX, |
185 |
f = cf->file_path; |
179 |
dir != NULL ? basename(cf->file_path) : |
186 |
if (dir != NULL) { |
180 |
cf->file_path); |
187 |
if (strlcpy(path, f, sizeof(path)) >= |
|
|
188 |
sizeof(path)) |
189 |
fatal("cvs_logmsg_create: truncation"); |
190 |
f = basename(path); |
191 |
} |
192 |
fprintf(fp, "\n%s\t%s", CVS_LOGMSG_PREFIX, f); |
193 |
} |
181 |
fputs("\n", fp); |
194 |
fputs("\n", fp); |
182 |
} |
195 |
} |
183 |
|
196 |
|
184 |
if (modified != NULL && !RB_EMPTY(modified)) { |
197 |
if (modified != NULL && !RB_EMPTY(modified)) { |
185 |
fprintf(fp, "%s Modified Files:", CVS_LOGMSG_PREFIX); |
198 |
fprintf(fp, "%s Modified Files:", CVS_LOGMSG_PREFIX); |
186 |
RB_FOREACH(cf, cvs_flisthead, modified) |
199 |
RB_FOREACH(cf, cvs_flisthead, modified) { |
187 |
fprintf(fp, "\n%s\t%s", CVS_LOGMSG_PREFIX, |
200 |
f = cf->file_path; |
188 |
dir != NULL ? basename(cf->file_path) : |
201 |
if (dir != NULL) { |
189 |
cf->file_path); |
202 |
if (strlcpy(path, f, sizeof(path)) >= |
|
|
203 |
sizeof(path)) |
204 |
fatal("cvs_logmsg_create: truncation"); |
205 |
f = basename(path); |
206 |
} |
207 |
fprintf(fp, "\n%s\t%s", CVS_LOGMSG_PREFIX, f); |
208 |
} |
190 |
fputs("\n", fp); |
209 |
fputs("\n", fp); |
191 |
} |
210 |
} |
192 |
|
211 |
|