* Chunk header @@@ counts wrong?
@ 2024-05-02 16:51 Johan Walles
2024-05-02 20:43 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Johan Walles @ 2024-05-02 16:51 UTC (permalink / raw)
To: git
Are these counts produced by git 2.44.0 correct, and in that case how?
The header says "@@@ -6,6 -6,60 +6,60 @@@", meaning "six rows in v1,
sixty in v2 and sixty in the merge result".
I think v2 contains 57 lines, but git says 60. What am I missing?
I'm counting:
* 6 space-space (context) lines
* 51 plus-space (new to v1 but already in v2) lines
* 3 plus-plus (new to both v1 and v2) lines
Doesn't this mean that v2 contains 57 (51 plus-space + 6 context) lines?
Why does git say that v2 contains 60 lines?
Originally reported here: https://github.com/walles/riff/issues/63
Regards /Johan
"
diff --cc ansible/roles/zfsbootmenu/tasks/main.yaml
index 73fa864,08648fa..0000000
--- a/ansible/roles/zfsbootmenu/tasks/main.yaml
+++ b/ansible/roles/zfsbootmenu/tasks/main.yaml
@@@ -6,6 -6,60 +6,60 @@@
- zfsbootmenu
state: present
++<<<<<<< HEAD
++=======
+ - name: Create ESP mdadm config
+ template:
+ src: mdadm.conf.j2
+ dest: /etc/mdadm.conf
+ owner: root
+ group: root
+ mode: 0644
+ when: esp_mdadm_array is defined
+
+ - name: Install dropbear
+ xbps:
+ pkg:
+ - dropbear
+ - mkinitcpio-dropbear
+ state: present
+
+ - name: Create dropbear directory
+ file:
+ path: /etc/dropbear
+ owner: root
+ group: root
+ mode: 0755
+ state: directory
+
+ - name: Create dropbear keys
+ command:
+ cmd: /usr/bin/dropbearkey -t {{ item }} -f
/etc/dropbear/dropbear_{{ item }}_host_key
+ creates: /etc/dropbear/dropbear_{{ item }}_host_key
+ loop:
+ - rsa
+ - ecdsa
+ - ed25519
+
+ - name: Create dropbear authorised keys
+ template:
+ src: authorized_keys.j2
+ dest: /etc/dropbear/root_key
+ owner: root
+ group: root
+ mode: 0644
+ lstrip_blocks: true
+
+ - name: Create dropbear config
+ template:
+ src: dropbear.conf.j2
+ dest: /etc/dropbear/dropbear.conf
+ owner: root
+ group: root
+ mode: 0644
+ lstrip_blocks: true
+
++>>>>>>> 8eec118 (fixup! ansible/roles/zfsbootmenu: add role)
- name: Create zfsbootmenu config
template:
src: config.yaml.j2
* Unmerged path ansible/host_vars/foo.yaml
"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Chunk header @@@ counts wrong?
2024-05-02 16:51 Chunk header @@@ counts wrong? Johan Walles
@ 2024-05-02 20:43 ` Junio C Hamano
2024-05-02 20:47 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2024-05-02 20:43 UTC (permalink / raw)
To: Johan Walles; +Cc: git
Johan Walles <johan.walles@gmail.com> writes:
> Are these counts produced by git 2.44.0 correct, and in that case how?
>
> The header says "@@@ -6,6 -6,60 +6,60 @@@", meaning "six rows in v1,
> sixty in v2 and sixty in the merge result".
>
> I think v2 contains 57 lines, but git says 60. What am I missing?
> I'm counting:
> * 6 space-space (context) lines
> * 51 plus-space (new to v1 but already in v2) lines
I think you failed to count three lines in v2 and merge result, they
look like "<<< HEAD" "======" ">>> 8eec118"; new to v1 but already
in v2 lines are 54, not 51, no?
> * 3 plus-plus (new to both v1 and v2) lines
>
> Doesn't this mean that v2 contains 57 (51 plus-space + 6 context) lines?
>
> Why does git say that v2 contains 60 lines?
>
> Originally reported here: https://github.com/walles/riff/issues/63
>
> Regards /Johan
>
> "
> diff --cc ansible/roles/zfsbootmenu/tasks/main.yaml
> index 73fa864,08648fa..0000000
> --- a/ansible/roles/zfsbootmenu/tasks/main.yaml
> +++ b/ansible/roles/zfsbootmenu/tasks/main.yaml
> @@@ -6,6 -6,60 +6,60 @@@
> - zfsbootmenu
> state: present
>
> ++<<<<<<< HEAD
> ++=======
> + - name: Create ESP mdadm config
> + template:
> + src: mdadm.conf.j2
> + dest: /etc/mdadm.conf
> + owner: root
> + group: root
> + mode: 0644
> + when: esp_mdadm_array is defined
> +
> + - name: Install dropbear
> + xbps:
> + pkg:
> + - dropbear
> + - mkinitcpio-dropbear
> + state: present
> +
> + - name: Create dropbear directory
> + file:
> + path: /etc/dropbear
> + owner: root
> + group: root
> + mode: 0755
> + state: directory
> +
> + - name: Create dropbear keys
> + command:
> + cmd: /usr/bin/dropbearkey -t {{ item }} -f
> /etc/dropbear/dropbear_{{ item }}_host_key
> + creates: /etc/dropbear/dropbear_{{ item }}_host_key
> + loop:
> + - rsa
> + - ecdsa
> + - ed25519
> +
> + - name: Create dropbear authorised keys
> + template:
> + src: authorized_keys.j2
> + dest: /etc/dropbear/root_key
> + owner: root
> + group: root
> + mode: 0644
> + lstrip_blocks: true
> +
> + - name: Create dropbear config
> + template:
> + src: dropbear.conf.j2
> + dest: /etc/dropbear/dropbear.conf
> + owner: root
> + group: root
> + mode: 0644
> + lstrip_blocks: true
> +
> ++>>>>>>> 8eec118 (fixup! ansible/roles/zfsbootmenu: add role)
> - name: Create zfsbootmenu config
> template:
> src: config.yaml.j2
> * Unmerged path ansible/host_vars/foo.yaml
> "
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Chunk header @@@ counts wrong?
2024-05-02 20:43 ` Junio C Hamano
@ 2024-05-02 20:47 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2024-05-02 20:47 UTC (permalink / raw)
To: Johan Walles; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
>> * 51 plus-space (new to v1 but already in v2) lines
>
> I think you failed to count three lines in v2 and merge result, they
> look like "<<< HEAD" "======" ">>> 8eec118"; new to v1 but already
> in v2 lines are 54, not 51, no?
Ah, I take that back. These have ++ that are new relative to parent
#1 and parent #2 (i.e. only the tentative merge result has them).
So, yes, I think you are counting correctly.
Sorry, but I do not know what's counting the hunk length numbers in
today's code offhand, so I won't be digging it further for now.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-02 20:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 16:51 Chunk header @@@ counts wrong? Johan Walles
2024-05-02 20:43 ` Junio C Hamano
2024-05-02 20:47 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).