这是indexloc提供的服务,不要输入任何密码
Skip to content

containing files in a merge commit are confusing #206

@MrJack91

Description

@MrJack91

Hi

How exactly do you display the files containing in a commit?

image

For this merge commit gitfiend does display me the file from the branch I merged to. (Which does not have changed!)

If I use "git log --stat" i'm not able to see this file, which seems to me to be correct. (the "base" file here).

image
This file was correctly contained in the 13cff commit.

I did this as a minimal example

mkdir git-merge-ex
cd git-merge-ex/

git init
touch base
touch feature
ll
git add base feature
git commit -a -m "init"

git switch -c dev
git switch -c tst
git switch -c prd
git switch dev

echo "\n\nnew feature on dev" >> base
git commit -a -m "new feat"

git switch tst
git merge dev

git switch prd
echo "hotfix: on feature on prd" > feature
git commit -a -m "hotfix on prd"

git switch tst
git merge prd
git switch dev
git merge prd
git merge tst

git log --stat

# for the last "git merge tst" (to dev), there should be no change. (its like if you use the command line)
# but gitfiend and gitlab do display the base file.

We got some confusion internally, because this behaviour.
It seems that gitlab is using the same method you do. But not source tree...

Thanks for any explanation.

Best

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions