GGrraaffttiinngg NNeettBBSSDD hhiissttoorryy oonnttoo OOppeennBBSSDD Published February 2, 2022 _m_k_d_i_r_(_1_)[1] has been around for a long time. While reading the history of its source code, I ran into Theoʼs _i_n_i_t_i_a_l _i_m_p_o_r_t _o_f _N_e_t_B_S_D[2] (commit ddff993300bbee770088dd). Since OpenBSD and NetBSD both provide Git mirrors of their repositories, I wondered if I could graft NetBSDʼs old history onto the tail end of OpenBSDʼs history. As best I can tell, Theoʼs initial import corresponds closely to NetBSDʼs _c_o_m_m_i_t _e_3_c_c_7_6_9_1_5_a_7[3]. That commit added French messages to ddiissttrriibb//sseettss//lliissttss//bbaassee//mmii. Theoʼs first commit has that change but not any subsequent ones. With a plausible common-ancestor in hand, I modified my OpenBSD repository so that it can use my NetBSD repository as an alternate object store. I did that by adding the line //hhoommee//mmiicchhaaeell//ssrrcc//nneettbbssdd//..ggiitt//oobbjjeeccttss// to my OpenBSD repoʼs _._g_i_t_/_o_b_j_e_c_t_s_/_i_n_f_o_/_a_l_t_e_r_n_a_t_e_s[4]. To convince myself that the alternate is working, I ran ggiitt sshhooww ee33cccc7766991155aa77 in my OpenBSD repository and the NetBSD commit appeared. The last step was to persuade Git that Theoʼs import commit had that NetBSD commit as its parent. This did the trick: ggiitt rreeppllaaccee ----ggrraafftt ddff993300bbee770088dd ee33cccc7766991155aa77 Now, when I ggiitt lloogg ---- bbiinn//mmkkddiirr//mmkkddiirr..cc I see the history of mmkkddiirr all the way back to when NetBSD imported from 386bsd-0.1. It works with ggiitt bbllaammee too. 1: https://man.openbsd.org/OpenBSD-7.0/man1/mkdir.1 2: https://github.com/openbsd/src/commit/df930be708d50e9715f173caa26ffe1b7599b157 3: https://github.com/NetBSD/src/commit/e3cc76915a7691fabbfc090fabb584cb6e41e02f 4: https://git-scm.com/docs/gitrepository-layout#Documentation/gitrepository-layout.txt-objectsinfoalternates