Re: [PATCH 0/5] Revamping "git status"

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 0/5] Revamping "git status"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:09

Thomas Rast [off-list ref] writes:
I also tried finding out which exact commit was causing this, but 4/5
still segfaults and 1-3 don't even compile:

  builtin-commit.c: In function ‘show_unmerged’:                                  
  builtin-commit.c:827: error: dereferencing pointer to incomplete type           
  builtin-commit.c: In function ‘show_status’:                                    
  builtin-commit.c:854: error: dereferencing pointer to incomplete type
  [etc]

These are referring to use of a 'struct wt_status_change_data *', but
the struct declaration is only in 4/5.  Am I missing something?
I suspect you have a botched patch application.

The result of applying up to [PATCH 3/5] does not even have
show_unmerged/show_status in builtin-commit.c.  These two functions are
introduced by [PATCH 5/5] to implement shortstatus.

I've applied what came back on the list on top of 07a4a3b (Fix typos on
pt_BR/gittutorial.txt translation, 2009-07-31) and all five states compile
just fine.

    $ git rev-list 07a4a3b.. |
      while read sha1
      do
            git rev-parse $sha1^{tree}
      done
    86363b25b84041cf14110dcc3136f56915778f71
    4625f5bbc43e1158d00aca8b2356047606c0babd
    895698143b2c29af8bfe0cdf6c3f57de3bf080d8
    3c565041ba6e432ff9064a1d8302f49ef33c2605
    c0c2b9c2a55e3df9cce448d59e5d557d07d78a4b

Re: [PATCH 0/5] Revamping "git status"

From: Thomas Rast <hidden>
Date: 2016-06-15 22:47:09

Junio C Hamano wrote:
Thomas Rast [off-list ref] writes:
quoted
I also tried finding out which exact commit was causing this, but 4/5
still segfaults and 1-3 don't even compile:

  builtin-commit.c: In function ‘show_unmerged’:                                  
  builtin-commit.c:827: error: dereferencing pointer to incomplete type           
  builtin-commit.c: In function ‘show_status’:                                    
  builtin-commit.c:854: error: dereferencing pointer to incomplete type
  [etc]

These are referring to use of a 'struct wt_status_change_data *', but
the struct declaration is only in 4/5.  Am I missing something?
I suspect you have a botched patch application.
You're right, sorry.  I indeed had the patches applied in the wrong
order (through a pilot error with KMail), resulting in 5/5 being first
in the topic.  So it is no wonder the intermediate states never
compiled.
I've applied what came back on the list on top of 07a4a3b (Fix typos on
pt_BR/gittutorial.txt translation, 2009-07-31) and all five states compile
just fine.

    $ git rev-list 07a4a3b.. |
      while read sha1
      do
            git rev-parse $sha1^{tree}
      done
    86363b25b84041cf14110dcc3136f56915778f71
    4625f5bbc43e1158d00aca8b2356047606c0babd
    895698143b2c29af8bfe0cdf6c3f57de3bf080d8
    3c565041ba6e432ff9064a1d8302f49ef33c2605
    c0c2b9c2a55e3df9cce448d59e5d557d07d78a4b
I did exactly that, and our trees now agree.  However, I'm still
seeing a crash with this test:

-- 8< --
diff --git i/t/t7060-wtstatus.sh w/t/t7060-wtstatus.sh
index 5ad2cd1..2cc0833 100755
--- i/t/t7060-wtstatus.sh
+++ w/t/t7060-wtstatus.sh
@@ -28,4 +28,17 @@ test_expect_success 'Report new path with conflict' '
 	test_cmp expect actual
 '
 
+test_expect_failure 'M/D conflict does not segfault' '
+	mkdir mdconflict &&
+	cd mdconflict &&
+	git init &&
+	test_commit initial foo '' &&
+	test_commit modify foo foo &&
+	git checkout -b side HEAD^ &&
+	git rm foo &&
+	git commit -m delete &&
+	git merge master &&
+	git status
+'
+
 test_done
-- >8 --
-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Re: [PATCH 0/5] Revamping "git status"

From: Thomas Rast <hidden>
Date: 2016-06-15 22:47:09

Thomas Rast wrote:
+test_expect_failure 'M/D conflict does not segfault' '
+	mkdir mdconflict &&
+	cd mdconflict &&
+	git init &&
+	test_commit initial foo '' &&
+	test_commit modify foo foo &&
+	git checkout -b side HEAD^ &&
+	git rm foo &&
+	git commit -m delete &&
+	git merge master &&
+	git status
+'
+
Meh, this stops before the git-status because merge signals a
conflict.  However, the following really crashes.  Promise.

-- 8< --
diff --git i/t/t7060-wtstatus.sh w/t/t7060-wtstatus.sh
index 5ad2cd1..a152a26 100755
--- i/t/t7060-wtstatus.sh
+++ w/t/t7060-wtstatus.sh
@@ -28,4 +28,17 @@ test_expect_success 'Report new path with conflict' '
 	test_cmp expect actual
 '
 
+test_expect_failure 'M/D conflict does not segfault' '
+	mkdir mdconflict &&
+	cd mdconflict &&
+	git init &&
+	test_commit initial foo '' &&
+	test_commit modify foo foo &&
+	git checkout -b side HEAD^ &&
+	git rm foo &&
+	git commit -m delete &&
+	test_must_fail git merge master &&
+	git status
+'
+
 test_done
-- >8 --
Sorry for all the confusion.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help