1 $DragonFly: src/gnu/usr.bin/cvs/cvs/Attic/commit.c.patch,v 1.1 2006/05/27 11:59:44 corecode Exp $
3 ===================================================================
4 RCS file: /cvs/src/contrib/cvs-1.12/src/commit.c,v
5 retrieving revision 1.1.1.1
6 diff -u -r1.1.1.1 commit.c
7 --- src/commit.c 7 Dec 2005 00:15:16 -0000 1.1.1.1
8 +++ src/commit.c 27 May 2006 09:20:10 -0000
13 + /* Check if the user passed -m, but wanted -F */
18 + fd = open(saved_message, O_RDONLY);
19 + /* valid fd -> possibly wrong flag? */
23 + size_t line_alloced = 0;
29 + printf("The message you passed exists as a file\n");
30 + printf("a)bort, c)ontinue, treat as f)ile name\n");
31 + printf("Action: (abort) ");
33 + line_len = getline(&line, &line_alloced, stdin);
36 + error(0, errno, "cannot read from stdin");
37 + error(1, 0, "aborting");
39 + else if (line_len == 0 || *line == '\n' || *line == 'a' || *line == 'A')
41 + error(1, 0, "aborted by user");
43 + else if (*line == 'c' || *line == 'C')
47 + else if (*line == 'f' || *line == 'F')
50 + * We are leaking the memory for the file name,
51 + * but who really cares?
53 + logfile = saved_message;
54 + saved_message = NULL;
57 + printf("Unknown input\n");
65 /* some checks related to the "-F logfile" option */