all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Claus <claus.klingberg@gmail.com>
To: "Emacs Devel" <emacs-devel@gnu.org>
Cc: ams@gnu.org, Dan Nicolaescu <dann@ics.uci.edu>
Subject: Re: vc-git bug with top-level repositories
Date: Tue, 19 Aug 2008 13:01:54 +0200	[thread overview]
Message-ID: <fb5c9a920808190401y3b65e1b7v195de781e2bd00d0@mail.gmail.com> (raw)
In-Reply-To: <200808182031.m7IKVbR7001754@sallyv1.ics.uci.edu>

So I dug deeper and it seems like the culprit (at least in my
situation) is in the function vc-find-root:

This function is traversing the directory tree for a file upwards to
look for (in our case) the root .git directory. If it finds it, the
file will be treated as under GIT-version control.

As an optimization(?), the following comment describes why traversing
is stopped when the owner of an encountered file/dir changes:

[...]
;; As a heuristic, we stop looking up the hierarchy of
;; directories as soon as we find a directory belonging
;; to another user.  This should save us from looking in
;; things like /net and /afs.  This assumes that all the
;; files inside a project belong to the same user.
[...]

So in my case "c:/work/foo/bar/somefile" had a different owner than
"c:/work/foo/bar" so Emacs stopped looking for .git further upwards
--> no version control enabled.

As a workaround, setting the owner on "c:/work/foo/bar" to be equal to
"somefile" fixed the problem for me.

I'm not yet sure if this is a bug or a feature and will perhaps patch
the code for myself once I've found a better solution (or understand
why checking the owner would make sense - on Windows anyway).

What still bothers me is that I could swear I didn't have this problem
in my last build from July. Strange.... since nobody touched this
particular function since February this year.


Claus



On Mon, Aug 18, 2008 at 10:31 PM, Dan Nicolaescu <dann@ics.uci.edu> wrote:
> Claus <claus.klingberg@gmail.com> writes:
>
>  > > Try to figure out why (vc-git-registered "c:/work/foo/bar/somefile.xml")
>  > > does not return t.
>  >
>  > Fair enough :)
>  >
>  > Well, it seems like vc-git-registered returns t for files in the
>  > top-level git-directory (the directory, where .git resides). It does
>  > however NOT return t for files in subdirectories of where the .git dir
>  > resides.
>
> Please "Try to figure out why"...
>
>  > Any recent changes to vc-git-registered that might have caused this?
>
> No idea.
>




  reply	other threads:[~2008-08-19 11:01 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-16  9:17 vc-git bug with top-level repositories Alfred M. Szmidt
2008-08-18 14:33 ` Dan Nicolaescu
2008-08-18 16:24   ` Claus
2008-08-18 16:39     ` Dan Nicolaescu
2008-08-18 20:10       ` Claus
2008-08-18 20:31         ` Dan Nicolaescu
2008-08-19 11:01           ` Claus [this message]
2008-08-19 12:00             ` Paul R
2008-08-19 16:56               ` Dan Nicolaescu
2008-08-19 20:43                 ` Alfred M. Szmidt
2008-08-19 21:34                   ` Andreas Schwab
2008-08-20  2:22                     ` Miles Bader
2008-08-20  9:18                       ` Paul R
2008-08-19 18:46             ` Eli Zaretskii
2008-08-20 14:34               ` Stefan Monnier
2008-08-20 15:51                 ` Eli Zaretskii
     [not found]                   ` <86bpzn4qw2.fsf@lola.quinscape.zz>
2008-08-20 16:11                     ` Eli Zaretskii
2008-08-20 22:44                   ` Alfred M. Szmidt
2008-08-27 15:21                     ` Stefan Monnier
2008-08-27 21:17                       ` Alfred M. Szmidt
2008-08-28  2:09                         ` Stefan Monnier
2008-08-29  0:40                           ` Miles Bader
2008-08-29 14:09                           ` Alfred M. Szmidt
2008-08-27 15:24                   ` Stefan Monnier
2008-08-27 21:16                     ` Alfred M. Szmidt
2008-08-28  2:06                       ` Stefan Monnier
     [not found]                         ` <1219912261.8925.63.camel@ubuntu804desktop.localdomain>
     [not found]                           ` <jwvd4jt87g0.fsf-monnier+emacs@gnu.org>
2008-08-28 19:19                             ` Mathias Megyei
2008-08-29 20:12                               ` Claus
2008-10-25 15:20                               ` Stefan Monnier
2008-10-27 12:43                                 ` Mathias Megyei
2008-08-29 14:05                         ` Alfred M. Szmidt
2008-08-29 15:53                           ` Stefan Monnier
2008-08-19 20:07             ` Alfred M. Szmidt
2008-08-18 21:05   ` Alfred M. Szmidt
2008-08-18 21:18     ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb5c9a920808190401y3b65e1b7v195de781e2bd00d0@mail.gmail.com \
    --to=claus.klingberg@gmail.com \
    --cc=ams@gnu.org \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.