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

Re: git log --follow for directories

From
Laszlo Papp <lpapp@kde.org>
Date
May 20, 2015, 09:20 UTC
Message-ID
<loom.20150520T111434-930@post.gmane.org>
In-Reply-To
<xmqqsias8rvy.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster <at> pobox.com> writes:
Show 11 quoted lines
> 
> Laszlo Papp <lpapp <at> kde.org> writes:
> 
> > Is there any benefit about having it like it is today or is it just
> > the usual "no one has implemented it yet"?
> 
> It actually is even more sketchy than that.  A single file following
> was done merely as a checkbox item that works majority of the time,
> and any mergy history that renames the file on one side of the side
> branch but not on the other may not truly follow it.
> 
Well, in worst case, why not have something like --follow-dirs, then?

The case at hand is that we unfortunately named a directory based on the codename of some software for the time.

Now, we have improved that software and the codename is different accordingly. Now, instead of "pastcodename", I would change the directory name to "src" to be future proof, but here, I face these difficulties:

1) The directory name is stuck with some ancient codename and it therefore
will be confusing for the rest of the life cycle for this project.
2) We get unfollowable directories. At best, we could use some scripts to
work this around, but why not address this directly in git?

I think renaming a directory without losing the history would be really cool to have, one way or another. If that requires a separate option, I am happy with that, but what I would really like to avoid is not being able to rename directories without losing the history.

Note that I am speaking from user point of view. I do not know the nitty-gritty technical details, but that is just implementation details as far as I am concerned, anyway.

Previous: Junio C HamanoNext: Jeff King
Message 3 of 4 in “git log --follow for directories”
  1. Laszlo PappMay 19, 2015
  2. Junio C HamanoMay 19, 2015
  3. Laszlo PappMay 20, 2015
  4. Jeff KingMay 19, 2015

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.