Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitece804a

Browse files
Arthur-MilchiorByron
authored andcommitted
Method stating which commit is being played during an halted rebase
This will be useful to me at least. This way, I know that I can tellmy script to omit some specific commits. If you accept to merge it, Imay also do similar method for merges and cherry pick.
1 parentd5cc590 commitece804a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

‎AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ Contributors are:
3333
-Steven Whitman <ninloot _at_ gmail.com>
3434
-Stefan Stancu <stefan.stancu _at_ gmail.com>
3535
-César Izurieta <cesar _at_ caih.org>
36+
-Arthur Milchior <arthur _at_ milchior.fr>
3637

3738
Portions derived from other open source works and are clearly marked.

‎git/repo/base.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,3 +1062,14 @@ def has_separate_working_tree(self):
10621062

10631063
def__repr__(self):
10641064
return'<git.Repo "%s">'%self.git_dir
1065+
1066+
defcurrentlyRebasingOn(self):
1067+
"""
1068+
:return: The hash of the commit which is currently being replayed while rebasing.
1069+
1070+
None if we are not currently rebasing.
1071+
"""
1072+
rebase_head_file=osp.join(self.git_dir,"REBASE_HEAD")
1073+
ifnotosp.isfile(rebase_head_file):
1074+
returnNone
1075+
returnopen(rebase_head_file,"rt").readline().strip()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp