Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] "How to"
- Date: Mon, 12 May 2014 23:25:50 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] "How to"
- References: <CAJA1Y2bTWLWhb0tcuZyeJQDXtAXsGRdyUw_T_Ft7sZ_W6nXhLQ@mail.gmail.com> <CAKXLc7fOK94iWsRP7QkfjaqotYRXfgRSQRtbMeRCT80M4_-b1w@mail.gmail.com> <87sioffz3p.fsf@uwakimon.sk.tsukuba.ac.jp> <CAJA1Y2ZzArvOAstFK2tQE5yo_dgK4TE72GudigW_6XksB_v60Q@mail.gmail.com> <87oaz3fkfm.fsf@uwakimon.sk.tsukuba.ac.jp> <CAJA1Y2YibQ+-R4_6G3892=aGwj2SB+1r=5q6WDuqnEDwmzuaUg@mail.gmail.com>
Bruno Raoult writes: > On Mon, May 12, 2014 at 10:52 AM, Stephen J. Turnbull <stephen@example.com> wrote: >> For two files in the same directory that have the same content but >> different names, >> >> git cat-file tree `git cat-file commit HEAD | grep tree | cut -b 5-` \ >> | sort -f 3 | uniq -D -w 52 >> >> (untested; probably requires GNU uniq). To handle recursion is >> (recursively ;-) left as an exercise for the reader. > > If files are in the same dir, why using git? There's no restriction to a single directory, it's just that in a single directory a one-liner can be used. > You offered a solution (that I did not test) using git. I am sure > readers will propose alternatives. And this was the target of the > question: which solution would be the best for such a requisite? "Best"? Depends on lots of things. "Good"? Sure -- git is a highly optimized application for tracking and comparing the contents of files. I happen to know a bit about extracting the information you want from a git object database. git would be a lot more reliable than coding the algorithms myself. > Let say another way: What makes you think I didn't understand the first time?
- Follow-Ups:
- Re: [tlug] "How to"
- From: Bruno Raoult
- References:
- [tlug] "How to"
- From: Bruno Raoult
- Re: [tlug] "How to"
- From: Kalin KOZHUHAROV
- Re: [tlug] "How to"
- From: Stephen J. Turnbull
- Re: [tlug] "How to"
- From: Bruno Raoult
- Re: [tlug] "How to"
- From: Stephen J. Turnbull
- Re: [tlug] "How to"
- From: Bruno Raoult
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Living on the command line...
- Next by Date: Re: [tlug] What's with this anti-Apple tirade? [was: 2014-05-10 Linux Quiz]
- Previous by thread: Re: [tlug] "How to"
- Next by thread: Re: [tlug] "How to"
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links