All of lore.kernel.org
 help / color / mirror / Atom feed
* bugreport
@ 2004-07-26 11:16 Artem Bityuckiy
  0 siblings, 0 replies; 21+ messages in thread
From: Artem Bityuckiy @ 2004-07-26 11:16 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

Hello.

There is a bug in jffs2 module registration function - super.c line 293: 
the init_jffs2_fs function doesn't properly perform
the de-initialization in case of failures on lines 315 and 321.

The jffs2_inode_cachep is also not feed.

The proposed patch is attached.

Note 1: I didn't test this patch and didn't even compile JFFS2 with it - 
*be careful*.

Note 2: The similar ought to be fixed in super-v24.c

Artem.

-- 
Best regards, Artem B. Bityuckiy
Oktet Labs (St. Petersburg), Software Engineer.
+78124286709 (office) +79112449030 (mobile)
E-mail: dedekind@oktetlabs.ru, web: http://www.oktetlabs.ru

[-- Attachment #2: super.c.diff --]
[-- Type: text/plain, Size: 592 bytes --]

--- super.c	2004-07-18 18:44:42.000000000 +0400
+++ /home/dedekind/tmp/super_fixed.c	2004-07-26 15:05:34.000000000 +0400
@@ -318,7 +318,7 @@
 	ret = jffs2_compressors_init();
 	if (ret) {
 		printk(KERN_ERR "JFFS2 error: Failed to initialise compressors\n");
-		goto out;
+		goto out_proc;
 	}
 	ret = jffs2_create_slab_caches();
 	if (ret) {
@@ -336,10 +336,12 @@
 	jffs2_destroy_slab_caches();
  out_compressors:
 	jffs2_compressors_exit();
+ out_proc:
 #ifdef CONFIG_JFFS2_PROC
         jffs2_proc_exit();
 #endif
  out:
+        kmem_cache_destroy(jffs2_inode_cachep);
 	return ret;
 }
 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* bugreport
@ 2004-07-27 13:08 Artem B. Bityuckiy
  2004-07-27 13:22 ` bugreport Thomas Gleixner
  0 siblings, 1 reply; 21+ messages in thread
From: Artem B. Bityuckiy @ 2004-07-27 13:08 UTC (permalink / raw)
  To: linux-mtd

Hello.

There is a bug in jffs2 module registration function - super.c line 293:
the init_jffs2_fs function doesn't properly perform
the de-initialization in case of failures on lines 315 and 321.
The jffs2_inode_cachep is also not feed.

I Tried to send a patch bit mailman soesn't gieve me...

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: bugreport
  2004-07-27 13:08 bugreport Artem B. Bityuckiy
@ 2004-07-27 13:22 ` Thomas Gleixner
  2004-07-27 14:40   ` bugreport Artem B. Bityuckiy
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Gleixner @ 2004-07-27 13:22 UTC (permalink / raw)
  To: Artem B. Bityuckiy; +Cc: David Woodhouse, linux-mtd

On Tue, 2004-07-27 at 15:08, Artem B. Bityuckiy wrote:
> Hello.
> 
> There is a bug in jffs2 module registration function - super.c line 293:
> the init_jffs2_fs function doesn't properly perform
> the de-initialization in case of failures on lines 315 and 321.
> The jffs2_inode_cachep is also not feed.
> 
> I Tried to send a patch bit mailman soesn't gieve me...  

I think you meant that one, right ?

Thanks, fixed in CVS

tglx


@@ -330,6 +330,7 @@
  out_compressors:
        jffs2_compressors_exit();
  out:
+       kmem_cache_destroy(jffs2_inode_cachep);
        return ret;
 }

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: bugreport
  2004-07-27 13:22 ` bugreport Thomas Gleixner
@ 2004-07-27 14:40   ` Artem B. Bityuckiy
  2004-07-27 17:31     ` bugreport Thomas Gleixner
  0 siblings, 1 reply; 21+ messages in thread
From: Artem B. Bityuckiy @ 2004-07-27 14:40 UTC (permalink / raw)
  To: tglx; +Cc: David Woodhouse, linux-mtd



Thomas Gleixner wrote:
> On Tue, 2004-07-27 at 15:08, Artem B. Bityuckiy wrote:
> 
>>Hello.
>>
>>There is a bug in jffs2 module registration function - super.c line 293:
>>the init_jffs2_fs function doesn't properly perform
>>the de-initialization in case of failures on lines 315 and 321.
>>The jffs2_inode_cachep is also not feed.
>>
>>I Tried to send a patch bit mailman soesn't gieve me...  
> 
> 
> I think you meant that one, right ?
> 
> Thanks, fixed in CVS
> 
> tglx
> 
> 
> @@ -330,6 +330,7 @@
>   out_compressors:
>         jffs2_compressors_exit();
>   out:
> +       kmem_cache_destroy(jffs2_inode_cachep);
>         return ret;
>  }
> 
Not only. The "go out" in case of jffs2_compressors_init() failure 
doesn't free /proc resources...

