Matthieu Moy <[EMAIL PROTECTED]> writes: > + (shell-command (concat executable " ls-files -d -o -z | xargs -0 " > + executable " update-index --add --remove")))) > + > > First thing: this reduces DVC's portability. AFAIK, only GNU xargs has > "-0", and I'd rather avoid relying on pipe (I never tried DVC on > windows, but I suspect this pipe can be problematic). Anyway, since > DVC still works if addremove is broken on some platform, it's still a > good prototype at least. > > This: > > + (shell-command (concat executable " ls-files -d -o -z | " > + executable " update-index --add --remove -z > --stdin")))) > > avoids the dependancy on xargs -0, not the one on pipe. > > But more important: this adds supposedly ignored files. > "gitĀ ls-filesĀ -o" shows all unversionned files, and does not use the > appropriate .gitignore. What you need is the list of files at the > bottom of "git status", and unfortunately, I don't know any other way > that parsing "git status" for that. This particular problem should be > solved in upstream git, by extending slightly "git ls-files" I think.
These are both addressed by the new version I just checked in. I found
the canonical example of how to do this on the git mailing list
(remembered reading it before, but thought I had remembered it correctly
before, which ended up not being the case).
--
Michael Olson -- FSF Associate Member #652 |
http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net | /` |\ | | |
Sysadmin -- Hobbies: Lisp, GP2X, HCoop | |_] | \| |_|
Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |
pgp3c02VigJ50.pgp
Description: PGP signature
_______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
