All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matheus Tavares <matheus.bernardino@usp.br>
To: git@vger.kernel.org
Cc: gitster@pobox.com, "Brandon Williams" <bwilliams.eng@gmail.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Patryk Obara" <patryk.obara@gmail.com>,
	"Derrick Stolee" <dstolee@microsoft.com>
Subject: [PATCH 1/2] dir: fix outdated comment on add_patterns()
Date: Mon, 16 Mar 2020 00:47:26 -0300	[thread overview]
Message-ID: <9de4c8cdee441be7d9bbef2a961a8ed7d423f448.1584329834.git.matheus.bernardino@usp.br> (raw)
In-Reply-To: <cover.1584329834.git.matheus.bernardino@usp.br>

In 4b33e60 ("dir: convert struct sha1_stat to use object_id",
2018-01-28), the struct sha1_stat was converted to oid_stat. In this
process, add_patterns() also learned to use the new struct definition.
However, the comments in this function still refer to "ss" (i.e. the old
sha1_stat). Update that.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
---
 dir.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dir.c b/dir.c
index 0ffb1b3302..ab2e5b8717 100644
--- a/dir.c
+++ b/dir.c
@@ -1015,9 +1015,10 @@ static int add_patterns_from_buffer(char *buf, size_t size,
  * an index if 'istate' is non-null), parse it and store the
  * exclude rules in "pl".
  *
- * If "ss" is not NULL, compute SHA-1 of the exclude file and fill
+ * If oid_stat is not NULL, compute OID of the exclude file and fill
  * stat data from disk (only valid if add_patterns returns zero). If
- * ss_valid is non-zero, "ss" must contain good value as input.
+ * oid_stat->valid is non-zero, oid_stat must contain good value as
+ * input.
  */
 static int add_patterns(const char *fname, const char *base, int baselen,
 			struct pattern_list *pl, struct index_state *istate,
@@ -1065,7 +1066,7 @@ static int add_patterns(const char *fname, const char *base, int baselen,
 			int pos;
 			if (oid_stat->valid &&
 			    !match_stat_data_racy(istate, &oid_stat->stat, &st))
-				; /* no content change, ss->sha1 still good */
+				; /* no content change, oid_stat->oid still good */
 			else if (istate &&
 				 (pos = index_name_pos(istate, fname, strlen(fname))) >= 0 &&
 				 !ce_stage(istate->cache[pos]) &&
-- 
2.25.0


  reply	other threads:[~2020-03-16  3:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  3:47 [PATCH 0/2] dir: update outdated fields and comments about oid_stat Matheus Tavares
2020-03-16  3:47 ` Matheus Tavares [this message]
2020-03-16  3:47 ` [PATCH 2/2] dir: improve naming of oid_stat fields in two structs Matheus Tavares
2020-03-16  6:17   ` Junio C Hamano
2020-03-16 12:31     ` Patryk Obara
2020-03-16 17:22     ` Matheus Tavares Bernardino
2020-03-16 18:31       ` Junio C Hamano
2020-03-16 18:35         ` Junio C Hamano
2020-03-16 19:20           ` Jeff King
2020-03-17 18:57 ` [PATCH v2 0/3] dir: update outdated field names and comments about oid_stat Matheus Tavares
2020-03-17 18:57   ` [PATCH v2 1/3] dir: fix outdated comment on add_patterns() Matheus Tavares
2020-03-17 18:57   ` [PATCH v2 2/3] dir: improve naming of oid_stat fields in two structs Matheus Tavares
2020-03-17 18:57   ` [PATCH v2 3/3] dir: update outdated comments about untracked cache Matheus Tavares

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=9de4c8cdee441be7d9bbef2a961a8ed7d423f448.1584329834.git.matheus.bernardino@usp.br \
    --to=matheus.bernardino@usp.br \
    --cc=bwilliams.eng@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=patryk.obara@gmail.com \
    --cc=pclouds@gmail.com \
    /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 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.