Skip to content

merge --no-commit <other-branch> requires user identity #498

@HelgeHesse

Description

@HelgeHesse

What did you do before the bug happened? (Steps to reproduce your issue)

  1. Create 2 branches with at least one different file on each branch
  2. Do not have a ~/.gitconfig
  3. Execute git merge --no-commit

What did you expect to happen? (Expected behavior)
Unstaged files in the working area and a successfull result
e.g. "Automatic merge went well; stopped before committing as requested"

What happened instead? (Actual behavior)
Git throws an error:
*** Please tell me who you are. ...

What's different between what you expected and what actually happened?
I expect to not be forced to have user identity available if I use "--no-commit". I even cannot provide them with the command shown.

Anything else you want to add:
In our workflow we do not have user information available at this stage. User identity changes for every commit,
so we do not have a ~/.gitconfig
A simple solution would be to not check user identity if merge was called with "--no-commit"

[System Info]
git version:
git version 2.31.1.331.gb0c09ab879
cpu: x86_64
built from commit: b0c09ab8796fb736efa432b8e817334f3e5ee75a
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.3.18-lp152.66-default #1 SMP Tue Mar 2 13:18:19 UTC 2021 (73933a3) x86_64
compiler info: gnuc: 7.5
libc info: glibc: 2.26
$SHELL (typically, interactive shell): /bin/bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions