From: Arsh Srivastava Date: Tue, 10 Mar 2026 18:00:32 GMT Subject: Re: [PATCH v2] advice: add stashBeforeCheckout advice for dirty branch switches Message-ID: In-Reply-To: Karthik Nayak writes > Use of Ai in patches and messages > Suggest the documentation for the same After reading the document carefully again , I understood my mistakes and I promise to not repeat it again while submitting future PR and commits. I am deeply sorry for the mistakes I made and promise to never repeat them again including in submission of version 4 of my current PR On Tue, 10 Mar 2026 at 22:45, Karthik Nayak wrote: > > Arsh Srivastava writes: > > > Subject: Re: [GSOC] advice: add stashBeforeCheckout advice for dirty > > branch switches > > > > Patrick Steinhardt writes: > > > >> It is used in "add.c", but not magically so. The function that you have > >> introduced is the only site that uses the new advice, but the function > >> is never called as far as I can see. So ultimately, the proposed change > >> does not have any effect on the user-observable behaviour. > > > > Thank you for the correction and for the bottom-posting reminder. > > > > You are right. The function advise_on_checkout_dirty_files() is defined > > but never called anywhere, so the patch has no user-observable effect. > > I also looked into the existing behaviour more carefully and found that > > unpack-trees.c already handles this case and prints a message telling > > the user to commit or stash their changes before switching branches. > > > > So the patch as written is both incomplete and duplicates existing > > behaviour. I will rework it in v3 to instead enhance the existing > > message in unpack-trees.c to also mention 'git checkout -m' for users > > who want to carry their local changes over to the new branch. > > > > I must say that the patch itself and the responses seem like they're > generated with LLMs. Our guidelines for AI usage within the Git project > are laid out in 'Documentation/SubmittingPatches'. > > For GSoC specifically, we have laid out our expectations here [1]. > Please go through them. > > [1]: https://git.github.io/General-Application-Information/ > > [snip]