Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Dec 2020 21:06:19 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Jan Beich <jbeich@freebsd.org>
Cc:        Alan Somers <asomers@freebsd.org>, Rick Macklem <rmacklem@uoguelph.ca>,  FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: referencing one commit in another for git
Message-ID:  <CANCZdfq4PLMPku0g11gK5O9KJi%2Bwqu6M3SJixCcDh3hLo_KkLA@mail.gmail.com>
In-Reply-To: <k0t8-q9q4-wny@FreeBSD.org>
References:  <YQXPR0101MB0968535A875FF1D2C32352E8DDDE0@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <CAOtMX2gsYVeN1NZVjtGX7EDNFnL2qKV%2Bg3GtSS-YFyn1A6_wLg@mail.gmail.com> <CANCZdfp0WDqM_f01JZgScyeDh_tBgYSrWSzk4ruQb526B9y2vw@mail.gmail.com> <k0t8-q9q4-wny@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 23, 2020 at 6:22 PM Jan Beich <jbeich@freebsd.org> wrote:

> Warner Losh <imp@bsdimp.com> writes:
>
> > On Wed, Dec 23, 2020, 3:21 PM Alan Somers <asomers@freebsd.org> wrote:
> >
> >> On Wed, Dec 23, 2020 at 3:16 PM Rick Macklem <rmacklem@uoguelph.ca>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfq4PLMPku0g11gK5O9KJi%2Bwqu6M3SJixCcDh3hLo_KkLA>