1. 24 Sep, 2012 1 commit
    • René Scharfe's avatar
      archive-zip: write extended timestamp · 227bf598
      René Scharfe authored
      File modification times in ZIP files are encoded in DOS format: local
      time with a granularity of two seconds.  Add an extra field to all
      archive entries to also record the mtime in Unix' fashion, as UTC with
      a granularity of one second.
      
      This has the desirable side-effect of convincing Info-ZIP unzip 6.00
      to respect general purpose flag 11, which is used to indicate that a
      file name is encoded in UTF-8.  Any extra field would do, actually,
      but the extended timestamp is a reasonably small one (22 bytes per
      entry).  Archives created by Info-ZIP zip 3.0 contain it, too (but
      with ctime and atime as well).
      Signed-off-by: default avatarRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      227bf598
  2. 18 Sep, 2012 2 commits
  3. 04 Sep, 2012 1 commit
    • René Scharfe's avatar
      archive-zip: support UTF-8 paths · 2162bd8c
      René Scharfe authored
      Set general purpose flag 11 if we encounter a path that contains
      non-ASCII characters.  We assume that all paths are given as UTF-8; no
      conversion is done.
      
      The flag seems to be ignored by unzip unless we also mark the archive
      entry as coming from a Unix system.  This is done by setting the field
      creator_version ("version made by" in the standard[1]) to 0x03NN.
      
      The NN part represents the version of the standard supported by us, and
      this patch sets it to 3f (for version 6.3) for Unix paths.  We keep
      creator_version set to 0 (FAT filesystem, standard version 0) in the
      non-special cases, as before.
      
      But when we declare a file to have a Unix path, then we have to set the
      file mode as well, or unzip will extract the files with the permission
      set 0000, i.e. inaccessible by all.
      
      [1] http://www.pkware.com/documents/casestudies/APPNOTE.TXTSigned-off-by: default avatarRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      2162bd8c
  4. 24 Aug, 2012 12 commits
  5. 22 Aug, 2012 1 commit
  6. 17 Aug, 2012 2 commits
  7. 15 Aug, 2012 5 commits
  8. 07 Aug, 2012 2 commits
    • Ben Walton's avatar
      Enable HAVE_DEV_TTY for Solaris · 436783c9
      Ben Walton authored
      Now that git_terminal_prompt can cleanly interact with /dev/tty on
      Solaris, enable HAVE_DEV_TTY so that this code path is used for
      credential reading instead of relying on the crippled getpass().
      Signed-off-by: default avatarBen Walton <bwalton@artsci.utoronto.ca>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      436783c9
    • Jeff King's avatar
      terminal: seek when switching between reading and writing · 67ba123f
      Jeff King authored
      When a stdio stream is opened in update mode (e.g., "w+"),
      the C standard forbids switching between reading or writing
      without an intervening positioning function. Many
      implementations are lenient about this, but Solaris libc
      will flush the recently-read contents to the output buffer.
      In this instance, that meant writing the non-echoed password
      that the user just typed to the terminal.
      
      Fix it by inserting a no-op fseek between the read and
      write.
      
      The opposite direction (writing followed by reading) is also
      disallowed, but our intervening fflush is an acceptable
      positioning function for that alternative.
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      67ba123f
  9. 06 Aug, 2012 13 commits
  10. 04 Aug, 2012 1 commit
    • Michał Kiedrowicz's avatar
      tests: Introduce test_seq · d17cf5f3
      Michał Kiedrowicz authored
      Jeff King wrote:
      
      	The seq command is GNU-ism, and is missing at least in older BSD
      	releases and their derivatives, not to mention antique
      	commercial Unixes.
      
      	We already purged it in b3431bc6 (Don't use seq in tests, not
      	everyone has it, 2007-05-02), but a few new instances have crept
      	in. They went unnoticed because they are in scripts that are not
      	run by default.
      
      Replace them with test_seq that is implemented with a Perl snippet
      (proposed by Jeff).  This is better than inlining this snippet
      everywhere it's needed because it's easier to read and it's easier
      to change the implementation (e.g. to C) if we ever decide to remove
      Perl from the test suite.
      
      Note that test_seq is not a complete replacement for seq(1).  It
      just has what we need now, in addition that it makes it possible for
      us to do something like "test_seq a m" if we wanted to in the
      future.
      
      There are also many places that do `for i in 1 2 3 ...` but I'm not sure
      if it's worth converting them to test_seq.  That would introduce running
      more processes of Perl.
      Signed-off-by: default avatarMichał Kiedrowicz <michal.kiedrowicz@gmail.com>
      Acked-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      d17cf5f3