Re: Merge conflicts are reported relative to root not cwd
On Wed, Apr 13, 2016 at 3:41 PM, Jeff King <peff@peff.net> wrote:
Show 23 quoted lines
> On Wed, Apr 13, 2016 at 03:18:24PM -0700, Stefan Beller wrote:
>
>> * This is your preference for whole-tree operations. What are
>> whole-tree operations? (Is there a concise definition?
>> Are submodules whole tree operations?)
>> These questions are motivated by origin/sb/submodule-path-misc-bugs
>> which a) fixes bugs and b) makes submodule handling consistent to the
>> relative-to-cwd philosophy. As most submodule commands touch all
>> submodules in the tree, we could argue it is a whole-tree operation, and
>> you'd like to see submodule paths from the root level, too.
>>
>> I'd like to avoid adding confusion here. So is there a an easy way to tell apart
>> which commands you would expect to use relative-to-cwd and which use
>> relative-to-root?
>
> I think some operations are fundamentally whole-tree. You do not merge a
> subtree, but create a new top-level commit. Similarly, even in:
>
> cd Documentation
> git log -p .
>
> the diffs we see still show the whole path. We are traversing the whole
> tree.
Oh I see.
cd dir-with-submodules
git submodule update .would traverse only that dir-with-submodules/ subtree from the users POV.
>
> If you are touching all submodules with an operation, I'd expect it to
> show full paths, not relative ones. But then I set status.relativePaths
> to "false", so maybe I am in the minority.
That would be `git submodule foreach`. Any other submodule subcommand is similar to git log as they default to the whole tree but can do similar stuff as "git log -- dir/" for sub trees.
Having subcommands behave differently w.r.t. path being relative or not sounds like an inconsistency to me. Currently they are all relative, i.e. `git submodule foreach` breaks your expectation for displaying paths.
Show 6 quoted lines
>
> -Peff
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html