rename dirlink to gitlink.
PATCH 1/1 rename dirlink to gitlink.
Unify naming of plumbing dirlink/gitlink concept:
perl -pi -e 's/dirlink/gitlink/g' -e 's/DIRLNK/GITLINK/g'
--- archive-tar.c | 4 ++-- archive-zip.c | 2 +- builtin-fsck.c | 4 ++-- builtin-ls-tree.c | 2 +- builtin-update-index.c | 4 ++-- cache-tree.c | 2 +- cache.h | 10 +++++----- diff.c | 2 +- dir.c | 6 +++--- dir.h | 2 +- entry.c | 4 ++-- list-objects.c | 2 +- read-cache.c | 6 +++--- tree.c | 4 ++-- 14 files changed, 27 insertions(+), 27 deletions(-)
archive-tar.c +2 -2
@@ -167,7 +167,7 @@ static void write_entry(const unsigned char *sha1, struct strbuf *path, }else {if (verbose)fprintf (stderr,"%.*s\n" , path->len, path->buf); -if (S_ISDIR (mode) ||S_ISDIRLNK (mode)) { +if (S_ISDIR (mode) ||S_ISGITLINK (mode)) { *header.typeflag =TYPEFLAG_DIR ; mode = (mode |0777 ) & ~tar_umask; }else if (S_ISLNK (mode)) {
@@ -280,7 +280,7 @@ static int write_tar_entry(const unsigned char *sha1,memcpy (path.buf + baselen, filename, filenamelen); path.len = baselen + filenamelen; path.buf[path.len] ='\0' ; -if (S_ISDIR (mode) ||S_ISDIRLNK (mode)) { +if (S_ISDIR (mode) ||S_ISGITLINK (mode)) {strbuf_append_string (&path,"/" ); buffer =NULL ; size =0 ;
archive-zip.c +1 -1
@@ -182,7 +182,7 @@ static int write_zip_entry(const unsigned char *sha1, goto out; } -if (S_ISDIR (mode) ||S_ISDIRLNK (mode)) { +if (S_ISDIR (mode) ||S_ISGITLINK (mode)) { method =0 ; attr2 =16 ; result = (S_ISDIR (mode) ?READ_TREE_RECURSIVE :0 );
builtin-fsck.c +2 -2
@@ -256,7 +256,7 @@ static int fsck_tree(struct tree *item)case S_IFREG |0644 :case S_IFLNK :case S_IFDIR : -case S_IFDIRLNK : +case S_IFGITLINK :break ;/* * This is nonstandard, but we had a few of these
@@ -715,7 +715,7 @@ int cmd_fsck(int argc, char **argv, const char *prefix)struct object *obj; mode =ntohl (active_cache[i]->ce_mode); -if (S_ISDIRLNK (mode)) +if (S_ISGITLINK (mode))continue ; blob =lookup_blob (active_cache[i]->sha1);if (!blob)
builtin-ls-tree.c +1 -1
@@ -60,7 +60,7 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,int retval =0 ;const char *type = blob_type; -if (S_ISDIRLNK (mode)) { +if (S_ISGITLINK (mode)) {/* * Maybe we want to have some recursive version here? *
builtin-update-index.c +2 -2
@@ -134,7 +134,7 @@ static int process_directory(const char *path, int len, struct stat *st)/* Exact match: file or existing gitlink */ if (pos >=0 ) {struct cache_entry *ce = active_cache[pos]; -if (S_ISDIRLNK (ntohl (ce->ce_mode))) { +if (S_ISGITLINK (ntohl (ce->ce_mode))) {/* Do nothing to the index if there is no HEAD! */ if (resolve_gitlink_ref (path,"HEAD" , sha1) <0 )
@@ -178,7 +178,7 @@ static int process_file(const char *path, int len, struct stat *st)int pos =cache_name_pos (path, len);struct cache_entry *ce = pos <0 ?NULL : active_cache[pos]; -if (ce &&S_ISDIRLNK (ntohl (ce->ce_mode))) +if (ce &&S_ISGITLINK (ntohl (ce->ce_mode)))return error ("%s is already a gitlink, not replacing" , path);return add_one_path (ce, path, len, st);
cache-tree.c +1 -1
@@ -326,7 +326,7 @@ static int update_one(struct cache_tree *it, mode =ntohl (ce->ce_mode); entlen = pathlen - baselen; } -if (mode !=S_IFDIRLNK && !missing_ok && !has_sha1_file (sha1)) +if (mode !=S_IFGITLINK && !missing_ok && !has_sha1_file (sha1))return error ("invalid object %s" ,sha1_to_hex (sha1));if (!ce->ce_mode)
cache.h +5 -5
@@ -40,8 +40,8 @@* happens that everybody shares the same bit representation * in the UNIX world (and apparently wider too..) */ -#define S_IFDIRLNK 0160000 -#define S_ISDIRLNK (m) (((m) & S_IFMT) == S_IFDIRLNK) +#define S_IFGITLINK 0160000 +#define S_ISGITLINK (m) (((m) & S_IFMT) == S_IFGITLINK)/* * Intensive research over the course of many years has shown that
@@ -123,8 +123,8 @@ static inline unsigned int create_ce_mode(unsigned int mode) {if (S_ISLNK (mode))return htonl (S_IFLNK ); -if (S_ISDIR (mode) ||S_ISDIRLNK (mode)) -return htonl (S_IFDIRLNK ); +if (S_ISDIR (mode) ||S_ISGITLINK (mode)) +return htonl (S_IFGITLINK );return htonl (S_IFREG |ce_permissions (mode)); }static inline unsigned int ce_mode_from_stat (struct cache_entry *ce,unsigned int mode)
@@ -142,7 +142,7 @@ static inline unsigned int ce_mode_from_stat(struct cache_entry *ce, unsigned in }#define canon_mode (mode) \ (S_ISREG(mode) ? (S_IFREG | ce_permissions(mode)) : \ - S_ISLNK(mode) ? S_IFLNK : S_ISDIR(mode) ? S_IFDIR : S_IFDIRLNK) + S_ISLNK(mode) ? S_IFLNK : S_ISDIR(mode) ? S_IFDIR : S_IFGITLINK)#define cache_entry_size (len) ((offsetof(struct cache_entry,name) + (len) + 8) & ~7)
diff.c +1 -1
@@ -1467,7 +1467,7 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)if (size_only &&0 < s->size)return 0 ; -if (S_ISDIRLNK (s->mode)) +if (S_ISGITLINK (s->mode))return diff_populate_gitlink (s, size_only); if (!s->sha1_valid ||
dir.c +3 -3
@@ -321,7 +321,7 @@ static enum exist_status directory_exists_in_index(const char *dirname, int len)break ;if (endchar =='/' )return index_directory; -if (!endchar &&S_ISDIRLNK (ntohl (ce->ce_mode))) +if (!endchar &&S_ISGITLINK (ntohl (ce->ce_mode)))return index_gitdir; }return index_nonexistent;
@@ -356,7 +356,7 @@ static enum exist_status directory_exists_in_index(const char *dirname, int len)* also true and the directory is empty, in which case * we just ignore it entirely. * (b) if it looks like a git directory, and we don't have -* 'no_dirlinks' set we treat it as a gitlink, and show it +* 'no_gitlinks' set we treat it as a gitlink, and show it * as a directory. * (c) otherwise, we recurse into it. */
@@ -383,7 +383,7 @@ static enum directory_treatment treat_directory(struct dir_struct *dir,case index_nonexistent:if (dir->show_other_directories)break ; -if (!dir->no_dirlinks) { +if (!dir->no_gitlinks) {unsigned char sha1[20 ];if (resolve_gitlink_ref (dirname,"HEAD" , sha1) ==0 )return show_directory;
dir.h +1 -1
@@ -34,7 +34,7 @@ struct dir_struct { unsigned int show_ignored:1, show_other_directories:1, hide_empty_directories:1, - no_dirlinks:1; + no_gitlinks:1;struct dir_entry **entries;/* Exclude info */
entry.c +2 -2
@@ -145,7 +145,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout "symlink %s (%s)", path, strerror(errno)); }break ; -case S_IFDIRLNK : +case S_IFGITLINK :if (to_tempfile)return error ("git-checkout-index: cannot create temporary subproject %s" , path);if (mkdir (path,0777 ) <0 )
@@ -194,7 +194,7 @@ int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *tunlink (path);if (S_ISDIR (st.st_mode)) {/* If it is a gitlink, leave it alone! */ -if (S_ISDIRLNK (ntohl (ce->ce_mode))) +if (S_ISGITLINK (ntohl (ce->ce_mode)))return 0 ;if (!state->force)return error ("%s is a directory" , path);
list-objects.c +1 -1
@@ -87,7 +87,7 @@ static void process_tree(struct rev_info *revs,process_tree (revs,lookup_tree (entry.sha1), p, &me, entry.path); - else if (S_ISDIRLNK(entry.mode)) + else if (S_ISGITLINK(entry.mode)) process_gitlink(revs, entry.sha1, p, &me, entry.path); else
read-cache.c +3 -3
@@ -92,7 +92,7 @@ static int ce_compare_gitlink(struct cache_entry *ce)/* * We don't actually require that the .git directory -* under DIRLNK directory be a valid git directory. It +* under GITLINK directory be a valid git directory. It * might even be missing (in case nobody populated that * sub-project). *
@@ -115,7 +115,7 @@ static int ce_modified_check_fs(struct cache_entry *ce, struct stat *st)return DATA_CHANGED ;break ;case S_IFDIR : -if (S_ISDIRLNK (ntohl (ce->ce_mode))) +if (S_ISGITLINK (ntohl (ce->ce_mode)))return 0 ;default :return TYPE_CHANGED ;
@@ -142,7 +142,7 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st) (has_symlinks || !S_ISREG(st->st_mode))) changed |=TYPE_CHANGED ;break ; -case S_IFDIRLNK : +case S_IFGITLINK :if (!S_ISDIR (st->st_mode)) changed |=TYPE_CHANGED ;else if (ce_compare_gitlink (ce))
tree.c +2 -2
@@ -157,7 +157,7 @@ static void track_tree_refs(struct tree *item)/* Count how many entries there are.. */ init_tree_desc (&desc, item->buffer, item->size);while (tree_entry (&desc, &entry)) { -if (S_ISDIRLNK (entry.mode)) +if (S_ISGITLINK (entry.mode))continue ; n_refs++; }
@@ -169,7 +169,7 @@ static void track_tree_refs(struct tree *item)while (tree_entry (&desc, &entry)) {struct object *obj; -if (S_ISDIRLNK (entry.mode)) +if (S_ISGITLINK (entry.mode))continue ;if (S_ISDIR (entry.mode)) obj = &lookup_tree (entry.sha1)->object;
Signature · 4 lines
1.5.2.2.g081e -- Martin Waitz
Quoted 4 lines · Martin Waitz
Unify naming of plumbing dirlink/gitlink concept:
perl -pi -e 's/dirlink/gitlink/g' -e 's/DIRLNK/GITLINK/g'
---
Does this mean that the link doesn't necessarily has to be represented as a directory (even though current code does it) ?
//Torgil
Quoted 8 lines · Torgil Svensson
Quoted 4 lines · Martin Waitz
Unify naming of plumbing dirlink/gitlink concept:
perl -pi -e 's/dirlink/gitlink/g' -e 's/DIRLNK/GITLINK/g'
---Does this mean that the link doesn't necessarily has to be represented as a directory (even though current code does it) ?
I do not think the patch has that much deep meaning.
Personally I think the patch is similar to renaming "cache" used in the code to "index" --- needless code shuffling that does not buy you anything.
As an internal symbol, S_IFDIRLNK makes _much_ more sense than S_IFGITLINK, exactly because it is a mixture of S_IFDIR and S_IFLNK.
The only excuse that we _might_ want to consider the patch is that S_IFDIRLNK has not lived that long, compared to the use of word "cache" in our codebase. It's only two weeks old -- so if we were to apply this patch, we would need to do that right away, or it will be never.
But I am not _so_ enthused about the renaming in the code.
hoi :)
Quoted 3 lines · Junio C Hamano
As an internal symbol,
S_IFDIRLNKmakes _much_ more sense thanS_IFGITLINK, exactly because it is a mixture ofS_IFDIRandS_IFLNK.
But then we also should be consequent and rename the entire low-level plumbing to dirlink. I don't see a reason to keep both.
For me the S_ macro names are about the file type which is represented by them. The fact that dirlinks/gitlinks are represented as DIR + LNK is nice but not so important that we have to name the macro that way.
Signature · 1 line
Martin Waitz
Quoted 10 lines · Martin Waitz
hoi :)
Quoted 3 lines · Junio C Hamano
As an internal symbol,
S_IFDIRLNKmakes _much_ more sense thanS_IFGITLINK, exactly because it is a mixture ofS_IFDIRandS_IFLNK.But then we also should be consequent and rename the entire low-level plumbing to dirlink. I don't see a reason to keep both.
Ok. Let's do that then before it is too late.
PATCH 1/1 rename gitlink to dirlink.
Unify naming of plumbing dirlink/gitlink concept:
perl -pi -e 's/gitlink/dirlink/g'
---
Quoted 5 lines · Junio C Hamano
Quoted 3 lines
But then we also should be consequent and rename the entire low-level plumbing to dirlink. I don't see a reason to keep both.
Ok. Let's do that then before it is too late.
now you can choose which one you want to apply...
builtin-ls-files.c | 2 +- builtin-update-index.c | 14 +++++++------- diff.c | 4 ++-- dir.c | 10 +++++----- entry.c | 2 +- list-objects.c | 10 +++++----- read-cache.c | 6 +++--- refs.c | 12 ++++++------ refs.h | 4 ++-- sha1_file.c | 2 +- tree.c | 2 +- 11 files changed, 34 insertions(+), 34 deletions(-)
builtin-ls-files.c +1 -1
@@ -97,7 +97,7 @@ static void show_other_files(struct dir_struct *dir)* * (Matching entries are normally pruned during * the directory tree walk, but will show up for -* gitlinks because we don't necessarily have +* dirlinks because we don't necessarily have * dir->show_other_directories set to suppress * them). */
builtin-update-index.c +7 -7
@@ -106,7 +106,7 @@ static int add_one_path(struct cache_entry *old, const char *path, int len, stru/* * Handle a path that was a directory. Four cases: * -* - it's already a gitlink in the index, and we keep it that +* - it's already a dirlink in the index, and we keep it that * way, and update it if we can (if we cannot find the HEAD, * we're going to keep it unchanged in the index!) *
@@ -124,20 +124,20 @@ static int add_one_path(struct cache_entry *old, const char *path, int len, stru* to try to update it as a directory. * * - it doesn't exist at all in the index, but it is a valid -* git directory, and it should be *added* as a gitlink. +* git directory, and it should be *added* as a dirlink. */ static int process_directory (const char *path,int len,struct stat *st) {unsigned char sha1[20 ];int pos =cache_name_pos (path, len); -/* Exact match: file or existing gitlink */ +/* Exact match: file or existing dirlink */ if (pos >=0 ) {struct cache_entry *ce = active_cache[pos];if (S_ISDIRLNK (ntohl (ce->ce_mode))) {/* Do nothing to the index if there is no HEAD! */ -if (resolve_gitlink_ref (path,"HEAD" , sha1) <0 ) +if (resolve_dirlink_ref (path,"HEAD" , sha1) <0 )return 0 ;return add_one_path (ce, path, len, st);
@@ -162,8 +162,8 @@ static int process_directory(const char *path, int len, struct stat *st)return error ("%s: is a directory - add individual files instead" , path); } -/* No match - should we add it as a gitlink? */ -if (!resolve_gitlink_ref (path,"HEAD" , sha1)) +/* No match - should we add it as a dirlink? */ +if (!resolve_dirlink_ref (path,"HEAD" , sha1))return add_one_path (NULL , path, len, st);/* Error out. */
@@ -179,7 +179,7 @@ static int process_file(const char *path, int len, struct stat *st)struct cache_entry *ce = pos <0 ?NULL : active_cache[pos];if (ce &&S_ISDIRLNK (ntohl (ce->ce_mode))) -return error ("%s is already a gitlink, not replacing" , path); +return error ("%s is already a dirlink, not replacing" , path);return add_one_path (ce, path, len, st); }
diff.c +2 -2
@@ -1432,7 +1432,7 @@ static int populate_from_stdin(struct diff_filespec *s)return 0 ; } -static int diff_populate_gitlink (struct diff_filespec *s,int size_only) +static int diff_populate_dirlink (struct diff_filespec *s,int size_only) {int len;char *data =xmalloc (100 );
@@ -1468,7 +1468,7 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)return 0 ;if (S_ISDIRLNK (s->mode)) -return diff_populate_gitlink (s, size_only); +return diff_populate_dirlink (s, size_only);if (!s->sha1_valid ||reuse_worktree_file (s->path, s->sha1,0 )) {
dir.c +5 -5
@@ -300,7 +300,7 @@ enum exist_status {/* * The index sorts alphabetically by entry name, which -* means that a gitlink sorts as '\0' at the end, while +* means that a dirlink sorts as '\0' at the end, while * a directory (which is defined not as an entry, but as * the files it contains) will sort with the '/' at the * end.
@@ -343,8 +343,8 @@ static enum exist_status directory_exists_in_index(const char *dirname, int len)* directory name, we always recurse into the directory to see * all the files. * -* Case 2: If we *already* have that directory name as a gitlink, -* we always continue to see it as a gitlink, regardless of whether +* Case 2: If we *already* have that directory name as a dirlink, +* we always continue to see it as a dirlink, regardless of whether * there is an actual git directory there or not (it might not * be checked out as a subproject!) *
@@ -356,7 +356,7 @@ static enum exist_status directory_exists_in_index(const char *dirname, int len)* also true and the directory is empty, in which case * we just ignore it entirely. * (b) if it looks like a git directory, and we don't have -* 'no_dirlinks' set we treat it as a gitlink, and show it +* 'no_dirlinks' set we treat it as a dirlink, and show it * as a directory. * (c) otherwise, we recurse into it. */
@@ -385,7 +385,7 @@ static enum directory_treatment treat_directory(struct dir_struct *dir,break ;if (!dir->no_dirlinks) {unsigned char sha1[20 ]; -if (resolve_gitlink_ref (dirname,"HEAD" , sha1) ==0 ) +if (resolve_dirlink_ref (dirname,"HEAD" , sha1) ==0 )return show_directory; }return recurse_into_directory;
entry.c +1 -1
@@ -193,7 +193,7 @@ int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *t*/ unlink (path);if (S_ISDIR (st.st_mode)) { -/* If it is a gitlink, leave it alone! */ +/* If it is a dirlink, leave it alone! */ if (S_ISDIRLNK (ntohl (ce->ce_mode)))return 0 ;if (!state->force)
list-objects.c +5 -5
@@ -26,7 +26,7 @@ static void process_blob(struct rev_info *revs, }/* -* Processing a gitlink entry currently does nothing, since +* Processing a dirlink entry currently does nothing, since * we do not recurse into the subproject. * * We *could* eventually add a flag that actually does that,
@@ -34,20 +34,20 @@ static void process_blob(struct rev_info *revs,* - is the subproject actually checked out? * - if so, see if the subproject has already been added * to the alternates list, and add it if not. -* - process the commit (or tag) the gitlink points to +* - process the commit (or tag) the dirlink points to * recursively. * * However, it's unclear whether there is really ever any * reason to see superprojects and subprojects as such a * "unified" object pool (potentially resulting in a totally * humongous pack - avoiding which was the whole point of -* having gitlinks in the first place!). +* having dirlinks in the first place!). * * So for now, there is just a note that we *could* follow * the link, and how to do it. Whether it necessarily makes * any sense what-so-ever to ever do that is another issue. */ -static void process_gitlink(struct rev_info *revs, +static void process_dirlink(struct rev_info *revs, const unsigned char *sha1, struct object_array *p, struct name_path *path,
@@ -88,7 +88,7 @@ static void process_tree(struct rev_info *revs,lookup_tree (entry.sha1), p, &me, entry.path); else if (S_ISDIRLNK(entry.mode)) - process_gitlink(revs, entry.sha1, + process_dirlink(revs, entry.sha1, p, &me, entry.path); else process_blob(revs,
read-cache.c +3 -3
@@ -86,7 +86,7 @@ static int ce_compare_link(struct cache_entry *ce, size_t expected_size)return match; } -static int ce_compare_gitlink (struct cache_entry *ce) +static int ce_compare_dirlink (struct cache_entry *ce) {unsigned char sha1[20 ];
@@ -98,7 +98,7 @@ static int ce_compare_gitlink(struct cache_entry *ce)* * If so, we consider it always to match. */ -if (resolve_gitlink_ref (ce->name,"HEAD" , sha1) <0 ) +if (resolve_dirlink_ref (ce->name,"HEAD" , sha1) <0 )return 0 ;return hashcmp (sha1, ce->sha1); }
@@ -145,7 +145,7 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)case S_IFDIRLNK :if (!S_ISDIR (st->st_mode)) changed |=TYPE_CHANGED ; -else if (ce_compare_gitlink (ce)) +else if (ce_compare_dirlink (ce)) changed |=DATA_CHANGED ;return changed;default :
refs.c +6 -6
@@ -285,7 +285,7 @@ static struct ref_list *get_loose_refs(void)#define MAXDEPTH 5#define MAXREFLEN (1024) -static int resolve_gitlink_packed_ref (char *name,int pathlen,const char *refname,unsigned char *result) +static int resolve_dirlink_packed_ref (char *name,int pathlen,const char *refname,unsigned char *result) {FILE *f;struct cached_refs refs;
@@ -312,7 +312,7 @@ static int resolve_gitlink_packed_ref(char *name, int pathlen, const char *refnareturn retval; } -static int resolve_gitlink_ref_recursive (char *name,int pathlen,const char *refname,unsigned char *result,int recursion) +static int resolve_dirlink_ref_recursive (char *name,int pathlen,const char *refname,unsigned char *result,int recursion) {int fd, len =strlen (refname);char buffer[128 ], *p;
@@ -322,7 +322,7 @@ static int resolve_gitlink_ref_recursive(char *name, int pathlen, const char *rememcpy (name + pathlen, refname, len+1 ); fd =open (name,O_RDONLY );if (fd <0 ) -return resolve_gitlink_packed_ref (name, pathlen, refname, result); +return resolve_dirlink_packed_ref (name, pathlen, refname, result); len =read (fd, buffer,sizeof (buffer)-1 );close (fd);
@@ -343,10 +343,10 @@ static int resolve_gitlink_ref_recursive(char *name, int pathlen, const char *rewhile (isspace (*p)) p++; -return resolve_gitlink_ref_recursive (name, pathlen, p, result, recursion+1 ); +return resolve_dirlink_ref_recursive (name, pathlen, p, result, recursion+1 ); } -int resolve_gitlink_ref (const char *path,const char *refname,unsigned char *result) +int resolve_dirlink_ref (const char *path,const char *refname,unsigned char *result) {int len =strlen (path), retval;char *gitdir;
@@ -359,7 +359,7 @@ int resolve_gitlink_ref(const char *path, const char *refname, unsigned char *rememcpy (gitdir, path, len);memcpy (gitdir + len,"/.git/" ,7 ); - retval =resolve_gitlink_ref_recursive (gitdir, len+6 , refname, result,0 ); + retval =resolve_dirlink_ref_recursive (gitdir, len+6 , refname, result,0 );free (gitdir);return retval; }
refs.h +2 -2
@@ -60,7 +60,7 @@ extern int check_ref_format(const char *target);/** rename ref, return 0 on success **/ extern int rename_ref (const char *oldref,const char *newref,const char *logmsg); -/** resolve ref in nested "gitlink" repository */ -extern int resolve_gitlink_ref (const char *name,const char *refname,unsigned char *result); +/** resolve ref in nested "dirlink" repository */ +extern int resolve_dirlink_ref (const char *name,const char *refname,unsigned char *result);#endif /* REFS_H */
sha1_file.c +1 -1
@@ -2393,7 +2393,7 @@ int index_path(unsigned char *sha1, const char *path, struct stat *st, int writefree (target);break ;case S_IFDIR : -return resolve_gitlink_ref (path,"HEAD" , sha1); +return resolve_dirlink_ref (path,"HEAD" , sha1);default :return error ("%s: unsupported file type" , path); }
tree.c +1 -1
@@ -141,7 +141,7 @@ struct tree *lookup_tree(const unsigned char *sha1)/* * NOTE! Tree refs to external git repositories -* (ie gitlinks) do not count as real references. +* (ie dirlinks) do not count as real references. * * You don't have to have those repositories * available at all, much less have the objects
Signature · 5 lines
1.5.0.3 -- Martin Waitz
Quoted 8 lines · Junio C Hamano
Quoted 6 lines · Torgil Svensson
Quoted 4 lines · Martin Waitz
Unify naming of plumbing dirlink/gitlink concept:
perl -pi -e 's/dirlink/gitlink/g' -e 's/DIRLNK/GITLINK/g'
---
Quoted 8 lines
Quoted 2 lines
Does this mean that the link doesn't necessarily has to be represented as a directory (even though current code does it) ?
I do not think the patch has that much deep meaning.
Personally I think the patch is similar to renaming "cache" used in the code to "index" --- needless code shuffling that does not buy you anything.
FWIW, I seriously considered making a patch for that several times - but always found something better to do; that is, it is not so big an itch for me to scratch unless I'd be really bored and miss some goot git@ flamewar badly ;-). However, I still think that using "cache" in the code is a mistake - it's confusing and inconsistent.
(BTW, the other thing I hate about the codebase are the filenames. When I want to look at the source of some command, I have to try THREE names:
git-something.<tab> (sh, perl, ...), builtin-something.c and something.c. I wish I could just write git-something.<tab>. :-)
Signature · 4 lines
Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ Ever try. Ever fail. No matter. // Try again. Fail again. Fail better. -- Samuel Beckett