I tried to send the following patch as the attached file (now I'll try
to just insert the text):


-- super.c	2004-07-18 18:44:42.000000000 +0400
+++ /home/dedekind/tmp/super_fixed.c	2004-07-26 15:05:34.000000000 +0400
@@ -318,7 +318,7 @@
  	ret =
  	if (ret) {
  		printk(KERN_ERR "JFFS2 error: Failed to initialise compressors\n");
-		goto out;
+		goto out_proc;
  	}
  	ret = jffs2_create_slab_caches();
  	if (ret) {
@@ -336,10 +336,12 @@
  	jffs2_destroy_slab_caches();
   out_compressors:
  	jffs2_compressors_exit();
+ out_proc:
  #ifdef CONFIG_JFFS2_PROC
          jffs2_proc_exit();
  #endif
   out:
+        kmem_cache_destroy(jffs2_inode_cachep);
  	return ret;
  }


Note - the patch is just to show the problem and doesn't pretent to be 
applied as is.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: bugreport
  2004-07-27 14:40   ` bugreport Artem B. Bityuckiy
@ 2004-07-27 17:31     ` Thomas Gleixner
  2004-07-28  6:41       ` bugreport Artem B. Bityuckiy
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Gleixner @ 2004-07-27 17:31 UTC (permalink / raw)
  To: Artem B. Bityuckiy; +Cc: linux-mtd, David Woodhouse

On Tue, 2004-07-27 at 16:40, Artem B. Bityuckiy wrote:
> Not only. The "go out" in case of jffs2_compressors_init() failure 
> doesn't free /proc resources...

proc support was removed in meantime (current CVS).
But anyway thanks for pointing this out

tglx

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: bugreport
  2004-07-27 17:31     ` bugreport Thomas Gleixner
@ 2004-07-28  6:41       ` Artem B. Bityuckiy
  2004-07-29 19:56         ` bugreport David Woodhouse
  0 siblings, 1 reply; 21+ messages in thread
From: Artem B. Bityuckiy @ 2004-07-28  6:41 UTC (permalink / raw)
  To: linux-mtd

Thomas Gleixner wrote:
> On Tue, 2004-07-27 at 16:40, Artem B. Bityuckiy wrote:
> proc support was removed in meantime (current CVS).
Oh, sorry, my snapshot was deprecated.

Note, the same thing should also be fixed in super-v24.c.

Just interesting, why the proc interface was removed? Have you added 
ioctl interface? My JFFS2 CVS snapshot of 15 Jul 2004 has no ioctl 
interface.

> But anyway thanks for pointing this out
Not at all.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: bugreport
  2004-07-28  6:41       ` bugreport Artem B. Bityuckiy
@ 2004-07-29 19:56         ` David Woodhouse
  0 siblings, 0 replies; 21+ messages in thread
From: David Woodhouse @ 2004-07-29 19:56 UTC (permalink / raw)
  To: Artem B. Bityuckiy; +Cc: linux-mtd

On Wed, 2004-07-28 at 10:41 +0400, Artem B. Bityuckiy wrote:
> Just interesting, why the proc interface was removed? Have you added 
> ioctl interface? My JFFS2 CVS snapshot of 15 Jul 2004 has no ioctl 
> interface.

