Re: [StGIT PATCH 2/2] Don't touch ref files manually

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karl Hasselström wrote:
> On 2007-08-21 14:23:29 +0100, Catalin Marinas wrote:
> > On 10/08/07, Karl Hasselström <kha@xxxxxxxxxxx> wrote:
> > > @@ -294,14 +301,16 @@ def set_head_file(ref):
> > >      # head cache flushing is needed since we might have a different value
> > >      # in the new head
> > >      __clear_head_cache()
> > > -    if __run('git-symbolic-ref HEAD',
> > > -             [os.path.join('refs', 'heads', ref)]) != 0:
> > > +    if __run('git-symbolic-ref HEAD', ['refs/heads/%s' % ref]) != 0:
> > >          raise GitException, 'Could not set head to "%s"' % ref
> >
> > Why replacing os.path.join with a single string? I think the former
> > is more portable if, in the future, someone will try to run StGIT on
> > Windows (and GIT would be compiled directly, without cygwin).
> 
> Yes, that's the case iff it is a pathname in the file system. But I
> think forward slashes are used even on Windows in this case --
> otherwise too mmuch configuration would have to be changed. This is
> what I _think_, however; I haven't actually checked.

There are some instances where the MinGW port accepts backslashes in ref
names, but you are on the safe side with forward slashes.

-- Hannes

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux