1. 24 11月, 2008 1 次提交
    • R
      add strbuf_expand_dict_cb(), a helper for simple cases · 9b864e73
      René Scharfe 提交于
      The new callback function strbuf_expand_dict_cb() can be used together
      with strbuf_expand() if there is only a small number of placeholders
      for static replacement texts.  It expects its dictionary as an array of
      placeholder+value pairs as context parameter, terminated by an entry
      with the placeholder member set to NULL.
      
      The new helper is intended to aid converting the remaining calls of
      interpolate().  strbuf_expand() is smaller, more flexible and can be
      used to go faster than interpolate(), so it should replace the latter.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9b864e73
  2. 19 11月, 2008 5 次提交
  3. 18 11月, 2008 3 次提交
  4. 17 11月, 2008 12 次提交
  5. 16 11月, 2008 6 次提交
    • J
      Merge branch 'maint' · bf311153
      Junio C Hamano 提交于
      * maint:
        Teach ls-files --with-tree=<tree> to work with options other than -c
        builtin-ls-files.c: coding style fix.
      bf311153
    • J
      Merge branch 'bc/maint-keep-pack' · c9d8563c
      Junio C Hamano 提交于
      * bc/maint-keep-pack:
        repack: only unpack-unreachable if we are deleting redundant packs
      c9d8563c
    • J
      Merge branch 'jk/commit-v-strip' · 47a79253
      Junio C Hamano 提交于
      * jk/commit-v-strip:
        status: show "-v" diff even for initial commit
        wt-status: refactor initial commit printing
        define empty tree sha1 as a macro
      47a79253
    • L
      Fix machine-parseability of 'git log --source' · 8c4021ab
      Linus Torvalds 提交于
      The space between the commit and the source attribute is not easily
      machine-parseable: if we combine --source with --parents and give a SHA1
      as a starting point, it's unnecessarily hard to see where the list of
      parents ends and the source decoration begins.
      
      Example:
      	git show --parents --source $(git rev-list HEAD)
      
      which is admittedly contrived, but can easily happen in scripting.
      
      So use a <tab> instead of a space as the source separator.
      
      The other decorations didn't have this issue, because they were surrounded
      by parenthesis, so it's obvious that they aren't parent SHA1's.
      
      It so happens that _visually_ this makes no difference for "git log
      --source", since "commit <40-char SHA1>" is 47 characters, so both a space
      and a <tab> will end up showing as a single commit. Of course, with
      '--pretty=oneline' or '--parents' or '--abbrev-commit' you'll see the
      difference.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8c4021ab
    • J
      Teach ls-files --with-tree=<tree> to work with options other than -c · 4b4e26d2
      Junio C Hamano 提交于
      Originally --with-tree=<tree> was designed for the sole purpose of
      checking if a given pathspec makes sense as a parameter to git-commit
      using it in conjunction with --error-unmatch.  It had logic to avoid
      showing the same entry (one came from the original index, another from the
      overlayed tree) twice so that it works with -c (i.e. "show-cached"), but
      otherwise it was not designed to work with the flags such as -m, -d, etc.
      
      This teaches the same logic to cover the codepath for -m and -d.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4b4e26d2
    • J
      builtin-ls-files.c: coding style fix. · 07e77e40
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      07e77e40
  6. 15 11月, 2008 7 次提交
  7. 14 11月, 2008 6 次提交
    • M
      git-svn: Update git-svn to use the ability to place temporary files within repository directory · 1b3069a7
      Marten Svanfeldt (dev) 提交于
      This fixes git-svn within msys where Perl will provide temporary files with path
      such as /tmp while the git suit expects native Windows paths.
      Signed-off-by: NMarten Svanfeldt <developer@svanfeldt.com>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      1b3069a7
    • M
      Git.pm: Make _temp_cache use the repository directory · bcdd1b44
      Marten Svanfeldt (dev) 提交于
      Update the usage of File::Temp->tempfile to place the temporary files
      within the repository directory instead of just letting Perl decide what
      directory to use, given there is a repository specified when requesting
      the temporary file.
      
      This is needed to be able to fix git-svn on msys as msysperl generates
      paths with UNIX-style paths (/tmp/xxx) while the git tools expect natvie
      path format (c:/..). The repository dir is stored in native format so by
      using it as the base directory for temporary files we always get a
      usable native full path.
      Signed-off-by: NMarten Svanfeldt <developer@svanfeldt.com>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      bcdd1b44
    • D
      git-svn: proper detection of bare repositories · fe4003f6
      Deskin Miller 提交于
      When in a bare repository (or .git, for that matter), git-svn would fail
      to initialise properly, since git rev-parse --show-cdup would not output
      anything.  However, git rev-parse --show-cdup actually returns an error
      code if it's really not in a git directory.
      
      Fix the issue by checking for an explicit error from git rev-parse, and
      setting $git_dir appropriately if instead it just does not output.
      Signed-off-by: NDeskin Miller <deskinm@umich.edu>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      fe4003f6
    • E
      git-svn: respect i18n.commitencoding config · 16fc08e2
      Eric Wong 提交于
      SVN itself always stores log messages in the repository as
      UTF-8.  git always stores/retrieves everything as raw binary
      data with no transformations whatsoever.
      
      To interact with SVN, we need to encode log messages as UTF-8
      before sending them to SVN, as SVN cannot do it for us.  When
      retrieving log messages from SVN, we also need to (attempt to)
      reencode the UTF-8 log message back to the user-specified commit
      encoding.
      
      Note, handling i18n.logoutputencoding for "git svn log" also
      needs to be done in a future change.
      
      Also, this change only deals with the encoding of commit
      messages and nothing else (path names, blob content, ...).
      
      In-Reply-To: <8b168cfb0810282014r789ac01dnec51824de1078f0@mail.gmail.com>
      James North <tocapicha@gmail.com> wrote:
      > Hi,
      >
      > I'm using git-svn on a system with ISO-8859-1 encoding. The problem is
      > when I try to use "git svn dcommit" to send changes to a remote svn
      > (also ISO-8859-1).
      >
      > Seems like git-svn is sending commit messages with utf-8 (just a
      > guessing...) and they look bad on the remote svn log. E.g. "Ca?\241a
      > de cami?\243n"
      >
      > I have tried using i18n.commitencoding=ISO-8859-1 as suggested by the
      > warning when doing "git svn dcommit" but messages still are sent with
      > wrong encoding.
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      16fc08e2
    • E
      git-svn: don't escape tilde ('~') for http(s) URLs · 6a004d3f
      Eric Wong 提交于
      Thanks to Jose Carlos Garcia Sogo and Björn Steinbrink for the
      bug report.
      
      On 2008.10.18 23:39:19 +0200, Björn Steinbrink wrote:
      > Hi,
      >
      > Jose Carlos Garcia Sogo reported on #git that a git-svn clone of this
      > svn repo fails for him:
      > https://sucs.org/~welshbyte/svn/backuptool/trunk
      >
      > I can reproduce that here with:
      > git-svn version 1.6.0.2.541.g46dc1.dirty (svn 1.5.1)
      >
      > The error message I get is:
      > Apache got a malformed URI: Unusable URI: it does not refer to this
      > repository at /usr/local/libexec/git-core/git-svn line 4057
      >
      > strace revealed that git-svn url-encodes ~ while svn does not do that.
      >
      > For svn we have:
      > write(5, "<S:update-report send-all=\"true\" xmlns:S=\"svn:\">
      > <S:src-path>https://sucs.org/~welshbyte/svn/backuptool/trunk</S:src-path>...
      >
      > While git-svn shows:
      > write(7, "<S:update-report send-all=\"true\" xmlns:S=\"svn:\">
      > <S:src-path>https://sucs.org/%7Ewelshbyte/svn/backuptool/trunk</S:src-path>...
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      6a004d3f
    • J
      Merge git://git.bogomips.org/git-svn · a0d3ab9c
      Junio C Hamano 提交于
      * git://git.bogomips.org/git-svn:
        git-svn: proper detection of bare repositories
        git-svn: respect i18n.commitencoding config
        git-svn: don't escape tilde ('~') for http(s) URLs
      a0d3ab9c