Re: referencing one commit in another for git
Warner Losh wrote: On Wed, Dec 23, 2020 at 6:22 PM Jan Beich wrote: Warner Losh writes: On Wed, Dec 23, 2020, 3:21 PM Alan Somers wrote: On Wed, Dec 23, 2020 at 3:16 PM Rick Macklem wrote: Hi, So I just did my first git commit. Pretty scary, but it looks ok. Now, how do I reference one commit in another related commit's log? By the long winded hash or ?? I'm not sure if I should ask here or on the git mailing list, but I figured this isn't a technical git question... Thanks for any help with this, rick Yeah, you should use the full hash. For temporary references, like during a code review, you can use the first "several" digits of the hash. For a project of FreeBSD's size, "several" is probably 11-13. But in permanent contexts, like commit logs, you should use the full hash. When somebody views the commit on a platform like Github, Github will automatically turn it into a hyperlink, and display only the first "several" digits. For MFCs we are recommending the first 11. I think this will likely suffice and matches the git client behavior. Mercurial defaults to 12 digit abbreviation. Git abbreviates linux, freebsd-legacy, freebsd-ports repos on GitHub to 12 digit. I've updated to 12. That sounds like a good number of digits...Thanks. I think the common way is to use `git rev-parse --short `, though we are likely to recommend increasing the core.abbrev value which sets the minimum length of unique prefix (default is 4). ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: referencing one commit in another for git
On Wed, Dec 23, 2020 at 6:22 PM Jan Beich wrote: > Warner Losh writes: > > > On Wed, Dec 23, 2020, 3:21 PM Alan Somers wrote: > > > >> On Wed, Dec 23, 2020 at 3:16 PM Rick Macklem > wrote: > >> > >> > Hi, > >> > > >> > So I just did my first git commit. Pretty scary, but it looks ok. > >> > > >> > Now, how do I reference one commit in another related > >> > commit's log? > >> > > >> > By the long winded hash or ?? > >> > > >> > I'm not sure if I should ask here or on the git mailing list, > >> > but I figured this isn't a technical git question... > >> > > >> > Thanks for any help with this, rick > >> > > >> > >> Yeah, you should use the full hash. For temporary references, like > during > >> a code review, you can use the first "several" digits of the hash. > For a > >> project of FreeBSD's size, "several" is probably 11-13. But in > permanent > >> contexts, like commit logs, you should use the full hash. When somebody > >> views the commit on a platform like Github, Github will automatically > turn > >> it into a hyperlink, and display only the first "several" digits. > >> > > > > > > For MFCs we are recommending the first 11. I think this will likely > suffice > > and matches the git client behavior. > > Mercurial defaults to 12 digit abbreviation. Git abbreviates linux, > freebsd-legacy, freebsd-ports repos on GitHub to 12 digit. > I've updated to 12. That sounds like a good number of digits...Thanks. Warner ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: referencing one commit in another for git
Warner Losh writes: > On Wed, Dec 23, 2020, 3:21 PM Alan Somers wrote: > >> On Wed, Dec 23, 2020 at 3:16 PM Rick Macklem wrote: >> >> > Hi, >> > >> > So I just did my first git commit. Pretty scary, but it looks ok. >> > >> > Now, how do I reference one commit in another related >> > commit's log? >> > >> > By the long winded hash or ?? >> > >> > I'm not sure if I should ask here or on the git mailing list, >> > but I figured this isn't a technical git question... >> > >> > Thanks for any help with this, rick >> > >> >> Yeah, you should use the full hash. For temporary references, like during >> a code review, you can use the first "several" digits of the hash. For a >> project of FreeBSD's size, "several" is probably 11-13. But in permanent >> contexts, like commit logs, you should use the full hash. When somebody >> views the commit on a platform like Github, Github will automatically turn >> it into a hyperlink, and display only the first "several" digits. >> > > > For MFCs we are recommending the first 11. I think this will likely suffice > and matches the git client behavior. Mercurial defaults to 12 digit abbreviation. Git abbreviates linux, freebsd-legacy, freebsd-ports repos on GitHub to 12 digit. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: referencing one commit in another for git
On Wed, Dec 23, 2020, 3:21 PM Alan Somers wrote: > On Wed, Dec 23, 2020 at 3:16 PM Rick Macklem wrote: > > > Hi, > > > > So I just did my first git commit. Pretty scary, but it looks ok. > > > > Now, how do I reference one commit in another related > > commit's log? > > > > By the long winded hash or ?? > > > > I'm not sure if I should ask here or on the git mailing list, > > but I figured this isn't a technical git question... > > > > Thanks for any help with this, rick > > > > Yeah, you should use the full hash. For temporary references, like during > a code review, you can use the first "several" digits of the hash. For a > project of FreeBSD's size, "several" is probably 11-13. But in permanent > contexts, like commit logs, you should use the full hash. When somebody > views the commit on a platform like Github, Github will automatically turn > it into a hyperlink, and display only the first "several" digits. > For MFCs we are recommending the first 11. I think this will likely suffice and matches the git client behavior. Warner -Alan > ___ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: referencing one commit in another for git
On Wed, Dec 23, 2020 at 3:16 PM Rick Macklem wrote: > Hi, > > So I just did my first git commit. Pretty scary, but it looks ok. > > Now, how do I reference one commit in another related > commit's log? > > By the long winded hash or ?? > > I'm not sure if I should ask here or on the git mailing list, > but I figured this isn't a technical git question... > > Thanks for any help with this, rick > Yeah, you should use the full hash. For temporary references, like during a code review, you can use the first "several" digits of the hash. For a project of FreeBSD's size, "several" is probably 11-13. But in permanent contexts, like commit logs, you should use the full hash. When somebody views the commit on a platform like Github, Github will automatically turn it into a hyperlink, and display only the first "several" digits. -Alan ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
referencing one commit in another for git
Hi, So I just did my first git commit. Pretty scary, but it looks ok. Now, how do I reference one commit in another related commit's log? By the long winded hash or ?? I'm not sure if I should ask here or on the git mailing list, but I figured this isn't a technical git question... Thanks for any help with this, rick ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"