git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* RFE: teach gitk to automatically mark .git/rebase-merge/stopped-sha
@ 2020-05-04  8:26 Mikko Rantalainen
  2020-05-05 19:42 ` Phillip Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Mikko Rantalainen @ 2020-05-04  8:26 UTC (permalink / raw)
  To: git

While doing long rebases (I'm currently rebasing a feature branch with
166 patches) and rebase stopping in the middle of rebase, locating the
old patch in gitk is sometimes hard.

Could gitk automatically mark the original patch that failed to rebase
after I press F5?

The failing original commit SHA-1 can be found in file
.git/rebase-merge/stopped-sha but as far as I know, git does have
logical commit name similar to HEAD, ORIG_HEAD or anything else for this
case so there's no easy way to get already running gitk to mark this patch.

Of course, doing the same thing for failed cherry-picks would be nice,
too but in that case it's pretty clear where the source patch is.

As a workaround I currently have to do something like
  git tag -f FAILED_HEAD $(cat .git/rebase-merge/stopped-sha)
after seeing rebase failure. Then I can hit F5 in gitk to easily locate
the source commit.

PS. Is there a way to automatically run git tag -f FAILED_HEAD $(cat
.git/rebase-merge/stopped-sha) if rebase fails in the middle of branch?

-- 
Mikko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RFE: teach gitk to automatically mark .git/rebase-merge/stopped-sha
  2020-05-04  8:26 RFE: teach gitk to automatically mark .git/rebase-merge/stopped-sha Mikko Rantalainen
@ 2020-05-05 19:42 ` Phillip Wood
  2020-05-05 20:42   ` Philip Oakley
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Wood @ 2020-05-05 19:42 UTC (permalink / raw)
  To: Mikko Rantalainen, git

Hi Mikko

On 04/05/2020 09:26, Mikko Rantalainen wrote:
> While doing long rebases (I'm currently rebasing a feature branch with
> 166 patches) and rebase stopping in the middle of rebase, locating the
> old patch in gitk is sometimes hard.
> 
> Could gitk automatically mark the original patch that failed to rebase
> after I press F5?
> 
> The failing original commit SHA-1 can be found in file
> .git/rebase-merge/stopped-sha but as far as I know, git does have
> logical commit name similar to HEAD, ORIG_HEAD or anything else for this
> case so there's no easy way to get already running gitk to mark this patch.

Since git v2.17 rebase which should set REBASE_HEAD to point to the 
failing commit.

Best Wishes

Phillip

> Of course, doing the same thing for failed cherry-picks would be nice,
> too but in that case it's pretty clear where the source patch is.
> 
> As a workaround I currently have to do something like
>    git tag -f FAILED_HEAD $(cat .git/rebase-merge/stopped-sha)
> after seeing rebase failure. Then I can hit F5 in gitk to easily locate
> the source commit.
> 
> PS. Is there a way to automatically run git tag -f FAILED_HEAD $(cat
> .git/rebase-merge/stopped-sha) if rebase fails in the middle of branch?
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RFE: teach gitk to automatically mark .git/rebase-merge/stopped-sha
  2020-05-05 19:42 ` Phillip Wood
@ 2020-05-05 20:42   ` Philip Oakley
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Oakley @ 2020-05-05 20:42 UTC (permalink / raw)
  To: phillip.wood, Mikko Rantalainen, git

Hi Phillip,

On 05/05/2020 20:42, Phillip Wood wrote:
> Hi Mikko
>
> On 04/05/2020 09:26, Mikko Rantalainen wrote:
>> While doing long rebases (I'm currently rebasing a feature branch with
>> 166 patches) and rebase stopping in the middle of rebase, locating the
>> old patch in gitk is sometimes hard.
>>
>> Could gitk automatically mark the original patch that failed to rebase
>> after I press F5?
>>
>> The failing original commit SHA-1 can be found in file
>> .git/rebase-merge/stopped-sha but as far as I know, git does have
>> logical commit name similar to HEAD, ORIG_HEAD or anything else for this
>> case so there's no easy way to get already running gitk to mark this
>> patch.
>
> Since git v2.17 rebase which should set REBASE_HEAD to point to the
> failing commit.

Is that a proper Pseudo Ref or is it just a temporary feature during a
rebase?

I see it's only mentioned once in the Documentation in the Rebase man page.

(I see a lot of discussion on the reftable support, with the pseudo refs
being at least one sticking point.)

Philip
>
> Best Wishes
>
> Phillip
>
>> Of course, doing the same thing for failed cherry-picks would be nice,
>> too but in that case it's pretty clear where the source patch is.
>>
>> As a workaround I currently have to do something like
>>    git tag -f FAILED_HEAD $(cat .git/rebase-merge/stopped-sha)
>> after seeing rebase failure. Then I can hit F5 in gitk to easily locate
>> the source commit.
>>
>> PS. Is there a way to automatically run git tag -f FAILED_HEAD $(cat
>> .git/rebase-merge/stopped-sha) if rebase fails in the middle of branch?
>>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-05 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04  8:26 RFE: teach gitk to automatically mark .git/rebase-merge/stopped-sha Mikko Rantalainen
2020-05-05 19:42 ` Phillip Wood
2020-05-05 20:42   ` Philip Oakley

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).