Al Viro took a brief look at it and used lots of nasty works. So I
removed it.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Bugreport
@ 2005-04-12 18:11 Amelia Nilsson
  2005-04-12 22:21 ` Bugreport Chris Wright
  0 siblings, 1 reply; 21+ messages in thread
From: Amelia Nilsson @ 2005-04-12 18:11 UTC (permalink / raw)
  To: linux-kernel

Hey,
I've found a bug in 2.6.11.6. I have a Toshiba laptop and when i did run 2.6.11.6 my touchpad flipped out, it clicked everywhere when it wasn't supposed to click. I couldn't even move my mouse without it was clicking all over. It works fine i 2.6.10 though. Is there any changes made that can affect this? (I haven't tried 2.6.11.7 yet...)

Best regards,
Amelia Nilsson

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bugreport
  2005-04-12 18:11 Bugreport Amelia Nilsson
@ 2005-04-12 22:21 ` Chris Wright
  0 siblings, 0 replies; 21+ messages in thread
From: Chris Wright @ 2005-04-12 22:21 UTC (permalink / raw)
  To: Amelia Nilsson; +Cc: linux-kernel

* Amelia Nilsson (dhakela@linuxchick.se) wrote:
> I've found a bug in 2.6.11.6. I have a Toshiba laptop and when i did
> run 2.6.11.6 my touchpad flipped out, it clicked everywhere when it
> wasn't supposed to click. I couldn't even move my mouse without it was
> clicking all over. It works fine i 2.6.10 though. Is there any changes
> made that can affect this? (I haven't tried 2.6.11.7 yet...)

2.6.11.7 has no significant changes that should effect your touchpad.
We'll need much more information to make any headway here (see
REPORTING-BUGS).  I've got a Toshiba laptop, and have no issues with the
touchpad.  I assume this is an issue in just in X.  Do you see any obvious
difference in the Xorg.0.log when starting X on the two different kernels?
Any interesting dmesg output on the failing kernel?  Does booting with
psmouse.proto=exps help (assuming you have CONFIG_MOUSE_PS2=y)?

thanks,
-chris

^ permalink raw reply	[flat|nested] 21+ messages in thread

* bugreport
@ 2012-09-18 13:13 Dmitriy Bukach
  0 siblings, 0 replies; 21+ messages in thread
From: Dmitriy Bukach @ 2012-09-18 13:13 UTC (permalink / raw)
  To: linux-mm

hi


[71287.717849] process `sysctl' is using deprecated sysctl (syscall)
net.ipv6.neigh.bond0.base_reachable_time; Use
net.ipv6.neigh.bond0.base_reachable_time_ms instead.
[71287.720563] sysctl: The scan_unevictable_pages
sysctl/node-interface has been disabled for lack of a legitimate use
case.  If you have one, please send an email to linux-mm@kvack.org.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* bugreport
@ 2020-12-02 10:08 Ole M
  2020-12-02 16:25 ` bugreport Stefan Haller
  0 siblings, 1 reply; 21+ messages in thread
From: Ole M @ 2020-12-02 10:08 UTC (permalink / raw)
  To: git

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
* open Git Gui in a repository from git bash ($ git gui&)
* select some text in the diff pane

What did you expect to happen? (Expected behavior)
* selected text should be highlighted with white text on blue
background (maybe it used to use system defined colors?)

What happened instead? (Actual behavior)
* selected text is highlighted with white text on black background

What's different between what you expected and what actually happened?
* The contrast has increased to a level that is painful for me to look
at, making it difficult to read the selected text.
* It also makes the experience of this tool different from gitk,
making me focus on the tool rather than the content and workflow.

Anything else you want to add:


Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.29.2.windows.2
cpu: x86_64
built from commit: 3464b98ce6803c98bf8fb34390cd150d66e4a0d3
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
uname: Windows 10.0 18363
compiler info: gnuc: 10.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe


[Enabled Hooks]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: bugreport
  2020-12-02 10:08 bugreport Ole M
