Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelLipski committed May 21, 2024
1 parent db4f7d4 commit 08b0a8c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Release notes

## New in git-machete 3.25.3
## New in git-machete 3.26.0

- added: better detection of squash merges and rebases, controlled by argument `--squash-merge-detection={none,simple,exact}` and git config key `machete.squashMergeDetection` (contributed by @gjulianm)
- fixed: `-y` option in `git machete traverse` automatically sets `--no-edit-merge` flag, to retain behavior when the `update=merge` qualifier is set (contributed by @gjulianm)
- fixed: `push=no` and `slide-out=no` qualifiers now work in `git machete advance` now
- fixed: `rebase=no` qualifier now works in `git machete slide-out`
- improved: in `git machete github create-pr`/`gitlab create-mr`, check whether base/target branch for PR/MR exists in remote, instead of fetching the entire remote
- fixed: better detection of squash merges and rebases when there are commits between the fork point and the merge/rebase. Option controlled by argument `--squash-merge-detection` and config key `machete.squashMergeDetection` (contributed by @gjulianm)

## New in git-machete 3.25.2

Expand Down
6 changes: 3 additions & 3 deletions docs/man/git-machete.1
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "GIT-MACHETE" "1" "May 20, 2024" "" "git-machete"
.TH "GIT-MACHETE" "1" "May 21, 2024" "" "git-machete"
.SH NAME
git-machete \- git-machete 3.25.3
git-machete \- git-machete 3.26.0
.sp
git machete is a robust tool that \fBsimplifies your git workflows\fP\&.
.sp
Expand Down Expand Up @@ -464,7 +464,7 @@ set \fBgit config machete.worktree.useTopLevelMacheteFile false\fP\&.
Controls the algorithm used to detect squash merges. Possible values are:
* \fBnone\fP: No squash merge/rebase detection.
* \fBsimple\fP: Compares the tree state of the merge commit with the tree state of the upstream branch. This detects squash merges/rebases as long as there was not any commit on the upstream branch since the last common commit.
* \fBexact\fP: Compares the patch that would be applied by the merge commit with the commits that ocurred on the upstream branch since the last common commit. This detects squash merges/rebases even if there were commits on the upstream branch since the last common commit. However, it might have a performance impact as it requires listing all the commits in the upstream.
* \fBexact\fP: Compares the patch that would be applied by the merge commit with the commits that occurred on the upstream branch since the last common commit. This detects squash merges/rebases even if there were commits on the upstream branch since the last common commit. However, it might have a performance impact as it requires listing all the commits in the upstream.
.UNINDENT
.sp
\fBEnvironment variables:\fP
Expand Down
2 changes: 1 addition & 1 deletion git_machete/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.25.3'
__version__ = '3.26.0'
2 changes: 1 addition & 1 deletion git_machete/generated_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
Controls the algorithm used to detect squash merges. Possible values are:
* `none`: No squash merge/rebase detection.
* `simple`: Compares the tree state of the merge commit with the tree state of the upstream branch. This detects squash merges/rebases as long as there was not any commit on the upstream branch since the last common commit.
* `exact`: Compares the patch that would be applied by the merge commit with the commits that ocurred on the upstream branch since the last common commit. This detects squash merges/rebases even if there were commits on the upstream branch since the last common commit. However, it might have a performance impact as it requires listing all the commits in the upstream.
* `exact`: Compares the patch that would be applied by the merge commit with the commits that occurred on the upstream branch since the last common commit. This detects squash merges/rebases even if there were commits on the upstream branch since the last common commit. However, it might have a performance impact as it requires listing all the commits in the upstream.
<b>Environment variables:</b>
`GIT_MACHETE_EDITOR`
Expand Down
8 changes: 3 additions & 5 deletions git_machete/git_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,11 +956,9 @@ def get_commits_between(self, earliest_exclusive: AnyRevision, latest_inclusive:
utils.get_non_empty_lines(self._popen_git("log", "--format=%H:%h:%s", f"^{earliest_exclusive}", latest_inclusive, "--").stdout)
))))

def get_patch_ids_for_commits_between(self,
earliest_exclusive: AnyRevision,
latest_inclusive: AnyRevision,
max_commits: int
) -> Dict[FullCommitHash, str]:
def get_patch_ids_for_commits_between(
self, earliest_exclusive: AnyRevision, latest_inclusive: AnyRevision, max_commits: int
) -> Dict[FullCommitHash, str]:
# Returns a dictionary of git hashes and their diffs between two revisions
patches = self._popen_git("log", "--patch", f"^{earliest_exclusive}", latest_inclusive, f"-{max_commits}", "--").stdout
patch_ids = self._popen_git("patch-id", input=patches).stdout
Expand Down

0 comments on commit 08b0a8c

Please sign in to comment.