git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Aditya Garg <gargaditya08@live.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	 Eric Sunshine <sunshine@sunshineco.com>,
	 Zi Yao <ziyao@disroot.org>,
	 brian m carlson <sandals@crustytoothpaste.net>,
	 Jeff King <peff@peff.net>,  Ben Knoble <ben.knoble@gmail.com>,
	 Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH v13 02/10] imap-send: add support for OAuth2.0 authentication
Date: Fri, 06 Jun 2025 10:03:57 -0700	[thread overview]
Message-ID: <xmqqbjr03ipu.fsf@gitster.g> (raw)
In-Reply-To: <PN3PR01MB959762A91208AEF089D3302BB86EA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM> (Aditya Garg's message of "Fri, 6 Jun 2025 16:50:49 +0000")

Aditya Garg <gargaditya08@live.com> writes:

> I was thinking the same but though the code would be more readable
> in case if repeats.

Sorry but I do not understand this comment at all.  Not repeating so
that you do not have to fix or update all the repetitions later when
the code needs to do something different is one of the basics in the
software engineering, and less repetitious code is also easier to
understnad in the art of software field.

If you start from a 20-line block and repeat it 5 times to grow it
100 lines of code, the eyes of readers will start coasting over
after a few repetitions, and you may be able to smuggle unwanted
lines unnoticed.  Unless you are aiming for such technique to do
something malicious, don't go there.

  reply	other threads:[~2025-06-06 17:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06  6:59 [PATCH v13 02/10] imap-send: add support for OAuth2.0 authentication Aditya Garg
2025-06-06  7:16 ` Aditya Garg
2025-06-06 16:38 ` Junio C Hamano
2025-06-06 16:50   ` Aditya Garg
2025-06-06 17:03     ` Junio C Hamano [this message]
2025-06-06 17:12       ` Aditya Garg
2025-06-06 20:08   ` Aditya Garg
  -- strict thread matches above, loose matches on Subject: below --
2025-06-05  8:42 [PATCH v13 00/10] imap-send: make it usable again and add OAuth2.0 support Aditya Garg
2025-06-05  8:42 ` [PATCH v13 02/10] imap-send: add support for OAuth2.0 authentication Aditya Garg
2025-06-05 16:33   ` Junio C Hamano
2025-06-05 17:16     ` Aditya Garg
2025-06-05 18:48       ` Junio C Hamano
2025-06-06  3:28         ` Aditya Garg
2025-06-06  4:04           ` Aditya Garg
2025-06-06  4:35           ` Junio C Hamano
2025-06-06  4:40             ` Aditya Garg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbjr03ipu.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ben.knoble@gmail.com \
    --cc=gargaditya08@live.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=phillip.wood123@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=sunshine@sunshineco.com \
    --cc=ziyao@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).