1. 05 Apr, 2018 1 commit
    • Andreas Heiduk's avatar
      git-svn: search --authors-prog in PATH too · 9c18398f
      Andreas Heiduk authored
      In 36db1edd ("git-svn: add --authors-prog option", 2009-05-14) the path
      to authors-prog was made absolute because git-svn changes the current
      directory in some situations. This makes sense if the program is part of
      the repository but prevents searching via $PATH.
      
      The old behaviour is still retained, but if the file does not exists, then
      authors-prog is searched for in $PATH as any other command.
      Signed-off-by: default avatarAndreas Heiduk <asheiduk@gmail.com>
      Signed-off-by: default avatarEric Wong <e@80x24.org>
      9c18398f
  2. 30 Jan, 2018 1 commit
  3. 14 Dec, 2017 1 commit
  4. 17 Sep, 2017 1 commit
  5. 07 Mar, 2017 1 commit
  6. 14 Oct, 2016 2 commits
    • Eric Wong's avatar
      git-svn: "git worktree" awareness · 112423eb
      Eric Wong authored
      git-svn internals were previously not aware of repository
      layout differences for users of the "git worktree" command.
      Introduce this awareness by using "git rev-parse --git-path"
      instead of relying on outdated uses of GIT_DIR and friends.
      
      Thanks-to: Duy Nguyen <pclouds@gmail.com>
      Reported-by: default avatarMathieu Arnold <mat@freebsd.org>
      Signed-off-by: default avatarEric Wong <e@80x24.org>
      112423eb
    • Eric Wong's avatar
      git-svn: reduce scope of input record separator change · b26098fc
      Eric Wong authored
      Reducing the scope of where we change the record separator ($/)
      avoids bugs in calls which rely on the input record separator
      further down, such as the 'chomp' usage in command_oneline.
      
      This is necessary for a future change to git-svn, but exists in
      Git.pm since it seems useful for gitweb and our other Perl
      scripts, too.
      Signed-off-by: default avatarEric Wong <e@80x24.org>
      b26098fc
  7. 22 Jul, 2016 1 commit
    • Eric Wong's avatar
      git-svn: allow --version to work anywhere · c0071ae5
      Eric Wong authored
      Checking the version of the installed SVN libraries should not
      require a git repository at all.  This matches the behavior of
      "git --version".
      
      Add a test for "git svn help" for the same behavior while we're
      at it, too.
      Signed-off-by: default avatarEric Wong <e@80x24.org>
      c0071ae5
  8. 03 Jul, 2016 1 commit
  9. 16 Mar, 2016 1 commit
  10. 10 Sep, 2015 1 commit
    • Michael J Gruber's avatar
      git-svn: parse authors file more leniently · f7c6de0e
      Michael J Gruber authored
      Currently, git-svn parses an authors file using the perl regex
      
      /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/
      
      in order to extract svn user name, real name and e-mail.
      This does not match an empty e-mail field like "<>". On the other hand,
      the output of an authors-prog is parsed with the perl regex
      
      /^\s*(.+?)\s*<(.*)>\s*$/
      
      in order to extract real name and e-mail.
      
      So, specifying a trivial file grep such as
      
      grep "$1" /tmp/authors | head -n 1 | cut -d'=' -f2 | cut -c'2-'
      
      as the authors prog gives different results compared to specifying
      /tmp/authors as the authors file directly.
      
      Instead, make git svn uses the perl regex
      
      /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.*)>\s*$/
      
      for parsing the authors file so that the same (slightly more lenient)
      regex is used in both cases.
      Reported-by: default avatarTill Schäfer <till2.schaefer@tu-dortmund.de>
      Signed-off-by: default avatarMichael J Gruber <git@drmicha.warpmail.net>
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      f7c6de0e
  11. 26 Feb, 2015 1 commit
    • Eric Wong's avatar
      git-svn: lazy load some modules · 47092c10
      Eric Wong authored
      We can delay loading some modules until we need them for uncommon
      code paths.  For example, persistent memoization is not often
      needed, so we can avoid loading the modules for it until we
      encounter svn::mergeinfo during fetch.
      
      This gives a tiny reduction in syscalls (from 15641 to 15305) when
      running "git svn info" and counting via "strace -fc".  Further,
      more invasive work will be needed to noticeably improve performance.
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      47092c10
  12. 15 Jan, 2015 1 commit
  13. 09 Dec, 2014 1 commit
  14. 14 Sep, 2014 4 commits
    • Eric Wong's avatar
      git-svn: delay term initialization · 30d45f79
      Eric Wong authored
      On my Debian 7 system, this fixes annoying warnings when the output
      of "git svn" commands are redirected:
      
          Unable to get Terminal Size. The TIOCGWINSZ ioctl didn't work.
          The COLUMNS and LINES environment variables didn't work. The
          resize program didn't work.
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      30d45f79
    • Eric Wong's avatar
      git svn: find-rev allows short switches for near matches · a831a3fd
      Eric Wong authored
      Allow -B and -A to act as short aliases for --before and --after
      options respectively.  This reduces typing and hopefully allows
      reuse of muscle memory for grep(1) users.
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      a831a3fd
    • Eric Wong's avatar
      git svn: info: correctly handle absolute path args · 4950eed5
      Eric Wong authored
      Calling "git svn info $(pwd)" would hit:
        "Reading from filehandle failed at ..."
      errors due to improper prefixing and canonicalization.
      
      Strip the toplevel path from absolute filesystem paths to ensure
      downstream canonicalization routines are only exposed to paths
      tracked in git (or SVN).
      
      v2:
        Thanks to Andrej Manduch for originally noticing the issue
        and fixing my original version of this to handle
        more corner cases such as "/path/to/top/../top" and
        "/path/to/top/../top/file" as shown in the new test cases.
      
      v3:
        Fix pathname portability problems pointed out by Johannes Sixt
        with a hint from brian m. carlson.
      
      Cc: Johannes Sixt <j6t@kdbg.org>
      Cc: "brian m. carlson" <sandals@crustytoothpaste.net>
      Signed-off-by: default avatarAndrej Manduch <amanduch@gmail.com>
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      4950eed5
    • Monard Vong's avatar
      git-svn: branch: avoid systematic prompt for cert/pass · 785a1c82
      Monard Vong authored
      Commands such as "git svn init/fetch/dcommit" do not prompt for client
      certificate/password if they are stored in SVN config file.  Make
      "git svn branch" consistent with the other commands, as SVN::Client is
      capable of building its own authentication baton from information in the
      SVN config directory.
      Signed-off-by: default avatarMonard Vong <travelingsoul86@gmail.com>
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      785a1c82
  15. 19 Apr, 2014 1 commit
    • Johan Herland's avatar
      Git 2.0: git svn: Set default --prefix='origin/' if --prefix is not given · fe191fca
      Johan Herland authored
      git-svn by default puts its Subversion-tracking refs directly in
      refs/remotes/*. This runs counter to Git's convention of using
      refs/remotes/$remote/* for storing remote-tracking branches.
      
      Furthermore, combining git-svn with regular git remotes run the risk of
      clobbering refs under refs/remotes (e.g. if you have a git remote
      called "tags" with a "v1" branch, it will overlap with the git-svn's
      tracking branch for the "v1" tag from Subversion.
      
      Even though the git-svn refs stored in refs/remotes/* are not "proper"
      remote-tracking branches (since they are not covered by a proper git
      remote's refspec), they clearly represent a similar concept, and would
      benefit from following the same convention.
      
      For example, if git-svn tracks Subversion branch "foo" at
      refs/remotes/foo, and you create a local branch refs/heads/foo to add
      some commits to be pushed back to Subversion (using "git svn dcommit),
      then it is clearly unhelpful of Git to throw
      
        warning: refname 'foo' is ambiguous.
      
      every time you checkout, rebase, or otherwise interact with the branch.
      
      The existing workaround for this is to supply the --prefix=quux/ to
      git svn init/clone, so that git-svn's tracking branches end up in
      refs/remotes/quux/* instead of refs/remotes/*. However, encouraging
      users to specify --prefix to work around a design flaw in git-svn is
      suboptimal, and not a long term solution to the problem. Instead,
      git-svn should default to use a non-empty prefix that saves
      unsuspecting users from the inconveniences described above.
      
      This patch will only affect newly created git-svn setups, as the
      --prefix option only applies to git svn init (and git svn clone).
      Existing git-svn setups will continue with their existing (lack of)
      prefix. Also, if anyone somehow prefers git-svn's old layout, they
      can recreate that by explicitly passing an empty prefix (--prefix "")
      on the git svn init/clone command line.
      
      The patch changes the default value for --prefix from "" to "origin/",
      updates the git-svn manual page, and fixes the fallout in the git-svn
      testcases.
      
      (Note that this patch might be easier to review using the --word-diff
      and --word-diff-regex=. diff options.)
      
      [ew: squashed description of <= 1.9 behavior into manpage]
      Suggested-by: Thomas Ferris Nicolaisen's avatarThomas Ferris Nicolaisen <tfnico@gmail.com>
      Signed-off-by: default avatarJohan Herland <johan@herland.net>
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      fe191fca
  16. 12 Oct, 2013 1 commit
  17. 10 Oct, 2013 1 commit
  18. 19 Jun, 2013 1 commit
  19. 12 Jun, 2013 1 commit
  20. 20 May, 2013 1 commit
  21. 09 May, 2013 2 commits
  22. 25 Feb, 2013 1 commit
  23. 24 Feb, 2013 1 commit
  24. 24 Jan, 2013 1 commit
  25. 17 Jan, 2013 1 commit
    • John Keeping's avatar
      git-svn: teach find-rev to find near matches · 2934a484
      John Keeping authored
      When a single SVN repository is split into multiple Git repositories
      many SVN revisions will exist in only one of the Git repositories
      created.  For some projects the only way to build a working artifact is
      to check out corresponding versions of various repositories, with no
      indication of what those are in the Git world - in the SVN world the
      revision numbers are sufficient.
      
      By adding "--before" to "git-svn find-rev" we can say "tell me what this
      repository looked like when that other repository looked like this":
      
          git svn find-rev --before \
              r$(git --git-dir=/over/there.git svn find-rev HEAD)
      Signed-off-by: John Keeping's avatarJohn Keeping <john@keeping.me.uk>
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      2934a484
  26. 05 Oct, 2012 1 commit
  27. 10 Aug, 2012 1 commit
    • Robert Luberda's avatar
      git svn: handle errors and concurrent commits in dcommit · e48fb750
      Robert Luberda authored
      dcommit didn't handle errors returned by SVN and coped very
      poorly with concurrent commits that appear in SVN repository
      while dcommit was running. In both cases it left git repository
      in inconsistent state: index (which was reset with `git reset
      --mixed' after a successful commit to SVN) no longer matched the
      checkouted tree, when the following commit failed or needed to be
      rebased. See http://bugs.debian.org/676904 for examples.
      
      This patch fixes the issues by:
      - introducing error handler for dcommit. The handler will try
        to rebase or reset working tree before returning error to the
        end user. dcommit_rebase function was extracted out of cmd_dcommit
        to ensure consistency between cmd_dcommit and the error handler.
      - calling `git reset --mixed' only once after all patches are
        successfully committed to SVN. This ensures index is not touched
        for most of the time of dcommit run.
      Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      e48fb750
  28. 02 Aug, 2012 8 commits