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

Re: A system administration use case for git

From
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date
Apr 23, 2009, 11:39 UTC
Message-ID
<20090423113924.GA22915@pengutronix.de>
In-Reply-To
<49F04511.3070601@viscovery.net>
Hi Hannes,
On Thu, Apr 23, 2009 at 12:38:09PM +0200, Johannes Sixt wrote:
Show 8 quoted lines
> Uwe Kleine-König schrieb:
> > There is a practical problem though:  The filelist has to be sorted in a
> > way that is not provided by ls, so:
> > 
> > 	ukleinek@cepheus:~/gsrc/linux-2.6/usr$ for f in $(ls -A); do printf "100644 %s\x00" $f; git hash-object $f | perl -n -e 'chomp; for $c (split(/(.{2})/)) { printf("%c", hex($c)) if $c }'; done | git hash-object -t tree -w --stdin
> > 	a0a6efb3f1de956badc7607c7d372cc325a18846
> 
> Does ... $(LANG=C ls -A) ... make a difference for you?

oh, up to now I thought that C and en_US.UTF-8 use the same sorting. So yes, it does it right then.

Best regards and thanks Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Previous: Johannes SixtNext: Jon Seymour
Message 5 of 8 in “A system administration use case for git”
  1. Jon SeymourApr 22, 2009
  2. Martin LanghoffApr 22, 2009
  3. Uwe Kleine-KönigApr 23, 2009
  4. Johannes SixtApr 23, 2009
  5. Uwe Kleine-KönigApr 23, 2009
  6. Jon SeymourApr 22, 2009
  7. Martin LanghoffApr 22, 2009
  8. Jon SeymourApr 22, 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.