{"thread":{"id":"6561","subject":"What's cooking in git.git (topics)","startedAt":"2007-01-27T08:29:18Z","lastAt":"2007-01-29T04:41:05Z","messageCount":7,"participants":["Junio C Hamano","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"32812","messageId":"7vps90lvoh.fsf@assigned-by-dhcp.cox.net","threadId":"6561","inReplyTo":null,"subject":"What's cooking in git.git (topics)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-27T08:29:18Z","receivedAt":"2007-01-27T08:29:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here are the topics that have been cooking.  Commits prefixed\nwith '-' are only in 'pu' while commits prefixed with '+' are\nin 'next'.  The topics list the commits in reverse chronological\norder.\n\n* sp/describe (Sat Jan 27 01:54:21 2007 -0500) 3 commits\n - Compute accurate distances in git-describe before output.\n - Update describe documentation.\n - Teach git-describe to display distances from tags.\n\nMeant for 1.5.0, but I haven't reviewed the code fully yet, so\nit is parked in 'pu' for now.\n\n* np/dreflog (Fri Jan 26 17:26:11 2007 -0500) 8 commits\n - add reflog when moving HEAD to a new branch\n - create_symref(): do not assume pathname from git_path() persists\n   long enough\n - add logref support to git-symbolic-ref\n - move create_symref() past log_ref_write()\n - add reflog entries for HEAD when detached\n - enable separate reflog for HEAD\n - lock_ref_sha1_basic(): remember the original name of a ref when\n   resolving it\n - make reflog filename independent from struct ref_lock\n\nPerhaps 1.5.0 material, but I do not think anybody in the\ncurrent code pays attention to reflog for HEAD (\"HEAD@{....}\"\nsyntax and log or show-branch with -g option would look at the\nunderlying ref and prune and friends do not protect its\nentries), so merge it post 1.5.0 after these issues are fixed.\n\n* jc/fetch (Tue Jan 16 13:43:28 2007 -0800) 5 commits\n - git-fetch: rewrite expand_ref_wildcard in C\n - git-fetch: rewrite another shell loop in C\n - git-fetch: move more code into C.\n - git-fetch--tool: start rewriting parts of git-fetch in C.\n - git-fetch: split fetch_main into fetch_dumb and fetch_native\n\nThis is an early attempt to make \"fetch between repositories\nwith thousand refs\" go faster, and it seems to work as\nadvertised.  Backburnered as I do not personally have need for\nit and haven't heard much feedback on it.\n\n* jc/diff-apply-patch (Fri Sep 22 16:17:58 2006 -0700) 1 commit\n + git-diff/git-apply: make diff output a bit friendlier to GNU patch\n   (part 2)\n\nI kept saying this will wait until February, 6 months after its\ncounterpart, \"part 1\", was merged.  That time is just around the\ncorner and it is becoming tempting to have it in 1.5.0.\n\n* js/reverse (Sat Jan 20 23:04:02 2007 +0100) 1 commit\n + Teach revision machinery about --reverse\n* jc/merge-base (Tue Jan 9 02:23:42 2007 -0800) 6 commits\n - Teach \"git-merge-base --check-ancestry\" about refs.\n - git-merge-base: --check-ancestry option\n + in_merge_bases(): optimization\n + merge_base(): move traversal into a separate function.\n + Allow in_merge_bases() to take more than one reference commits.\n + Make merge-base a built-in.\n* sp/merge (Thu Dec 28 02:35:17 2006 -0500) 1 commit\n - Avoid git-fetch in `git-pull .` when possible.\n* jc/diff (Mon Dec 25 01:08:50 2006 -0800) 2 commits\n - test-para: combined diff between HEAD, index and working tree.\n - para-walk: walk n trees, index and working tree in parallel\n* jc/explain (Mon Dec 4 19:35:04 2006 -0800) 1 commit\n - git-explain\n* jc/3way (Wed Nov 29 18:53:13 2006 -0800) 1 commit\n + git-merge: preserve and merge local changes when doing fast\n   forward\n* jc/web (Wed Nov 8 14:54:09 2006 -0800) 1 commit\n - gitweb: steal loadavg throttle from kernel.org\n* jc/pickaxe (Sun Nov 5 11:52:43 2006 -0800) 1 commit\n - blame: --show-stats for easier optimization work.\n\nWill rehash post 1.5.0\n"},{"id":"32869","messageId":"Pine.LNX.4.64.0701271415280.3021@xanadu.home","threadId":"6561","inReplyTo":"7vps90lvoh.fsf@assigned-by-dhcp.cox.net","subject":"Re: What's cooking in git.git (topics)","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-01-27T19:23:31Z","receivedAt":"2007-01-27T19:23:31Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 27 Jan 2007, Junio C Hamano wrote:\n\n> * np/dreflog (Fri Jan 26 17:26:11 2007 -0500) 8 commits\n>  - add reflog when moving HEAD to a new branch\n>  - create_symref(): do not assume pathname from git_path() persists\n>    long enough\n>  - add logref support to git-symbolic-ref\n>  - move create_symref() past log_ref_write()\n>  - add reflog entries for HEAD when detached\n>  - enable separate reflog for HEAD\n>  - lock_ref_sha1_basic(): remember the original name of a ref when\n>    resolving it\n>  - make reflog filename independent from struct ref_lock\n> \n> Perhaps 1.5.0 material, but I do not think anybody in the\n> current code pays attention to reflog for HEAD (\"HEAD@{....}\"\n> syntax and log or show-branch with -g option would look at the\n> underlying ref and prune and friends do not protect its\n> entries), so merge it post 1.5.0 after these issues are fixed.\n\nI might be partial of course, but I think it is preferable to merge it \nbefore 1.5.0 since this causes a behavior change.  Currently HEAD@{n} \ninherits the reflog of the branch HEAD is currently on.  With this patch \nserie HEAD@{n} is the true reflog for HEAD regardless of where it is now \nand where it has been independently of the current branch.  Of course I \nconsider the later behavior to be more sensible and it might be a good \nidea to give it to 1.5.0 users at the same time as the detached head \nsupport rather than creating a behavior change later on when reflogs are \nmore popular.\n\nI'll look at prune and friend for teaching them about the new reflog \nentries.\n\n\nNicolas\n"},{"id":"32883","messageId":"7vhcuci0z0.fsf@assigned-by-dhcp.cox.net","threadId":"6561","inReplyTo":"Pine.LNX.4.64.0701271415280.3021@xanadu.home","subject":"Re: What's cooking in git.git (topics)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-27T22:00:51Z","receivedAt":"2007-01-27T22:00:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nicolas Pitre <nico@cam.org> writes:\n\n> On Sat, 27 Jan 2007, Junio C Hamano wrote:\n>\n>> * np/dreflog (Fri Jan 26 17:26:11 2007 -0500) 8 commits\n>\n> I might be partial of course, but I think it is preferable to merge it \n> before 1.5.0 since this causes a behavior change.  Currently HEAD@{n} \n> inherits the reflog of the branch HEAD is currently on.  With this patch \n> serie HEAD@{n} is the true reflog for HEAD regardless of where it is now \n> and where it has been independently of the current branch.  Of course I \n> consider the later behavior to be more sensible and it might be a good \n> idea to give it to 1.5.0 users at the same time as the detached head \n> support rather than creating a behavior change later on when reflogs are \n> more popular.\n\nMy understanding of the situation after your patch (disregarding\nthe problem that prune and friends may happily break the logs\nfor detached HEAD), is that if you say \"git show HEAD@{...}\",\nwhile on a branch, it looks at the log of the current branch but\nwhile on a detached HEAD it shows the log from .git/logs/HEAD.\nI have a feeling that this would be confusing.  Ideally, while\non a branch, say 'master', these two should behave differently:\n\n\t$ git show 'master@{5.minutes.ago}'\n        $ git show 'HEAD@{5.minutes.ago}'\n\nThe former talks only about where the tip of that particular\nbranch were while the latter also should tell you on which\nbranch you were on.\n\nBut then that raises two new problems:\n\n - We always said: 'HEAD' means the same thing as your current branch.\n   This is not true anymore.\n\n - You do not record which branch you were on in the log for\n   HEAD itself (it is merely a dup), so while the latter would\n   report which commit you were at, you cannot tell which branch\n   you were on (or if your head was detached).\n\nWhile I am sure that prune problem is solvable, I have a feeling\nthat it would take some time to iron out the semantic issues\nlike the above (and I suspect there might be even more).\n"},{"id":"32894","messageId":"Pine.LNX.4.64.0701272049480.3021@xanadu.home","threadId":"6561","inReplyTo":"7vhcuci0z0.fsf@assigned-by-dhcp.cox.net","subject":"Re: What's cooking in git.git (topics)","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-01-28T02:51:34Z","receivedAt":"2007-01-28T02:51:34Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 27 Jan 2007, Junio C Hamano wrote:\n\n> My understanding of the situation after your patch (disregarding\n> the problem that prune and friends may happily break the logs\n> for detached HEAD), is that if you say \"git show HEAD@{...}\",\n> while on a branch, it looks at the log of the current branch but\n> while on a detached HEAD it shows the log from .git/logs/HEAD.\n> I have a feeling that this would be confusing.  \n\nIt would indeed.  But that's not exactly what's happening.\n\n> Ideally, while\n> on a branch, say 'master', these two should behave differently:\n> \n> \t$ git show 'master@{5.minutes.ago}'\n>         $ git show 'HEAD@{5.minutes.ago}'\n> \n> The former talks only about where the tip of that particular\n> branch were while the latter also should tell you on which\n> branch you were on.\n\nExactly!\n\nTry this script:\n\ngit init\necho 1 > foo\ngit add foo\ngit commit -m 1\necho 2 > foo\ngit add foo\ngit commit -m 2\necho 3 > foo\ngit add foo\ngit commit -m 3\ngit checkout -b otherbranch\necho 4 > foo\ngit add foo\ngit commit -m 4\necho 5 > foo\ngit add foo\ngit commit -m 5\necho 6 > foo\ngit add foo\ngit commit -m 6\ngit checkout master\necho 7 > foo\ngit add foo\ngit commit -m 7\necho 8 > foo\ngit add foo\ngit commit -m 8\ngit checkout otherbranch\ngit checkout master\n\nThen you should get the following results:\n\n$ git log -g --pretty=oneline master\n58cc540d459fc0c796c2eef796b84cb003ebbf3e master@{0}: 8\nb68b1cd29ad2d6157174338a3e9f871c59b5aedd master@{1}: 7\n9dfb1ec50c44d0057981cccda90ee29c644ae336 master@{2}: 3\n014bdcf6604056e1cda8b6d8d88d6c846db73826 master@{3}: 2\n007ed39dd47696c4ab8e8ccdfcb536b8e21ec8e7 master@{4}: 1\n\n$ git log -g --pretty=oneline otherbranch\n2483023022b3167343670b209a5d98e4f192430a otherbranch@{0}: 6\n3ae298d1b258c24dd2180de9b6cdb93148399920 otherbranch@{1}: 5\nca18ea0eb4e1aabde80add1761f74da9136c59ec otherbranch@{2}: 4\n9dfb1ec50c44d0057981cccda90ee29c644ae336 otherbranch@{3}: 3\n\nAnd finally:\n\n$ git log -g --pretty=oneline HEAD\n58cc540d459fc0c796c2eef796b84cb003ebbf3e HEAD@{0}: 8\nb68b1cd29ad2d6157174338a3e9f871c59b5aedd HEAD@{1}: 7\n9dfb1ec50c44d0057981cccda90ee29c644ae336 HEAD@{2}: 3\n3ae298d1b258c24dd2180de9b6cdb93148399920 HEAD@{3}: 5\nca18ea0eb4e1aabde80add1761f74da9136c59ec HEAD@{4}: 4\n9dfb1ec50c44d0057981cccda90ee29c644ae336 HEAD@{5}: 3\n014bdcf6604056e1cda8b6d8d88d6c846db73826 HEAD@{6}: 2\n007ed39dd47696c4ab8e8ccdfcb536b8e21ec8e7 HEAD@{7}: 1\n\nOK there is kind of a screw-up with HEAD@{2} since it should have shown \n\"6\", and I think it should have shown the movement between branches as \nwell, but clearly the output for HEAD doesn't depend on the current \nbranch already.\n\n> But then that raises two new problems:\n> \n>  - We always said: 'HEAD' means the same thing as your current branch.\n>    This is not true anymore.\n\nI think reflogs are a different concept from branch history and that we \nshould make sure this is well understood.  And since we seem to agree on \nwhat the ideal behavior should be I think this has to go in before \n1.5.0 in order to avoid changing this behavior later when more people \nare accustomed to reflogs.\n\n>  - You do not record which branch you were on in the log for\n>    HEAD itself (it is merely a dup), so while the latter would\n>    report which commit you were at, you cannot tell which branch\n>    you were on (or if your head was detached).\n\nWell, it _is_ recorded:\n\n$ sed 's/.*\\t//' < .git/logs/HEAD\ncommit (initial): 1\ncommit: 2\ncommit: 3\ncheckout: moving to otherbranch\ncommit: 4\ncommit: 5\ncommit: 6\ncheckout: moving to master\ncommit: 7\ncommit: 8\ncheckout: moving to otherbranch\ncheckout: moving to master\n\n> While I am sure that prune problem is solvable, I have a feeling\n> that it would take some time to iron out the semantic issues\n> like the above (and I suspect there might be even more).\n\nI think that the problem with HEAD@{n} is that it doesn't take all \nentries into account.  For example the log output skips over the \"moving \nto\" entries.  If that can be fixed then the difference in semantic \nbetween git-log HEAD and git-log -g HEAD should be obvious enough simply \nlooking at the reflog message lines.\n\nThe --pretty=oneline output when using -g should probably display the \nreflog message instead of the commit message as well.\n\n\nNicolas\n"},{"id":"32898","messageId":"Pine.LNX.4.64.0701272235190.3021@xanadu.home","threadId":"6561","inReplyTo":"Pine.LNX.4.64.0701272049480.3021@xanadu.home","subject":"[PATCH] git-log -g --pretty=oneline should display the reflog message","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-01-28T03:40:36Z","receivedAt":"2007-01-28T03:40:36Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"In the context of reflog output the reflog message is more useful than \nthe commit message's first line.  When relevant the reflog message \nwill contain \nthat line anyway.\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n\n---\n\nOn Sat, 27 Jan 2007, Nicolas Pitre wrote:\n\n> The --pretty=oneline output when using -g should probably display the \n> reflog message instead of the commit message as well.\n\nAnd this patch does just that.\n\ndiff --git a/log-tree.c b/log-tree.c\nindex c0fa096..d8ca36b 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -224,9 +224,14 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\tprintf(\"%s\",\n \t\t       diff_get_color(opt->diffopt.color_diff, DIFF_RESET));\n \t\tputchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\\n');\n-\t\tif (opt->reflog_info)\n+\t\tif (opt->reflog_info) {\n \t\t\tshow_reflog_message(opt->reflog_info,\n \t\t\t\t    opt->commit_format == CMIT_FMT_ONELINE);;\n+\t\t\tif (opt->commit_format == CMIT_FMT_ONELINE) {\n+\t\t\t\tprintf(\"%s\", sep);\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t}\n \t}\n \n \t/*\ndiff --git a/reflog-walk.c b/reflog-walk.c\nindex 8e2cd2f..8262160 100644\n--- a/reflog-walk.c\n+++ b/reflog-walk.c\n@@ -233,7 +233,7 @@ void show_reflog_message(struct reflog_walk_info* info, int oneline)\n \t\t\telse\n \t\t\t\tprintf(\"%d\", commit_reflog->reflogs->nr\n \t\t\t\t       - 2 - commit_reflog->recno);\n-\t\t\tprintf(\"}: \");\n+\t\t\tprintf(\"}: %s\", info->message);\n \t\t}\n \t\telse {\n \t\t\tprintf(\"Reflog: %s@{\", commit_reflog->reflogs->ref);\n"},{"id":"32904","messageId":"7v7iv7h7v8.fsf@assigned-by-dhcp.cox.net","threadId":"6561","inReplyTo":"Pine.LNX.4.64.0701272049480.3021@xanadu.home","subject":"Re: What's cooking in git.git (topics)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-28T08:29:31Z","receivedAt":"2007-01-28T08:29:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nicolas Pitre <nico@cam.org> writes:\n\n> Well, it _is_ recorded:\n\nIt is recorded but not in a readily accessible way.  You have to\nscan it.\n\nI think the --pretty=oneline change to the git-log walker you\ndid would help it somewhat.\n\nBy the way, I think there is something wrong for an anonymous\nuser when coming back from detached HEAD to an existing branch.\n\nAn user 'u' (who has empty Gecos) on machine 'git.ster' did:\n\n\t$ git checkout master^\n        $ git checkout -f master\n\nand got these two entries:\n\n9414... f491... u <u@git.ster> 1169971276 -0800 checkout: moving to master^\nf491... 9414... u <>        checkout: moving to master\n\nThe latter entry is corrupt; adding setup_ident() before\ngit_config() in builtin-symbolic-ref.c would fix it.\n\ndiff --git a/builtin-symbolic-ref.c b/builtin-symbolic-ref.c\nindex d41b406..c184679 100644\n--- a/builtin-symbolic-ref.c\n+++ b/builtin-symbolic-ref.c\n@@ -27,6 +27,7 @@ int cmd_symbolic_ref(int argc, const char **argv, const char *prefix)\n \tint quiet = 0;\n \tconst char *msg = NULL;\n \n+\tsetup_ident();\n \tgit_config(git_default_config);\n \n \twhile (1 < argc) {\n\nBut now I am thinking maybe we should rearrange things so that\nwe do not have to do setup_ident() in each and every programs.\n\nIt used to be a sensible way because only commit and tag making\nprogram needed to do so, but with reflog leaving the committer\nnames from everywhere, it does not make much sense anymore.\n\n-- >8 --\n[PATCH] don't force everybody to call setup_ident().\n\nBack when only handful commands that created commit and tag were\nthe only users of committer identity information it made sense\nto explicitly calling setup_ident() to pre-fill the default\nvalue from the gecos information.  But it is much simpler for\nprograms to make the call automatic when get_ident() is called.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n ident.c                |   51 ++++++++++++++++++++++++++++++++---------------\n builtin-branch.c       |    1 -\n builtin-commit-tree.c  |    1 -\n builtin-log.c          |    1 -\n builtin-update-ref.c   |    1 -\n cache.h                |    1 -\n fetch-pack.c           |    1 -\n http-fetch.c           |    1 -\n http-push.c            |    1 -\n local-fetch.c          |    1 -\n receive-pack.c         |    1 -\n ssh-fetch.c            |    1 -\n var.c                  |    1 -\n 13 files changed, 35 insertions(+), 28 deletions(-)\n\ndiff --git a/ident.c b/ident.c\nindex f967790..6de7eea 100644\n--- a/ident.c\n+++ b/ident.c\n@@ -43,19 +43,13 @@ static void copy_gecos(struct passwd *w, char *name, int sz)\n \n }\n \n-int setup_ident(void)\n+static void copy_email(struct passwd *pw)\n {\n-\tint len;\n-\tstruct passwd *pw = getpwuid(getuid());\n-\n-\tif (!pw)\n-\t\tdie(\"You don't exist. Go away!\");\n-\n-\t/* Get the name (\"gecos\") */\n-\tcopy_gecos(pw, git_default_name, sizeof(git_default_name));\n-\n-\t/* Make up a fake email address (name + '@' + hostname [+ '.' + domainname]) */\n-\tlen = strlen(pw->pw_name);\n+\t/*\n+\t * Make up a fake email address\n+\t * (name + '@' + hostname [+ '.' + domainname])\n+\t */\n+\tint len = strlen(pw->pw_name);\n \tif (len > sizeof(git_default_email)/2)\n \t\tdie(\"Your sysadmin must hate you!\");\n \tmemcpy(git_default_email, pw->pw_name, len);\n@@ -68,13 +62,37 @@ int setup_ident(void)\n \t\tlen = strlen(git_default_email);\n \t\tgit_default_email[len++] = '.';\n \t\tif (he && (domainname = strchr(he->h_name, '.')))\n-\t\t\tstrlcpy(git_default_email + len, domainname + 1, sizeof(git_default_email) - len);\n+\t\t\tstrlcpy(git_default_email + len, domainname + 1,\n+\t\t\t\tsizeof(git_default_email) - len);\n \t\telse\n-\t\t\tstrlcpy(git_default_email + len, \"(none)\", sizeof(git_default_email) - len);\n+\t\t\tstrlcpy(git_default_email + len, \"(none)\",\n+\t\t\t\tsizeof(git_default_email) - len);\n \t}\n+}\n+\n+static void setup_ident(void)\n+{\n+\tstruct passwd *pw = NULL;\n+\n+\t/* Get the name (\"gecos\") */\n+\tif (!git_default_name[0]) {\n+\t\tpw = getpwuid(getuid());\n+\t\tif (!pw)\n+\t\t\tdie(\"You don't exist. Go away!\");\n+\t\tcopy_gecos(pw, git_default_name, sizeof(git_default_name));\n+\t}\n+\n+\tif (!git_default_email[0]) {\n+\t\tif (!pw)\n+\t\t\tpw = getpwuid(getuid());\n+\t\tif (!pw)\n+\t\t\tdie(\"You don't exist. Go away!\");\n+\t\tcopy_email(pw);\n+\t}\n+\n \t/* And set the default date */\n-\tdatestamp(git_default_date, sizeof(git_default_date));\n-\treturn 0;\n+\tif (!git_default_date[0])\n+\t\tdatestamp(git_default_date, sizeof(git_default_date));\n }\n \n static int add_raw(char *buf, int size, int offset, const char *str)\n@@ -174,6 +192,7 @@ static const char *get_ident(const char *name, const char *email,\n \tchar date[50];\n \tint i;\n \n+\tsetup_ident();\n \tif (!name)\n \t\tname = git_default_name;\n \tif (!email)\ndiff --git a/builtin-branch.c b/builtin-branch.c\nindex b709b2f..869e753 100644\n--- a/builtin-branch.c\n+++ b/builtin-branch.c\n@@ -395,7 +395,6 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \tint kinds = REF_LOCAL_BRANCH;\n \tint i;\n \n-\tsetup_ident();\n \tgit_config(git_branch_config);\n \n \tfor (i = 1; i < argc; i++) {\ndiff --git a/builtin-commit-tree.c b/builtin-commit-tree.c\nindex 0651e59..2a818a0 100644\n--- a/builtin-commit-tree.c\n+++ b/builtin-commit-tree.c\n@@ -94,7 +94,6 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)\n \tunsigned int size;\n \tint encoding_is_utf8;\n \n-\tsetup_ident();\n \tgit_config(git_default_config);\n \n \tif (argc < 2)\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 56acc13..982d871 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -380,7 +380,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \tchar message_id[1024];\n \tchar ref_message_id[1024];\n \n-\tsetup_ident();\n \tgit_config(git_format_config);\n \tinit_revisions(&rev, prefix);\n \trev.commit_format = CMIT_FMT_EMAIL;\ndiff --git a/builtin-symbolic-ref.c b/builtin-symbolic-ref.c\ndiff --git a/builtin-update-ref.c b/builtin-update-ref.c\nindex b34e598..1461937 100644\n--- a/builtin-update-ref.c\n+++ b/builtin-update-ref.c\n@@ -13,7 +13,6 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)\n \tint i, delete;\n \n \tdelete = 0;\n-\tsetup_ident();\n \tgit_config(git_default_config);\n \n \tfor (i = 1; i < argc; i++) {\ndiff --git a/cache.h b/cache.h\nindex 2873f9f..3902a14 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -320,7 +320,6 @@ int parse_date(const char *date, char *buf, int bufsize);\n void datestamp(char *buf, int bufsize);\n unsigned long approxidate(const char *);\n \n-extern int setup_ident(void);\n extern const char *git_author_info(int);\n extern const char *git_committer_info(int);\n \ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex 83a1d7b..c787106 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -670,7 +670,6 @@ int main(int argc, char **argv)\n \tstruct stat st;\n \n \tsetup_git_directory();\n-\tsetup_ident();\n \tgit_config(fetch_pack_config);\n \n \tif (0 <= transfer_unpack_limit)\ndiff --git a/http-fetch.c b/http-fetch.c\nindex 67dfb0a..efd494a 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -1003,7 +1003,6 @@ int main(int argc, const char **argv)\n \tint arg = 1;\n \tint rc = 0;\n \n-\tsetup_ident();\n \tsetup_git_directory();\n \tgit_config(git_default_config);\n \ndiff --git a/http-push.c b/http-push.c\nindex 0a15f53..b128c01 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -2299,7 +2299,6 @@ int main(int argc, char **argv)\n \tstruct ref *ref;\n \n \tsetup_git_directory();\n-\tsetup_ident();\n \n \tremote = xcalloc(sizeof(*remote), 1);\n \ndiff --git a/local-fetch.c b/local-fetch.c\nindex cf99cb7..7cfe8b3 100644\n--- a/local-fetch.c\n+++ b/local-fetch.c\n@@ -210,7 +210,6 @@ int main(int argc, const char **argv)\n \tchar **commit_id;\n \tint arg = 1;\n \n-\tsetup_ident();\n \tsetup_git_directory();\n \tgit_config(git_default_config);\n \ndiff --git a/receive-pack.c b/receive-pack.c\nindex c4a4757..c51f417 100644\n--- a/receive-pack.c\n+++ b/receive-pack.c\n@@ -429,7 +429,6 @@ int main(int argc, char **argv)\n \tif (is_repository_shallow())\n \t\tdie(\"attempt to push into a shallow repository\");\n \n-\tsetup_ident();\n \tgit_config(receive_pack_config);\n \n \tif (0 <= transfer_unpack_limit)\ndiff --git a/ssh-fetch.c b/ssh-fetch.c\nindex 4c172b6..bdf51a7 100644\n--- a/ssh-fetch.c\n+++ b/ssh-fetch.c\n@@ -124,7 +124,6 @@ int main(int argc, char **argv)\n \tprog = getenv(\"GIT_SSH_PUSH\");\n \tif (!prog) prog = \"git-ssh-upload\";\n \n-\tsetup_ident();\n \tsetup_git_directory();\n \tgit_config(git_default_config);\n \ndiff --git a/var.c b/var.c\nindex 39977b9..e585e59 100644\n--- a/var.c\n+++ b/var.c\n@@ -56,7 +56,6 @@ int main(int argc, char **argv)\n \t}\n \n \tsetup_git_directory();\n-\tsetup_ident();\n \tval = NULL;\n \n \tif (strcmp(argv[1], \"-l\") == 0) {\n"},{"id":"32943","messageId":"Pine.LNX.4.64.0701282321390.3021@xanadu.home","threadId":"6561","inReplyTo":"Pine.LNX.4.64.0701272049480.3021@xanadu.home","subject":"Re: What's cooking in git.git (topics)","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-01-29T04:41:05Z","receivedAt":"2007-01-29T04:41:05Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 27 Jan 2007, Nicolas Pitre wrote:\n\n> On Sat, 27 Jan 2007, Junio C Hamano wrote:\n> \n> > My understanding of the situation after your patch (disregarding\n> > the problem that prune and friends may happily break the logs\n> > for detached HEAD), is that if you say \"git show HEAD@{...}\",\n> > while on a branch, it looks at the log of the current branch but\n> > while on a detached HEAD it shows the log from .git/logs/HEAD.\n> > I have a feeling that this would be confusing.  \n> \n> It would indeed.  But that's not exactly what's happening.\n\nWell... It is a mess.  That's not what's happening for git-log \nobviously, but what you describe is indeed the case for git-rev-parse.\n\nThere needs to be a dwim_reflog() function that looks for a matching \nreflog file by itself instead of using dwim_ref() and simply prefixing \nthe resolved ref with \"logs/\".  Unfortunately this tackling of reflog \npath built on top of resolve_ref() seems to be a popular assumption and \nchasing and fixing all those cases properly would require more time than \nI can spare right now.\n\n\nNicolas\n"}]}