On Tue, Apr 14, 2020 at 12:17:44PM -0400, J. Bruce Fields wrote: > On Tue, Apr 14, 2020 at 12:20:16PM -0300, Jason Gunthorpe wrote: > > On Tue, Apr 14, 2020 at 11:13:03AM -0400, J. Bruce Fields wrote: > > > On Tue, Apr 14, 2020 at 09:19:31AM -0300, Jason Gunthorpe wrote: > > > > On Mon, Apr 13, 2020 at 03:29:07PM -0400, J. Bruce Fields wrote: > > > > > On Thu, Apr 09, 2020 at 02:47:50PM -0300, Jason Gunthorpe wrote: > > > > > > On Thu, Apr 09, 2020 at 10:33:32AM -0400, Chuck Lever wrote: > > > > > > > The commit ID is what automation should key off of. The short > > > > > > > description is only for human consumption. > > > > > > > > > > > > Right, so if the actual commit message isn't included so humans can > > > > > > read it then what was the point of including anything? > > > > > > > > > > Personally as a human reading commits in a terminal window I prefer the > > > > > abbreviated form. > > > > > > > > Frankly, I think they are useless, picking one of yours at random: > > > > > > > > Fixes: 4e48f1cccab3 "NFSD: allow inter server COPY to have... " > > > > > > > > And sadly the '4e48f1cccab3' commit doesn't appear in Linus's tree so > > > > > > Ow, apologies. Looks like I rebased after writing that Fixes tag. > > > > > > I wonder if it's possible to make git warn.... > > > > > > Looks like a pre-rebase hook could check the branch being rebased for > > > "Fixes:" lines referencing commits on the rebased branch. > > > > I have some silly stuff to check patches before pushing them and it > > includes checking the fixes lines because they are very often > > wrong, both with wrong commit IDs and wrong subjects! > > I'd be interested in seeing it. checkpatch.pl checks it or supposed to check. commit a8dd86bf746256fbf68f82bc13356244c5ad8efa Author: Matteo Croce <mcroce@xxxxxxxxxx> Date: Wed Sep 25 16:46:38 2019 -0700 checkpatch.pl: warn on invalid commit id It can happen that a commit message refers to an invalid commit id, because the referenced hash changed following a rebase, or simply by mistake. Add a check in checkpatch.pl which checks that an hash referenced by a Fixes tag, or just cited in the commit message, is a valid commit id. $ scripts/checkpatch.pl <<'EOF' Subject: [PATCH] test commit Sample test commit to test checkpatch.pl Commit 1da177e4c3f4 ("Linux-2.6.12-rc2") really exists, commit 0bba044c4ce7 ("tree") is valid but not a commit, while commit b4cc0b1c0cca ("unknown") is invalid. Fixes: f0cacc14cade ("unknown") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") EOF WARNING: Unknown commit id '0bba044c4ce7', maybe rebased or not pulled? #8: commit 0bba044c4ce7 ("tree") is valid but not a commit, WARNING: Unknown commit id 'b4cc0b1c0cca', maybe rebased or not pulled? #9: while commit b4cc0b1c0cca ("unknown") is invalid. WARNING: Unknown commit id 'f0cacc14cade', maybe rebased or not pulled? #11: Fixes: f0cacc14cade ("unknown") total: 0 errors, 3 warnings, 4 lines checked Link: http://lkml.kernel.org/r/20190711001640.13398-1-mcroce@xxxxxxxxxx Signed-off-by: Matteo Croce <mcroce@xxxxxxxxxx> Cc: Joe Perches <joe@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>