Skip to content

Commit

Permalink
feat(scripts): Use all regular m4 filters when generating branch diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Oct 14, 2023
1 parent cda8ca8 commit c05caff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions rules/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ preprocess_macros = $(CASILEDIR)/casile.m4 $(M4MACROS) $(PROJECTMACRO) $(TARGETM

$(BUILDDIR)/%-$(_processed).md: %.md $$(wildcard $(PROJECT)*.md $$*-$(_chapters)/*.md) $$(call preprocess_macros,$$*) | $(BUILDDIR) figures
if $(HIGHLIGHT_DIFF) && $(if $(PARENT),true,false); then
export FILTERS="$(filter %.m4,$^)"
branch2criticmark.zsh $(PARENT) $<
else
$(M4) $(filter %.m4,$^) $<
Expand Down
4 changes: 2 additions & 2 deletions scripts/branch2criticmark.zsh.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ trap 'rm -rf ${WT}' EXIT SIGHUP SIGTERM
@GIT@ worktree prune > /dev/null
@GIT@ worktree add --detach ${WT} ${BRANCH} > /dev/null

@M4@ ${WT}/${FILE} | @GIT@ hash-object --stdin -w | read A
@M4@ ${FILE} | @GIT@ hash-object --stdin -w | read B
@M4@ ${FILTERS} ${WT}/${FILE} | @GIT@ hash-object --stdin -w | read A
@M4@ ${FILTERS} ${FILE} | @GIT@ hash-object --stdin -w | read B

if @GIT@ diff ${A}..${B} --quiet; then
@GIT@ show ${B}
Expand Down

0 comments on commit c05caff

Please sign in to comment.