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

Re: [PATCH] Rename ENT_INEXISTENT to ENT_NONEXISTENT

From
Ping Yin <pkufranky@gmail.com>
Date
May 3, 2008, 00:07 UTC
Message-ID
<1209773238-25987-1-git-send-email-pkufranky@gmail.com>
In-Reply-To
<7vfxt0wdkq.fsf@gitster.siamese.dyndns.org>
Signed-off-by: Ping Yin <pkufranky@gmail.com>
---
> By the way, "inexistent" is a word, but somehow it sounds quite awkward.
> Perhaps one of NONEXISTENT (more common), REMOVED (run_diff_files() takes
> a SILENT_ON_REMOVED option) or or MISSING (update-index --refresh takes an
> IGNORE_MISSING option) is better? 

I prefer nonexistent because removed or missing has the meaning that the user has removed it. However, it may be not this case (althogh it is at current time).

 diff-lib.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/diff-lib.c b/diff-lib.c
index 72c2a7b..61a1b7c 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -339,7 +339,7 @@ int run_diff_files_cmd(struct rev_info *revs, int argc, const char **argv)
 }
 
 #define ENT_STAGABLE 1
-#define ENT_INEXISTENT 2
+#define ENT_NONEXISTENT 2
 #define ENT_NOTGITDIR 3		/* Existent but not stagable (not a git dir) */
 /*
  * Check the status of a work tree entity
@@ -350,10 +350,10 @@ static int check_work_tree_entity(const struct cache_entry *ce, struct stat *st,
 	if (lstat(ce->name, st) < 0) {
 		if (errno != ENOENT && errno != ENOTDIR)
 			return -1;
-		return ENT_INEXISTENT;
+		return ENT_NONEXISTENT;
 	}
 	if (has_symlink_leading_path(ce->name, symcache))
-		return ENT_INEXISTENT;
+		return ENT_NONEXISTENT;
 	if (S_ISDIR(st->st_mode)) {
 		unsigned char sub[20];
 		if (resolve_gitlink_ref(ce->name, "HEAD", sub))
@@ -407,7 +407,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
 			       sizeof(struct combine_diff_parent)*5);
 
 			changed = check_work_tree_entity(ce, &st, symcache);
-			if (changed != ENT_INEXISTENT)
+			if (changed != ENT_NONEXISTENT)
 				dpath->mode = ce_mode_from_stat(ce, st.st_mode);
 			else {
 				if (changed < 0) {
@@ -471,7 +471,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
 			continue;
 
 		changed = check_work_tree_entity(ce, &st, symcache);
-		if (changed == ENT_INEXISTENT) {
+		if (changed == ENT_NONEXISTENT) {
 			if (changed < 0) {
 				perror(ce->name);
 				continue;
@@ -531,7 +531,7 @@ static int get_stat_data(struct cache_entry *ce,
 		changed = check_work_tree_entity(ce, &st, cbdata->symcache);
 		if (changed < 0)
 			return -1;
-		else if (changed == ENT_INEXISTENT) {
+		else if (changed == ENT_NONEXISTENT) {
 			if (match_missing) {
 				*sha1p = sha1;
 				*modep = mode;
-- 
1.5.5.1.117.g73010
Previous: Ping YinNext: Johannes Schindelin
Message 24 of 28 in “[regression?] "git status -a" reports modified for empty submodule directory”
  1. Ping YinApr 22, 2008
  2. Ping YinApr 22, 2008
  3. Johannes SixtApr 22, 2008
  4. Ping YinApr 22, 2008
  5. Johannes SixtApr 22, 2008
  6. Roman ShaposhnikApr 22, 2008
  7. Ping YinApr 29, 2008
  8. 0/2 Add tests for submodule with empty directoryPing Yin, Apr 29, 2008
  9. 1/2 t4027: test diff for submodule with empty directoryPing Yin, Apr 29, 2008
  10. 2/2 Add t7506 to test submodule related functions for git-statusPing Yin, Apr 29, 2008
  11. Junio C HamanoApr 29, 2008
  12. Johannes SixtApr 30, 2008
  13. Junio C HamanoApr 30, 2008
  14. Ping YinApr 30, 2008
  15. 0/4 Fix regression for unchecked out submodulesPing Yin, May 2, 2008
  16. 1/4 t4027: test diff for submodule with empty directoryPing Yin, May 2, 2008
  17. 2/4 Add t7506 to test submodule related functions for git-statusPing Yin, May 2, 2008
  18. 3/4 Fix diff regression for submodules not checked outPing Yin, May 2, 2008
  19. 4/4 Fix ie_match_stat for non-checked-out submodulePing Yin, May 2, 2008
  20. Junio C HamanoMay 2, 2008
  21. Ping YinMay 2, 2008
  22. Junio C HamanoMay 2, 2008
  23. Ping YinMay 2, 2008
  24. Ping YinMay 3, 2008
  25. Johannes SchindelinMay 3, 2008
  26. Junio C HamanoMay 3, 2008
  27. Junio C HamanoMay 4, 2008
  28. Ping YinMay 4, 2008

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.