@ 2020-12-02 16:25 ` Stefan Haller
  0 siblings, 0 replies; 21+ messages in thread
From: Stefan Haller @ 2020-12-02 16:25 UTC (permalink / raw)
  To: Ole M, git; +Cc: Pratyush Yadav, Serg Tereshchenko

On 02.12.20 11:08, Ole M wrote:
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> * open Git Gui in a repository from git bash ($ git gui&)
> * select some text in the diff pane
> 
> What did you expect to happen? (Expected behavior)
> * selected text should be highlighted with white text on blue
> background (maybe it used to use system defined colors?)
> 
> What happened instead? (Actual behavior)
> * selected text is highlighted with white text on black background

Hi Ole,

thanks for the report. It's a known bug, a fix for this is already in
the works.

Best,
Stefan


> What's different between what you expected and what actually happened?
> * The contrast has increased to a level that is painful for me to look
> at, making it difficult to read the selected text.
> * It also makes the experience of this tool different from gitk,
> making me focus on the tool rather than the content and workflow.
> 
> Anything else you want to add:
> 
> 
> Please review the rest of the bug report below.
> You can delete any lines you don't wish to share.
> 
> 
> [System Info]
> git version:
> git version 2.29.2.windows.2
> cpu: x86_64
> built from commit: 3464b98ce6803c98bf8fb34390cd150d66e4a0d3
> sizeof-long: 4
> sizeof-size_t: 8
> shell-path: /bin/sh
> uname: Windows 10.0 18363
> compiler info: gnuc: 10.2
> libc info: no libc information available
> $SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe
> 
> 
> [Enabled Hooks]
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* bugreport
@ 2023-10-24 20:40 galo joel
  2023-11-20  8:36 ` bugreport Thomas Guyot
  0 siblings, 1 reply; 21+ messages in thread
From: galo joel @ 2023-10-24 20:40 UTC (permalink / raw)
  To: git


[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #1.2: Type: text/html, Size: 26 bytes --]

[-- Attachment #2: git-bugreport-2023-10-24-2215.txt --]
[-- Type: text/plain, Size: 1442 bytes --]

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

execute as admin git bash and,(in cmd W10, same. open git-bash.exe as system-32).
try chmod 755, 777... does not work 'cause im user ($) and not admin (#)

Wha did you expect to happen? (Expected behavior)

change .sh to chmod 755 for execute bash

What happened instead? (Actual behavior)

nothing ._.

What's different between what you expected and what actually happened?

i expected a good sript in bash. now i'm sad

Anything else you want to add:

Please tell me what happen, maybe i'm wrong but chatGPT also no have idea why 
i cannot be admin in my own laptop xD, or maybe i need some libraries that i didnot
install. I sell all my information so please help me to understand why does not work :)

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.42.0.windows.2
cpu: x86_64
built from commit: 2f819d1670fff9a1818f63b6722e9959405378e3
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Windows 10.0 19045 
compiler info: gnuc: 13.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe


[Enabled Hooks]
not run from a git repository - no hooks to show

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: bugreport
  2023-10-24 20:40 bugreport galo joel
@ 2023-11-20  8:36 ` Thomas Guyot
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Guyot @ 2023-11-20  8:36 UTC (permalink / raw)
  To: galo joel, git


Hi Joel,

I'm copying your attachment in-line for simplicity...

On 2023-10-24 16:40, galo joel wrote:
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
>
> execute as admin git bash and,(in cmd W10, same. open git-bash.exe as system-32).
> try chmod 755, 777... does not work 'cause im user ($) and not admin (#)
>
> Wha did you expect to happen? (Expected behavior)
>
> change .sh to chmod 755 for execute bash
>
> What happened instead? (Actual behavior)
>
> nothing ._.
>
> What's different between what you expected and what actually happened?
>
> i expected a good sript in bash. now i'm sad
>
> Anything else you want to add:
>
> Please tell me what happen, maybe i'm wrong but chatGPT also no have idea why
> i cannot be admin in my own laptop xD, or maybe i need some libraries that i didnot
> install. I sell all my information so please help me to understand why does not work :)
>
> Please review the rest of the bug report below.
> You can delete any lines you don't wish to share.
>
>
> [System Info]
> git version:
> git version 2.42.0.windows.2
> cpu: x86_64
> built from commit: 2f819d1670fff9a1818f63b6722e9959405378e3
> sizeof-long: 4
> sizeof-size_t: 8
> shell-path: /bin/sh
> feature: fsmonitor--daemon
> uname: Windows 10.0 19045
> compiler info: gnuc: 13.2
> libc info: no libc information available
> $SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe
>
>
> [Enabled Hooks]
> not run from a git repository - no hooks to show
>

You don't need admin to use git on Window. OTOH Windows has no concept 
of POSIX file permissions, and this is the reason you cannot set file 
permissions using chmod under git bash.

This Stackoverflow question has the answer you're most likely looking for:

https://stackoverflow.com/questions/21691202/how-to-create-file-execute-mode-permissions-in-git-on-windows

Regards,

--

Thomas

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Bugreport
@ 2024-01-19 13:25 Frank Schwidom
  2024-01-19 23:14 ` Bugreport brian m. carlson
  0 siblings, 1 reply; 21+ messages in thread
From: Frank Schwidom @ 2024-01-19 13:25 UTC (permalink / raw)
  To: git


This bug exists in possibly all git versions.

$ git init
$ touch a.txt
$ ln -s a.txt d
$ git add .
$ git commit -m + .
[master (root-commit) f6b4468] +
 2 files changed, 1 insertion(+)
 create mode 100644 a.txt
 create mode 120000 d
$ ls -la
total 12
drwxr-xr-x 3 ox ox 4096 Jan 19 14:10 .
drwxr-xr-x 4 ox ox 4096 Jan 19 14:04 ..
drwxr-xr-x 8 ox ox 4096 Jan 19 14:10 .git
-rw-r--r-- 1 ox ox    0 Jan 19 14:10 a.txt
lrwxrwxrwx 1 ox ox    5 Jan 19 14:10 d -> a.txt
$ rm d
$ mkdir d
$ touch d/b.txt
$ git add .
$ git commit . -m +
error: 'd' does not have a commit checked out
fatal: updating files failed


# I expect that git just replaces the link by the directory. But it makes problems.

# Workaround:

$ rm -rf d
$ git add .
$ git commit -m + .
[master 522e6db] +
 1 file changed, 1 deletion(-)
 delete mode 120000 d
$ mkdir d
$ touch d/b.txt
$ git add .
$ git commit -m + .
[master 8a125ee] +
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 d/b.txt

[System Info]
git version:
git version 2.43.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.1.0-8-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.25-1 (2023-04-22) x86_64
compiler info: gnuc: 13.2
libc info: glibc: 2.37
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]

