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

[PATCH v3 1/2] worktree: update documentation for lock_reason and lock_reason_valid

From
nbelakovski@gmail.com <nbelakovski@gmail.com>
Date
Oct 30, 2018, 06:24 UTC
Message-ID
<20181030062409.42169-1-nbelakovski@gmail.com>
In-Reply-To
<20181025055142.38077-1-nbelakovski@gmail.com>
From: Nickolai Belakovski <nbelakovski@gmail.com>

Clarify that these fields are to be considered implementation details and direct the reader to use the is_worktree_locked function to retrieve said information.

Signed-off-by: Nickolai Belakovski <nbelakovski@gmail.com>
---
 worktree.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/worktree.h b/worktree.h
index df3fc30f7..6b12a3cf6 100644
--- a/worktree.h
+++ b/worktree.h
@@ -10,12 +10,12 @@ struct worktree {
 	char *path;
 	char *id;
 	char *head_ref;		/* NULL if HEAD is broken or detached */
-	char *lock_reason;	/* internal use */
+	char *lock_reason;	/* private - use is_worktree_locked */
 	struct object_id head_oid;
 	int is_detached;
 	int is_bare;
 	int is_current;
-	int lock_reason_valid;
+	int lock_reason_valid; /* private */
 };
 
 /* Functions for acting on the information about worktrees. */
-- 
2.14.2
Previous: Junio C HamanoNext: nbelakovski@gmail.com
Message 10 of 19 in “worktree: populate lock_reason in get_worktrees and light refactor/cleanup in worktree files”
  1. worktree: populate lock_reason in get_worktrees and light refactor/cleanup in worktree filesnbelakovski@gmail.com, Oct 24, 2018
  2. Eric SunshineOct 24, 2018
  3. Nickolai BelakovskiOct 25, 2018
  4. worktree: refactor lock_reason_valid and lock_reason to be more sensiblenbelakovski@gmail.com, Oct 25, 2018
  5. Junio C HamanoOct 25, 2018
  6. Nickolai BelakovskiOct 28, 2018
  7. Junio C HamanoOct 29, 2018
  8. Nickolai BelakovskiOct 29, 2018
  9. Junio C HamanoOct 29, 2018
  10. 1/2 worktree: update documentation for lock_reason and lock_reason_validnbelakovski@gmail.com, Oct 30, 2018
  11. 2/2 worktree: rename is_worktree_locked to worktree_lock_reasonnbelakovski@gmail.com, Oct 30, 2018
  12. Junio C HamanoOct 31, 2018
  13. Junio C HamanoOct 31, 2018
  14. Eric SunshineOct 25, 2018
  15. Eric SunshineOct 28, 2018
  16. Nickolai BelakovskiOct 29, 2018
  17. Eric SunshineOct 29, 2018
  18. Nickolai BelakovskiOct 29, 2018
  19. Eric SunshineOct 29, 2018

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.