1

Being able to dig into software history and find a proper justification for the code is great.

I think I first saw these in Linux patches - pre-source control. Obviously when Git was written, it supported patch descriptions. But before Git, systems like Subversion or CVS were written with single-line messages in mind.

Are there other influences we can trace this to, or did it mainly came out of Linux development?

2
  • 2
    It seems you haven't actually used CVS or Subversion. They both support multi-line commit messages. – Kusalananda Jun 7 '17 at 22:03
  • I cannot speak for older SCCS versions, since there does not seem to be source code available, but SCCSv4, first published February 18, 1977 supports multi line delta comments. So multi line delta comments have been at least in use 28 years before git. Given that the announcement for SCCSv4 does not mention multi line comments, it is higly probable that you can add another 5 years for SCCSv1. – schily Jun 3 '20 at 16:05
6

RCS predates Linux, supports multi-line change-comments (I've been using that feature since 1988). CVS inherited that from RCS. rcs2log has been around since 1992, rendering RCS logs -- including multiline comments.

RCS's ci prompts for a change-comment with zero or more lines ending with a line containing only a . (like mail). I've been using rcs2log since 2003 to format the RCS logs into readable changelogs such as that for ded.

By the way, SCCS also supports multi-line comments, but I found it less user-friendly in that regard when I began using it in early in 1986 (see discussion).

One aspect of multi-line change-comments which appears to have been overlooked is entering them and possibly revising them. The oldest version of CVS which you might find (1.3 in April 1992) used a text editor for this purpose. The feature is in all subsequent releases of CVS. You can browse the sources here, or check-out a readonly copy. It seems that the repository starts at the end of November 1994, which was between 1.3 and 1.4 (1.5 was released in July 1995). To see 1.3, you'd have to get a tarball.

Linus was certainly aware of it, because the first request reflected in BitKeeper's change-history was for this feature:

commit e1dc29195bd72a9a4c8f1e817e08b8c0358ee88b
Author: Larry McVoy <lm@bitkeeper.com>
Date:   Thu Jan 31 23:29:46 2002 -0800

    Add a bk comment interface so that Linus can edit the comments after
    the fact.

    bk: 3c5a43eabhI7oSce6C4ms5U-kIcEv

To see what was implemented, you might want to read through the source-code. Here's a little bit from a change about a month later (this one's change-comment hints that the initial solution was not satisfactory):

+/*
+ * Prompt the user with a set of comments, returning
+ * 0 if they want to use them,
+ * -1 for an error or an abort.
+ */
+int
+comments_prompt(char *file)
+{
+       char    buf[10];
+       extern  char *editor;
+
+       unless (editor || (editor = getenv("EDITOR"))) editor = "vi";
+       while (1) {
+               printf("\n-------------------------------------------------\n");
+               fflush(stdout);
+               if (cat(file)) return (-1);
+               printf("-------------------------------------------------\n");
+               printf("Use these comments: (e)dit, (a)bort, (u)se? ");

Then again, the question asked about origin. I recall that DEC CMS (predating CVS 1.3) provided its information in full-screen (terminal) mode. I used that in the 1988-1989 time frame. However, Git's origin goes through CVS, and in turn CVS may have been original (in the sense that there was no influence from exposure to earlier tools), or it may not.

3
  • Git also has a convention that the first line is a self-contained summary (and people have standards about maximum line length). E.g. this is used in git web interfaces, gitk, git rebase -i and git log --pretty=short. I suspect this is what I was half-remembering (and utterly failed in researching). I wonder if a convention like this was leveraged in any tool in SVN or earlier software. – sourcejedi Jun 8 '17 at 6:51
  • Back in the days SCSS was pretty successful, but it was commercial. RCS was created as a free alternative to SCSS, but with much less functionality. The first versions of CVS were just wrappers around RCS commands, and subsequent versions still depended on it for a long time. IIRC it was ~1992 that CVS became completely self-contained. – Satō Katsura Jun 8 '17 at 7:48
  • RCS was definitely a commercial product that you had to buy. This canged in 1990. – schily Jun 3 '20 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.