From: Catalin Marinas Date: Fri, 13 Apr 2007 23:02:22 GMT Subject: Re: [BUG] 'stg add FILE' when FILE is a symlink to dir adds dir contents Message-ID: In-Reply-To: <20070411155452.GL5329@moonlight.home> On 11/04/07, Tomash Brechko wrote: > I have noticed that 'stg add FILE' works differently from 'git add > FILE' when file is a symlink to the directory: StGIT adds the contents > of dir, while GIT adds the symlink itself. Thanks for this. > But curious, why does the code traverse the tree itself? Why not to > give the file list directly to git-update-index, and let it decide > what files to add, and how? Because this code was implemented almost 2 years ago when I don't think git-update-index was able to scan directories. Never looked at re-implementing it. > I also guess the code doesn't honor .gitignore. It doesn't, unless git-update-index ignores the files passed on the command line according to the .gitignore content. > Could 'names' list be passed to git-update-index directly? Probably, I'll give it a try and see whether it breaks anything. -- Catalin