Theodore Tso <tytso@xxxxxxx> wrote: > I've recently started trying to use some of the scripts in "todo" to > send similar "What's cooking" messages, and started wondering if they > were what Junio actually used in production to send his notes. For > example, the scripts don't work particularly well if the refs have > been packed. So I had to make changes such as these so they would > work for me. I think Junio just makes sure he doesn't pack his refs. :-) > diff --git a/PU b/PU > index 4b4be2b..4643a42 100755 > --- a/PU > +++ b/PU > @@ -26,8 +26,8 @@ case "$#" in > 0) > # interactive ;-) > shift > - HH=`cd .git/refs/heads && find -type f | > - sed -e 's/^\.\///' \ > + HH=`git-show-ref --heads | awk '{print $2}' |\ Perhaps `git for-each-ref --format='%(refname)' refs/heads` is the better change here as then you can avoid the pipe into awk. We still need the sed to strip the refs/heads/ off the results though. > + sed -e 's;refs/heads/;;' \ > -e '/^naster$/d' -e '/^master$/d' -e '/^maint$/d' -e '/^pu$/d'` > while test "$HH" > do I'm actually applying it with the show-ref variant and will wind up pushing it into my tree later tonight. Because I do pack my refs. -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html