diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-16 09:32:24 +0200 |
|---|---|---|
| committer | Johannes Sixt <j6t@kdbg.org> | 2025-07-16 18:21:37 +0200 |
| commit | 532a054451da6f433095405cb21b6e082a0a0a42 (patch) | |
| tree | 7ec09ad7cc724da2da2ed146a5830268115af79e | |
| parent | 3f072308447ed2aab0228d21a7ce334beeeca7e8 (diff) | |
| download | git-532a054451da6f433095405cb21b6e082a0a0a42.tar.gz | |
git-gui: Replace null_sha1 with nullid
Both $nullid and $null_sha1 point to the same content.
Use only $nullid consistently.
This is a preliminary cleanup for adding the support of SHA256 repo.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| -rwxr-xr-x | git-gui.sh | 5 | ||||
| -rw-r--r-- | lib/checkout_op.tcl | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/git-gui.sh b/git-gui.sh index c77c05edde..413a8a9abc 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1845,10 +1845,9 @@ proc short_path {path} { } set next_icon_id 0 -set null_sha1 [string repeat 0 40] proc merge_state {path new_state {head_info {}} {index_info {}}} { - global file_states next_icon_id null_sha1 + global file_states next_icon_id nullid set s0 [string index $new_state 0] set s1 [string index $new_state 1] @@ -1870,7 +1869,7 @@ proc merge_state {path new_state {head_info {}} {index_info {}}} { elseif {$s1 eq {_}} {set s1 _} if {$s0 eq {A} && $s1 eq {_} && $head_info eq {}} { - set head_info [list 0 $null_sha1] + set head_info [list 0 $nullid] } elseif {$s0 ne {_} && [string index $state 0] eq {_} && $head_info eq {}} { set head_info $index_info diff --git a/lib/checkout_op.tcl b/lib/checkout_op.tcl index 87ed0b4858..987486a4b6 100644 --- a/lib/checkout_op.tcl +++ b/lib/checkout_op.tcl @@ -151,7 +151,7 @@ method _finish_fetch {ok} { } method _update_ref {} { - global null_sha1 current_branch repo_config + global nullid current_branch repo_config set ref $new_ref set new $new_hash @@ -177,7 +177,7 @@ method _update_ref {} { } set reflog_msg "branch: Created from $new_expr" - set cur $null_sha1 + set cur $nullid if {($repo_config(branch.autosetupmerge) eq {true} || $repo_config(branch.autosetupmerge) eq {always}) |