Thanks in advance,
Frank Schwidom

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bugreport
  2024-01-19 13:25 Bugreport Frank Schwidom
@ 2024-01-19 23:14 ` brian m. carlson
  2024-01-20  0:46   ` partial commit of file-to-directory change, was Bugreport Jeff King
  0 siblings, 1 reply; 21+ messages in thread
From: brian m. carlson @ 2024-01-19 23:14 UTC (permalink / raw)
  To: Frank Schwidom; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

On 2024-01-19 at 13:25:51, Frank Schwidom wrote:
> 
> This bug exists in possibly all git versions.
> 
> $ git init
> $ touch a.txt
> $ ln -s a.txt d
> $ git add .
> $ git commit -m + .
> [master (root-commit) f6b4468] +
>  2 files changed, 1 insertion(+)
>  create mode 100644 a.txt
>  create mode 120000 d
> $ ls -la
> total 12
> drwxr-xr-x 3 ox ox 4096 Jan 19 14:10 .
> drwxr-xr-x 4 ox ox 4096 Jan 19 14:04 ..
> drwxr-xr-x 8 ox ox 4096 Jan 19 14:10 .git
> -rw-r--r-- 1 ox ox    0 Jan 19 14:10 a.txt
> lrwxrwxrwx 1 ox ox    5 Jan 19 14:10 d -> a.txt
> $ rm d
> $ mkdir d
> $ touch d/b.txt
> $ git add .
> $ git commit . -m +
> error: 'd' does not have a commit checked out
> fatal: updating files failed

I can confirm this behaviour[0], and it's definitely wrong that it
thinks `d` is a submodule.  It does, however, work if you do `git commit
-m +` (that is, without the .), which makes sense since the relevant
change is already staged in the index.

I'm not going to get to a patch or more thorough investigation, but
perhaps someone else will.

