Re: [PATCH] Add abbreviated commit hash to rebase conflict message

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Add abbreviated commit hash to rebase conflict message

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:23

Sverre Rabbelier [off-list ref] writes:
Also move the $msgnum to a more sensible location.

Before:
	Patch failed at 0001 msg
After:
	Patch 0001 failed at [da65151] msg
We can guess that 7-hexdigit is an abbreviated commit object name but the
above description and the title do not tell the most important thing. What
commit are you trying to describe, and why is it a good idea to show it?
Reviewed-by: Eric Herman <redacted>
Reviewed-by: Fernando Vezzosi <redacted>
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Sverre Rabbelier <redacted>
I wouldn't have issues if these were Helped-by or Asked-by or something,
but a patch with Reviewed-by for which I do not see any trace of
discussion on this list triggers some WTF at least for me.

Where did these reviews take place? What were their inputs and how was the
patch improved based on them? Why I should trust the judgements of these
people?

What happens when threeway is not enabled, and especially when "git am" is
used for applying patches, not within rebase?
quoted hunk
---
 git-am.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index 9042432..9d70588 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -837,7 +837,8 @@ did you forget to use 'git add'?"
 	fi
 	if test $apply_status != 0
 	then
-		eval_gettextln 'Patch failed at $msgnum $FIRSTLINE'
+		abbrev_commit=$(git log -1 --pretty=%h $commit)
+		eval_gettextln 'Patch $msgnum failed at [$abbrev_commit] $FIRSTLINE'

Re: [PATCH] Add abbreviated commit hash to rebase conflict message

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:52:23

Heya,

On Sun, Nov 6, 2011 at 01:31, Junio C Hamano [off-list ref] wrote:
We can guess that 7-hexdigit is an abbreviated commit object name but the
above description and the title do not tell the most important thing. What
commit are you trying to describe, and why is it a good idea to show it?
The same commit that the title and number are already being displayed
for. It's a good idea to show that as that's a lot more convenient way
to look up the commit that failed to apply than just a rather
arbitrary number and the title.
quoted
Reviewed-by: Eric Herman <redacted>
Reviewed-by: Fernando Vezzosi <redacted>
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Sverre Rabbelier <redacted>
I wouldn't have issues if these were Helped-by or Asked-by or something,
but a patch with Reviewed-by for which I do not see any trace of
discussion on this list triggers some WTF at least for me.

Where did these reviews take place? What were their inputs and how was the
patch improved based on them? Why I should trust the judgements of these
people?
We had a little Git hackathon in Amsterdam today, the review was done
IRL. In this case it consisted of Fernando pointing out that we should
stick to the git cherry-pick format of displaying the hash/title (with
the hash in square brackets before the title), rather than in
parenthesis after the title like I had before. I wanted to give credit
to their offline review somehow. If you'd prefer the "Helped-by" nomer
for this case I'm fine with that.
What happens when threeway is not enabled, and especially when "git am" is
used for applying patches, not within rebase?
The same thing that already happens. I'm not sure what it is, but
whatever title/number is shown, the matching hash is now shown as
well. This patch does not change that behavior.

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help