Skip to contentSkip to conversation

b4 shazam in a subdir

DISCUSSION Andrew Cooper 3 participants 5 messages May 2, 2023 – Jun 30, 2023

lore
Share & tools
lore
#0 lore raw

Hello,

When using b4 shazam in a subdir of a git repository, you end up with the patch(es) applied correctly, but also the diff structure expanded under the current dir, and the working tree dirty back to the state prior to applying the patch(es).

Running from the root of the repo leaves everything in order, but it would be great if b4 wasn't sensitive to $CWD inside a repository.

Thanks,

~Andrew

#1 lore raw
Quoted 9 lines · Andrew Cooper

Hello,

When using b4 shazam in a subdir of a git repository, you end up with the patch(es) applied correctly, but also the diff structure expanded under the current dir, and the working tree dirty back to the state prior to applying the patch(es).

Running from the root of the repo leaves everything in order, but it would be great if b4 wasn't sensitive to $CWD inside a repository.

Thanks for the report.

bugbot assign to me

-K

#3 lore raw
In reply to Andrew Cooper

Konstantin Ryabitsev writes in commit 73291165599839de9a2dcf4986c35a2041b22d09:

shazam: switch to top of git tree before running git-am

According to reports, running "git am" when not at the top of the tree can result in the dirty tree state (see linked conversation). This ensures that we switch back to the top of the git tree before running "git am" and then switch back.

(via https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=732911655998)

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)
#4 lore raw
Quoted 9 lines · Kernel.org Bugbot

Konstantin Ryabitsev writes in commit 73291165599839de9a2dcf4986c35a2041b22d09:

shazam: switch to top of git tree before running git-am

According to reports, running "git am" when not at the top of the tree can result in the dirty tree state (see linked conversation). This ensures that we switch back to the top of the git tree before running "git am" and then switch back.

Quoted 6 lines

(via https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?id=732911655998)

Just checked v0.12.3 and this is working now.  Thanks!

~Andrew