Skip to contentSkip to conversation

change to Next/SHA1s ?

DISCUSSION Kees Cook 2 participants 3 messages Feb 28, 2022 Linux-next tree

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

Hi!

I was curious if it might be possible to emit the commit date along with the tree/SHA1 map in Next/SHA1s? That would let people trivially scan the file for relative age of trees, etc.

-Kees

Signature · 1 line
Kees Cook
#1 lore raw

Hi Kees,

Quoted 4 lines · On Mon, 28 Feb 2022 10:43:37 -0800 Kees Cook <[email protected]> wrote:

I was curious if it might be possible to emit the commit date along with the tree/SHA1 map in Next/SHA1s? That would let people trivially scan the file for relative age of trees, etc.

Of course it is possible :-) Just wondering what the use case is? It does make it a bit harder to read (wider lines).

while read tree sha; do

	if [ "$tree" = 'Name' ] || [ "$tree" = '----' ]; then
		printf '%s\t%s\n' "$tree" "$sha"
	else
		git log -1 --date=iso-strict-local --pretty="$tree	$sha %cd" "$sha"
	fi

done <Next/SHA1s

Signature · 2 lines
Cheers,
Stephen Rothwell
author
#2 lore raw
Quoted 10 lines · Stephen Rothwell

Hi Kees,

Quoted 4 lines · On Mon, 28 Feb 2022 10:43:37 -0800 Kees Cook <[email protected]> wrote:

I was curious if it might be possible to emit the commit date along with the tree/SHA1 map in Next/SHA1s? That would let people trivially scan the file for relative age of trees, etc.

Of course it is possible :-) Just wondering what the use case is? It does make it a bit harder to read (wider lines).

My use case is that I find myself with some frequency looking at "git show next-YYYYMMDD" to see the trees to see what date a given tree is on (some update frequently, some don't, etc).

Quoted 7 lines

while read tree sha; do

	if [ "$tree" = 'Name' ] || [ "$tree" = '----' ]; then
		printf '%s\t%s\n' "$tree" "$sha"
	else
		git log -1 --date=iso-strict-local --pretty="$tree	$sha %cd" "$sha"
	fi

done <Next/SHA1s

Right, I can do it manually, but I was wondering if such a change would be useful to others, or troublesome, etc. :) I can live without it, for sure; I just thought I'd ask. :)

Signature · 1 line
Kees Cook