Re: Weird behavior of shell variables in git aliases

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

 



Thanks a lot for the explanations, I was really wondering about that.

Incidentally, I had a real reason to prefer using the `!echo...`
syntax over the `!sh -c 'echo...'` one;  I need my users to define the
following alias:

    git checkout $1 && git submodule foreach 'git checkout $sha1'

Due to the necessity of single-quoting the `foreach` expression, I
couldn't define it with the `!sh -c` syntax. And because of the
problems discussed in this thread, I still don't know how to have my
users define this alias.

Thanks, D.

P.S. Incidentally, this alias is addressing a pitfall in the use of
submodules that I think should not exist in the first place:

If a repo has a submodule, and head 'foo' of the repo has the
submodule's HEAD pointing to head 'foo' of its origin, while head
'bar' of the repo has the submodule HEAD pointing to head 'bar' of its
origin, checking out bar/foo on the repository leaves the submodule in
an outdated state (and `submodule update` doesn't help).
--
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]