DEV Community

Rudy Chung
Rudy Chung

Posted on • Edited on

OSD600 Lab 3

In this lab, I added to my SSG program (SauSaGe) in order to demonstrate the process of working with and merging parallel branches in a project.

What I added

I chose to add features to the existing Markdown parsing functionality of my program that allowed for replacing either a set of three dashes (---) or asterisks (***) with a horizontal rule <hr> tag (#13), as well as parsing of a set of backticks (`) to create a set of <code> tags (#14).

The changes

I was fortunate enough that my code was modularized such that it was easy to add these two features in without disrupting the existing infrastructure. For the horizontal rule change (b27e0b91), I used the existing infrastructure that was provided by #10 to create my own addition. For the code tag change (03d7c91b), I again used the existing infrastructure this time provided by #9, that uses the regex library in C++ to perform token replacements while preserving the token contained between the two matched tokens.

Merging Changes

Merging was a relatively smooth process for the two branches I created, since there were no conflicts between the branches I was merging. In the previous lab however, I did deal with some conflicts having to reconcile code between #9 and #10, since they both added related features. These problems were compounded with the fact that I had some commits that I made which changed the file structure of my project, and altered parts of my code that were not pushed. This caused a whole bevy of problems that I had to reconcile while merging the two pull requests I received.

Lessons for the future

In the future, I will try to push any changes as soon as possible, especially if I am anticipating any pull requests. I will continue to try to keep my code modular as it greatly eases the process of merging changes from pull requests or otherwise to the main branch.

Top comments (0)