[0] git version 2.43.0.381.gb435a96ce8
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* partial commit of file-to-directory change, was Re: Bugreport
  2024-01-19 23:14 ` Bugreport brian m. carlson
@ 2024-01-20  0:46   ` Jeff King
  2024-01-20  0:55     ` Junio C Hamano
                       ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Jeff King @ 2024-01-20  0:46 UTC (permalink / raw)
  To: brian m. carlson; +Cc: Junio C Hamano, Frank Schwidom, git

On Fri, Jan 19, 2024 at 11:14:47PM +0000, brian m. carlson wrote:

> > $ git commit . -m +
> > error: 'd' does not have a commit checked out
> > fatal: updating files failed
> 
> I can confirm this behaviour[0], and it's definitely wrong that it
> thinks `d` is a submodule.  It does, however, work if you do `git commit
> -m +` (that is, without the .), which makes sense since the relevant
> change is already staged in the index.
> 
> I'm not going to get to a patch or more thorough investigation, but
> perhaps someone else will.

I peeked at this a bit earlier; I didn't come up with a solution, but
here are a few more details.

As you noted, the problem is only with giving a pathspec to "git
commit". The bug is in the custom code git-commit uses to set up the
index for a partial commit. It generates a list of entries for the
partial commit via list_path(), and then tries to add them to the index.
But of course "d", being a directory, does not make any sense as an
index entry itself (unless as a submodule).

I'd have thought that we should just be using the same code that "git
add" does here (which obviously works). But all of this comes from
2888605c64 (builtin-commit: fix partial-commit support, 2007-11-18),
which explicitly says "you can't just run add_files_to_cache()", which
is what git-add does under the hood.

I don't know if we could revisit those assumptions and reuse some of the
existing code, or if the custom partial-commit code could be fixed.  I
guess the root of the issue is that in the call to list_paths(), we call
overlay_tree_on_index(). And that's how we end up thinking that "d" is a
useful path to talk about, even though it has already been removed from
the index (we have "d/b.txt" instead).

So I'm not sure if we need a solution here-ish:

diff --git a/builtin/commit.c b/builtin/commit.c
index 65196a2827..25e65e986d 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -302,7 +302,9 @@ static void add_remove_files(struct string_list *list)
 			continue;
 
 		if (!lstat(p->string, &st)) {
-			if (add_to_index(&the_index, p->string, &st, 0))
+			if (S_ISDIR(st.st_mode))
+				warning("woah, %s is a dir", p->string);
+			else if (add_to_index(&the_index, p->string, &st, 0))
 				die(_("updating files failed"));
 		} else
 			remove_file_from_index(&the_index, p->string);

but I'm not quite sure what we should be doing instead of that
warning(). Should we updating and including everything in "d/"? What
about if there were a "d/c.txt" that was not a tracked file at all?

It might also be that the bug is earlier in list_paths(), where we
should notice that "d" is gone and now we have entries under "d/".

I dunno. I probably won't dig much further on this myself, but it's
possible Junio (cc'd) might have an idea right away.

-Peff

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: partial commit of file-to-directory change, was Re: Bugreport
  2024-01-20  0:46   ` partial commit of file-to-directory change, was Bugreport Jeff King
@ 2024-01-20  0:55     ` Junio C Hamano
  2024-01-20  1:22     ` Junio C Hamano
  2024-01-25 18:54     ` Junio C Hamano
  2 siblings, 0 replies; 21+ messages in thread
From: Junio C Hamano @ 2024-01-20  0:55 UTC (permalink / raw)
  To: Jeff King; +Cc: brian m. carlson, Frank Schwidom, git

Jeff King <peff@peff.net> writes:

> I dunno. I probably won't dig much further on this myself, but it's
> possible Junio (cc'd) might have an idea right away.

Sorry, but I do not have any idea "right away".  I even needed to
see the tree of 2888605c64 and check if we had submodules back then
(it turns out that we did).

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: partial commit of file-to-directory change, was Re: Bugreport
  2024-01-20  0:46   ` partial commit of file-to-directory change, was Bugreport Jeff King
  2024-01-20  0:55     ` Junio C Hamano
@ 2024-01-20  1:22     ` Junio C Hamano
  2024-01-25 18:54     ` Junio C Hamano
  2 siblings, 0 replies; 21+ messages in thread
From: Junio C Hamano @ 2024-01-20  1:22 UTC (permalink / raw)
  To: Jeff King; +Cc: brian m. carlson, Frank Schwidom, git

Jeff King <peff@peff.net> writes:

> It might also be that the bug is earlier in list_paths(), where we
> should notice that "d" is gone and now we have entries under "d/".

We had a related discussion on "commit -i/-o tests" review thread,
where we noticed that "git commit -i foobar", when "foobar" does not
match any path in the index, silently ignore that unmatching
pathspec (but "commit -o foobar" does error out, saying "did not
match any file(s) known to git").  The important design decision we
made long time ago when we introduced partial commit ("commit -o
pathspec") is that we do not _add_ paths (that match the pathspec)
that are not tracked.  We require explicit "git add" for them before
you run "git commit".

So, I suspect that list_paths() that gives "d" as a thing to add is
broken.  "commit -m + ." at that point is saying "we should get the
latest contents from the working tree for all the paths in the real
index, add[*] them to the temporary index freshly read from HEAD,
and the resulting temporary index should be written out as a tree"
to create a commit, and then "the same set of contents for the paths
then should be added to the real index, so that the differences
between the tree we wrote out of the temporary index to update the
HEAD and the real index would still be the changes already in the
index before this partial commit".

    Side note: here, "add" would include removing (if the working
    tree file for the path is gone) or killing 'd' while adding
    'd/b.txt'.

So I would understand if 'd/b.txt' is listed (because in the real
index there already is d/b.txt known), but if the directory 'd'
itself is listed, that does sound like a bug.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: partial commit of file-to-directory change, was Re: Bugreport
  2024-01-20  0:46   ` partial commit of file-to-directory change, was Bugreport Jeff King
  2024-01-20  0:55     ` Junio C Hamano
  2024-01-20  1:22     ` Junio C Hamano
