Announcement

Collapse
No announcement yet.

Git 2.21 Released With Performance Improvements, Human Date Option

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by emblemparade View Post
    I wish I had a human date option. Robots can't love you back.
    I never effectively observed that women could. Maybe it's one of those things that you have to believe without seeing it yourself.
    At least, robots, unlike women, won't hate you back!

    Comment


    • #12
      I suggest putting readme.txt documenting the purpose of the directory. Then it's not empty.

      Comment


      • #13
        Originally posted by Danny3 View Post
        Git is a "changes tracking software", but still, it is completely blind to some changes.
        Git tracks changes to content. Directories have no content so there is nothing to track.

        Comment


        • #14
          It is too bad Git uses different syntax for different commands when referring to a repository.

          Examples:
          • git://example.com/repository
          • example.com:repository
          • example.com repository

          Veteran Git users from our last post might recall that git branch -l establishes a reflog for a newly created branch, instead of listing all branches. Now, instead of doing something you almost certainly didn’t mean, git branch -l will list all of your repository’s branches, keeping in line with other commands that accept -l.
          Oh this is really nice! 👍
          It makes Git easier to use by being more intuitive and predictable.

          Comment


          • #15
            Originally posted by starshipeleven View Post
            To be fair, VCS software are mostly designed to work on files, usually text files.

            While some like SVN do store empty folders too, other VCS like Mercurial don't detect empty directories either.

            I suggest to not hold your breath and either add the feature yourself or switch to SVN.
            Or stop using git to do rsync's job. This isn't the Unix philosophy

            To be fair, this is only annoying when you lay git on top of a more retarded VCS, like SVN, and other contributors check in empty folders that you can't get rid of.

            Comment


            • #16
              Originally posted by bug77 View Post
              Or stop using git to do rsync's job. This isn't the Unix philosophy
              I assumed he wasn't a total retard and he was using it to version his server setups or something. Something like etckeeper, but on the whole server https://github.com/PKRoma/etckeeper

              Damn does not matter, it still triggers all my "veteran Unix admin" alerts, aka hacking together a solution with scripts and borderline misuse of command line tools.

              Modern and hip admins use docker or somesuch for easily-replicated server setups.

              Comment


              • #17
                Originally posted by Danny3 View Post
                Anyway, with the rest you are right, the software could be more robust, to check everything before it's trying to to an action, but this means more development time, and not always you can afford it. It would've been nice if we could though.
                Checking whether a directory exists before writing to it is not that complex, and can be factored out into a reusable function. It's easy to pull off even in cases where you're really tight on time (unless you've never implemented such functionality before and you're working on a hotfix for something that blew up in production, and every second matters).

                Comment


                • #18
                  Originally posted by randomizer View Post

                  Git tracks changes to content. Directories have no content so there is nothing to track.
                  I know that Git tracks changes to content, but even with that is not good enough.
                  I mean, let's take this example with a two level hierarchy:
                  Level 1 directory
                  - Level 2 directory.
                  Having Git tracking the content of Level 1 directory will miss the fact that there is a directory there, even though "Level 2 directory is actually content for "Level 1 directory". You cannot say that "Level 1 directory" is empty.

                  Comment


                  • #19
                    Originally posted by Danny3 View Post
                    You cannot say that "Level 1 directory" is empty.
                    True, it is not empty, but it is empty as far as Git is concerned. I should have said that Git tracks changes to file contents. It also tracks changes to filesystem paths with tree objects, but only for files (although even this is only done with heuristics based on file contents; a file that is significantly modified and moved will be treated as a delete and add). Directories are added implicitly because of the files they contain, but directories can't be explicitly added to the Git index, which means they can never be added to the repository unless they contain files.
                    Last edited by randomizer; 04-21-2019, 11:11 PM.

                    Comment

                    Working...
                    X