git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-cache-meta -- simple file meta data caching and applying

From
Jay Soffian <jaysoffian@gmail.com>
Date
Jan 9, 2009, 00:22 UTC
Message-ID
<76718490901081622q618c43d0t333882cbe44f6b30@mail.gmail.com>
In-Reply-To
<87hc49jq04.fsf@jidanni.org>
On Thu, Jan 8, 2009 at 7:13 PM,  <jidanni@jidanni.org> wrote:
Show 16 quoted lines
> Gentlemen, I have whipped up this:
>
> #!/bin/sh -e
> #git-cache-meta -- simple file meta data caching and applying.
> #Simpler than etckeeper, metastore, setgitperms, etc.
> : ${GIT_CACHE_META_FILE=.git_cache_meta}
> case $@ in
>    --store|--stdout)
>        case $1 in --store) exec > $GIT_CACHE_META_FILE; esac
>        find $(git ls-files) \
>            \( -user ${USER?} -o -printf 'chowm %u %p\n' \) \
>            \( -group $USER -o -printf 'chgrp %g %p\n' \) \
>            \( \( -type l -o -perm 755 -o -perm 644 \) -o -printf 'chmod %#m %p\n' \);;
>    --apply) sh -e $GIT_CACHE_META_FILE;;
>    *) 1>&2 echo "Usage: $0 --store|--stdout|--apply"; exit 1;;
> esac

It doesn't handle paths which contain white-space. "chown" is typo'd as "chowm". To be useful, the contribution might also include instructions on how it should be used with git, and perhaps also reasoning for why someone would want to use it in place of etckeeper, metastore, setgitperms, etc.

j.
Previous: jidanni@jidanni.orgNext: Jay Soffian
Message 2 of 6 in “git-cache-meta -- simple file meta data caching and applying”
  1. jidanni@jidanni.orgJan 9, 2009
  2. Jay SoffianJan 9, 2009
  3. Jay SoffianJan 9, 2009
  4. jidanni@jidanni.orgJan 9, 2009
  5. Boyd Stephen Smith Jr.Jan 9, 2009
  6. git-cache-meta -- file owner and permissions caching, minimalist approachjidanni@jidanni.org, Jan 10, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.