@ 2024-01-25 18:54     ` Junio C Hamano
  2 siblings, 0 replies; 21+ messages in thread
From: Junio C Hamano @ 2024-01-25 18:54 UTC (permalink / raw)
  To: Jeff King; +Cc: brian m. carlson, Frank Schwidom, git

Jeff King <peff@peff.net> writes:

> On Fri, Jan 19, 2024 at 11:14:47PM +0000, brian m. carlson wrote:
>
>> > $ git commit . -m +
>> > error: 'd' does not have a commit checked out
>> > fatal: updating files failed
>> 
>> I can confirm this behaviour[0], and it's definitely wrong that it
>> thinks `d` is a submodule.  It does, however, work if you do `git commit
>> -m +` (that is, without the .), which makes sense since the relevant
>> change is already staged in the index.
>> 
>> I'm not going to get to a patch or more thorough investigation, but
>> perhaps someone else will.
>
> I peeked at this a bit earlier; I didn't come up with a solution, but
> here are a few more details.

I didn't either X-<, and the thing is somewhat nasty, as there are two
states (HEAD and the index) involved.

 * For paths that do not match the pathspec, we want to take the
   version from the HEAD.  For paths that do match the pathspec, we
   want to take the version from the working tree.  And after making
   the partial commit with such changes, we want to make the same
   change to the index to prepare for the next commit.

 * With the way the code is currently structured, we find paths that
   appear either in the index or in the HEAD to match against the
   pathspec.  This is so that we can honor an earlier "git rm" since
   we read HEAD.

 * Then we check each of these paths that are either in the index or
   in HEAD that matched the pathspec.  If it is missing from the
   working tree, we would remove it from both the temporary ndex
   used for the partial commit, and the real index that we'll
   continue to use after the partial commit.  If it exists in the
   working tree, we would take the contents of it to update.

   For the purpose of this operation, a path D that was a blob in
   the index should be _removed_ when it is a directory in the
   working tree (i.e. made room to create D/F).  And we should not
   add D/F when running "git commit D" or "git commit D/F", because
   the partial commit does not "git add" (it only does "git add -u")

In the example in the discussion, we had D that was a blob and got
replaced with a directory.  If we did "git add -u D", we would just
have removed D from the index, so the partial commit should do the
same.  Which means we need to know the type of the thing we expect.
But list_paths() only returns a list of path names, and does not
give us the type of the thing we expect.  We use the same list
twice, once to update the temporary index (which we create by
reading HEAD) and update the paths listed there from the working
tree.  And the same list is used again to update the real index
(which is what the user had before starting the command) and update
the paths listed there from the working tree.  The tricky part is
that the type of (or even existence of) D may have changed between
the HEAD and the index, but we want to perform the same operation to
the real index with respect to the paths we touched to create the
partial commit.

Naively, add_remove_files() looks like an obvious place to see if
the path is in the working tree (which we already do) *and* compare
it with "the type of the thing we expect", but the thing is that
this function is called twice with different index (once with the
temporary index that started from HEAD, i.e. oblivious to what the
user did to the index since HEAD; then again with the real index
with the changes the user made since HEAD), so we cannot just say
"let's see what this path D is in the index".

I _think_ we would need to update list_paths() so that it records a
bit more than just pathnames that match the pathspec, namely, what
should be done to the path, by doing lstat() on the working tree
paths.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Bugreport
       [not found] <AMDPR08MB11409C5DC2EA9B3D8C71FC12BED82A@AMDPR08MB11409.eurprd08.prod.outlook.com>
@ 2026-01-11 17:05 ` do Carmo Lucas, Dr. Amilcar (T-PSC)
  0 siblings, 0 replies; 21+ messages in thread
