From: "Johannes Schindelin via GitGitGadget" <email@example.com>
Cc: Elijah Newren <firstname.lastname@example.org>,
Johannes Schindelin <email@example.com>
Subject: [PATCH 0/3] Show original filenames in merge tree
Date: Fri, 19 Aug 2022 06:57:33 +0000 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
The git merge-tree command has not seen much of real-world usage (because it
only recently learned to do something actually useful, and those changes
have not been part of any official Git version yet), which means that we are
prone to find corner-cases where we want to improve it in ways that we had
not originally foreseen.
I had the chance to give it some real-world exposure and noticed the
following concern: So far, git merge-tree shows munged file names in its
output that would make sense if the corresponding files were written to disk
(you cannot write a file and a directory of the same name, after all). But
for an application or a web service relying on git merge-tree to operate in
worktree-less mode, it makes much more sense to show the original file names
because that's what the user needs to see.
So let's do that.
Note: The written-out tree object still uses the munged names, as do the
conflict messages. But the machine-parseable part now consistently uses the
original file names.
Also note: This patch series addresses a bug where the ls-files -u-formatted
output would not reveal the correct file names in a rename/rename conflict.
This patch series is based on en/merge-tree.
Johannes Schindelin (3):
merge-tree -z: always show the original file name first
merge-tree: show the original file names in the conflict output
t4301: add a test case involving a rename, type change & modification
builtin/merge-tree.c | 2 +-
merge-ort.c | 16 +++++-----
merge-ort.h | 1 +
t/t4069-remerge-diff.sh | 8 ++---
t/t4301-merge-tree-write-tree.sh | 54 +++++++++++++++++++++++++-------
5 files changed, 57 insertions(+), 24 deletions(-)
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1327/dscho/show-original-filenames-in-merge-tree-v1
next reply other threads:[~2022-08-19 6:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 6:57 Johannes Schindelin via GitGitGadget [this message]
2022-08-19 6:57 ` [PATCH 1/3] merge-tree -z: always show the original file name first Johannes Schindelin via GitGitGadget
2022-08-19 9:17 ` Johannes Schindelin
2022-08-20 23:22 ` Elijah Newren
2022-08-20 23:17 ` Elijah Newren
2022-08-21 2:00 ` Elijah Newren
2022-08-22 20:12 ` Johannes Schindelin
2022-08-23 6:24 ` Elijah Newren
2022-08-26 15:35 ` Johannes Schindelin
2022-08-30 2:13 ` Elijah Newren
2022-08-19 6:57 ` [PATCH 2/3] merge-tree: show the original file names in the conflict output Johannes Schindelin via GitGitGadget
2022-08-19 6:57 ` [PATCH 3/3] t4301: add a test case involving a rename, type change & modification Johannes Schindelin via GitGitGadget
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).