Guido Günther wrote:
> On Mon, Oct 25, 2010 at 03:12:15PM +0200, Benoît Knecht wrote:
> > Instead of just looking for the existence of the .git directory in the
> > current directory, use 'git rev-parse --show-cdup' to figure out where
> > the root of the git repository is relatively to the current directory
> > (and raise an error if we're actually not in a git repository).
> > ---
> > 
> > Is this what you had in mind? I didn't use '--is-bare-repository' as I'm
> > not sure what should be done depending on the result.
> > 
> > This works for me when I run git-buildpackage from within any directory
> > of a git repository, but maybe there are other cases I didn't consider.
> That's exactly the hard part. Finding the root of the repo is easy,
> getting all the commands to work relative to this dir requires more work
> - and we want consistent behaviour across all gbp commands of course.

I'm not sure I see what you mean. The previous behavior was:
    1. Look for .git in the current directory;
    2. Abort if not found.
Now we do:
    1. Find out where .git is;
    2. Go there;
    3. Proceed.
So it shouldn't break anything that wasn't already broken (it just
automates the previous behavior of Fail -> Manually move to the root ->
Try again).

Or am I really missing something else here (maybe you've an example of a
command that would now fail where it wouldn't have before)?

Cheers,

-- 
Benoît Knecht



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to