From: do Carmo Lucas, Dr. Amilcar (T-PSC) @ 2026-01-11 17:05 UTC (permalink / raw)
  To: git@vger.kernel.org

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
Using git "difftool --dir-diff" on windows on a lfs repository

What did you expect to happen? (Expected behavior)
I expected it to call the configured tool with no errors

What happened instead? (Actual behavior)
I get the error
error: could not symlink 'D:/xxxx/KUS.a2l' to 'C:\xxxx/KUS.a2l': Function not implemented

To fix this I need to call difftool with "--no-symlinks" but the documentation mentions that "--no-symlinks" is the default on windows. Well, it clearly isn't.

What's different between what you expected and what actually happened?

Anything else you want to add:

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.52.0.windows.1
cpu: x86_64
built from commit: 2912d8e9b8253723974b7baf1c890273b1a1c5bd
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
rust: disabled
feature: fsmonitor--daemon
libcurl: 8.17.0
OpenSSL: OpenSSL 3.5.4 30 Sep 2025
zlib: 1.3.1
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
uname: Windows 10.0 26100 
compiler info: gnuc: 15.2
libc info: no libc information available
$SHELL (typically, interactive shell): <unset>


[Enabled Hooks]
commit-msg
pre-commit

Mit freundlichen Grüßen,

Dr.-Ing. Amilcar Lucas


IAV – your Tech Solution Provider
Your one stop shop for the Software Defined Vehicle and all Powertrains

IAV GmbH Ingenieurgesellschaft Auto und Verkehr; Sitz/Registered Office: Berlin; Registergericht/Registration Court: Amtsgericht Charlottenburg (Berlin); Registernummer/Company Registration Number: HRB 21 280 B; Geschäftsführer/Managing Directors: Joerg Astalosch, Dr. Frauke Esser, Jens Pfitzinger; Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Dr. Nikolai Ardey


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-01-11 17:05 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-19 13:25 Bugreport Frank Schwidom
2024-01-19 23:14 ` Bugreport brian m. carlson
2024-01-20  0:46   ` partial commit of file-to-directory change, was Bugreport Jeff King
2024-01-20  0:55     ` Junio C Hamano
2024-01-20  1:22     ` Junio C Hamano
2024-01-25 18:54     ` Junio C Hamano
     [not found] <AMDPR08MB11409C5DC2EA9B3D8C71FC12BED82A@AMDPR08MB11409.eurprd08.prod.outlook.com>
2026-01-11 17:05 ` Bugreport do Carmo Lucas, Dr. Amilcar (T-PSC)
  -- strict thread matches above, loose matches on Subject: below --
2023-10-24 20:40 bugreport galo joel
2023-11-20  8:36 ` bugreport Thomas Guyot
2020-12-02 10:08 bugreport Ole M
2020-12-02 16:25 ` bugreport Stefan Haller
2012-09-18 13:13 bugreport Dmitriy Bukach
2005-04-12 18:11 Bugreport Amelia Nilsson
2005-04-12 22:21 ` Bugreport Chris Wright
2004-07-27 13:08 bugreport Artem B. Bityuckiy
2004-07-27 13:22 ` bugreport Thomas Gleixner
2004-07-27 14:40   ` bugreport Artem B. Bityuckiy
2004-07-27 17:31     ` bugreport Thomas Gleixner
2004-07-28  6:41       ` bugreport Artem B. Bityuckiy
2004-07-29 19:56         ` bugreport David Woodhouse
2004-07-26 11:16 bugreport Artem Bityuckiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.