Re: [BUG] 'stg add FILE' when FILE is a symlink to dir adds dir contents
- From
- Catalin Marinas <catalin.marinas@gmail.com>
- Date
- Apr 13, 2007, 23:02 UTC
- Message-ID
- <b0943d9e0704131602o694a46c8xb4101a05cf8ec2d3@mail.gmail.com>
- In-Reply-To
- <20070411155452.GL5329@moonlight.home>
On 11/04/07, Tomash Brechko <tomash.brechko@gmail.com> 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