git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] dir.c: fix comments to agree with argument name

From
Nipunn Koorapati via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 15, 2020, 16:28 UTC
Message-ID
<pull.757.v2.git.1602779316760.gitgitgadget@gmail.com>
In-Reply-To
<pull.757.git.1602766160815.gitgitgadget@gmail.com>
From: Alex Vandiver <alexmv@dropbox.com>
Signed-off-by: Alex Vandiver <alexmv@dropbox.com>
Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com>
---
    dir.c: Fix comments to agree with argument name
    
    Comments are out of date with the variable names.
    
    Update since v1
    
     * Change "SHA1" to "oid" for consistency as suggested by Peff
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-757%2Fnipunn1313%2Fcomments-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-757/nipunn1313/comments-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/757
Range-diff vs v1:
 1:  08ad8fe7af ! 1:  571fa7dd3d dir.c: fix comments to agree with argument name
     @@ dir.c: static int add_patterns_from_buffer(char *buf, size_t size,
        * 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 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.
 dir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dir.c b/dir.c
index 78387110e6..ebea5f1f91 100644
--- a/dir.c
+++ b/dir.c
@@ -1040,9 +1040,9 @@ 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,
@@ -1090,7 +1090,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]) &&

base-commit: d4a392452e292ff924e79ec8458611c0f679d6d4
-- 
gitgitgadget
Previous: Nipunn Koorapati
Message 8 of 8 in “dir.c: fix comments to agree with argument name”
  1. dir.c: fix comments to agree with argument nameNipunn Koorapati via GitGitGadget, Oct 15, 2020
  2. Jeff KingOct 15, 2020
  3. Junio C HamanoOct 15, 2020
  4. Nipunn KoorapatiOct 15, 2020
  5. Jeff KingOct 15, 2020
  6. Junio C HamanoOct 15, 2020
  7. Nipunn KoorapatiOct 16, 2020
  8. dir.c: fix comments to agree with argument nameNipunn Koorapati via GitGitGadget, Oct 15, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.