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

Re: Feature request: Add --mtime option to git archive

From
Ddemerphq <demerphq@gmail.com>
Date
Feb 18, 2023, 03:04 UTC
Message-ID
<CANgJU+VaF7-SJgGPqYGEV5VcJd_nTt2SMOQ5u9mNZ_wsArKT6g@mail.gmail.com>
In-Reply-To
<xmqqpma9m4i1.fsf@gitster.g>
On Fri, 17 Feb 2023 at 03:39, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> > I do wonder if people would complain (both with the patch above and with
> > brian's proposal) that the resulting tarballs extract everything with a
> > date in 1970. That's not functionally a problem, but it looks kind of
> > weird in "ls -l".
>
> And owned by root:root ;-)
>
> I am sure people would complain.  What matters is if these
> complaints have merit, and in this case, I doubt it.  I especially
> like your "it has been already changing once per second" reasoning
> for this change.

I don't really get the argument as far as it is presented as a reason /not/ to support a --mtime option as was requested in this thread.

You yourself say "people will complain", and you seem to be planning to just ignore those complaints as lacking merit. I honestly don't understand that, wouldn't it be less noise, less stress, and better "customer service" to let the user choose what constant is in the archive? Then no complaints, and you don't have to explain/argue to/with everybody why their complaint is without merit over and over.

I could understand this position if letting the user set the --mtime implied some harm that must be mitigated, but it seems like an odd choice if there is none. Especially given it would also future proof git against people coming up with a good reason not to use the 0 epoch in the future that you haven't thought of right now. It is not like epoch's and unix time have a totally uncontroversial and stable history. 0 has meant multiple dates over time, and the current definition of 1 Jan 1970, 00:00:00 UTC is problematic as UTC didn't exist until 1972! Given it clearly wouldn't be hard to allow users to select the epoch in these archives then why not do so?

I have seen devs have issues with stuff like this in the past. Unpacking an archive on one machine showing a different date than one another, or other weird artifacts. Mac used to use a different 0 epoch than windows and linux as I recall, etc etc. I dont remember the gory details, but i have definitely seen people gnash their teeth over these kind of decisions before. Why not side-step that if you can and let people choose their own defaults?

Just my $0.02.

cheers, Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
Previous: Jeff KingNext: brian m. carlson
Message 9 of 16 in “Feature request: Add --mtime option to git archive”
  1. Raul E RangelFeb 16, 2023
  2. Jeff KingFeb 16, 2023
  3. Junio C HamanoFeb 16, 2023
  4. Jeff KingFeb 17, 2023
  5. Junio C HamanoFeb 17, 2023
  6. Raul RangelFeb 17, 2023
  7. René ScharfeFeb 17, 2023
  8. Jeff KingFeb 17, 2023
  9. demerphqFeb 18, 2023
  10. brian m. carlsonFeb 18, 2023
  11. archive: add --mtimeRené Scharfe, Feb 18, 2023
  12. Junio C HamanoFeb 18, 2023
  13. René ScharfeFeb 19, 2023
  14. Junio C HamanoFeb 21, 2023
  15. Jeff KingFeb 22, 2023
  16. Junio C HamanoFeb 22, 2023

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.