1. 06 2月, 2007 5 次提交
    • S
      Remove --branch-log from fast-import. · 0b868e02
      Shawn O. Pearce 提交于
      The --branch-log option and its associated code hasn't been used in
      several months, as its not really very useful for debugging fast-import
      or a frontend.  I don't plan on supporting it in this state long-term,
      so I'm killing it now before it gets distributed to a wider audience.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      0b868e02
    • S
      Initial draft of fast-import documentation. · 6e411d20
      Shawn O. Pearce 提交于
      This is a first pass at the manpage for git-fast-import.
      
      I have tried to cover the input format in extreme detail, creating a
      reference which is more detailed than the BNF grammar appearing in
      the header of fast-import.c.  I have also covered some details about
      gfi's performance and memory utilization, as well as the average
      learning curve required to create a gfi frontend application (as it
      is far lower than it might appear on first glance).
      
      The documentation still lacks real example input streams, which may
      turn out to be difficult to format in asciidoc due to the blank lines
      which carry meaning within the format.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      6e411d20
    • S
      Don't support shell-quoted refnames in fast-import. · 6c3aac1c
      Shawn O. Pearce 提交于
      The current implementation of shell-style quoted refnames and
      SHA-1 expressions within fast-import contains a bad memory leak.
      We leak the unquoted strings used by the `from` and `merge`
      commands, maybe others.  Its also just muddling up the docs.
      
      Since Git refnames cannot contain LF, and that is our delimiter
      for the end of the refname, and we accept any other character
      as-is, there is no reason for these strings to support quoting,
      except to be nice to frontends.  But frontends shouldn't be
      expecting to use funny refs in Git, and its just as simple to
      never quote them as it is to always pass them through the same
      quoting filter as pathnames.  So frontends should never quote
      refs, or ref expressions.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      6c3aac1c
    • S
      Reduce memory usage of fast-import. · 10831c55
      Shawn O. Pearce 提交于
      Some structs are allocated rather frequently, but were using integer
      types which were far larger than required to actually store their
      full value range.
      
      As packfiles are limited to 4 GiB we don't need more than 32 bits to
      store the offset of an object within that packfile, an `unsigned long`
      on a 64 bit system is likely a 64 bit unsigned value.  Saving 4 bytes
      per object on a 64 bit system can add up fast on any sizable import.
      
      As atom strings are strictly single components in a path name these
      are probably limited to just 255 bytes by the underlying OS.  Going
      to that short of a string is probably too restrictive, but certainly
      `unsigned int` is far too large for their lengths.  `unsigned short`
      is a reasonable limit.
      
      Modes within a tree really only need two bytes to store their whole
      value; using `unsigned int` here is vast overkill.  Saving 4 bytes
      per file entry in an active branch can add up quickly on a project
      with a large number of files.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      10831c55
    • S
      Include checkpoint command in the BNF. · 8c1f22da
      Shawn O. Pearce 提交于
      This command isn't encouraged (as its slow) but it does exist and
      is accepted, so it still should be covered in the BNF.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      8c1f22da
  2. 31 1月, 2007 1 次提交
    • S
      Merge branch 'master' into sp/gfi · 76db9dec
      Shawn O. Pearce 提交于
      git-fast-import requires use of inttypes.h, but the master branch has
      added it to git-compat-util differently than git-fast-import originally
      had used it.  This merge back of master to the fast-import topic is to
      get (and use) inttypes.h the way master is using it.
      
      This is a partially evil merge to remove the call to setup_ident(),
      as the master branch now contains a change which makes this implicit
      and therefore removed the function declaration. (commit 01754769).
      
      Conflicts:
      
      	git-compat-util.h
      76db9dec
  3. 30 1月, 2007 6 次提交
  4. 29 1月, 2007 14 次提交
  5. 28 1月, 2007 9 次提交
    • S
      Compute accurate distances in git-describe before output. · 1b600e65
      Shawn O. Pearce 提交于
      My prior change to git-describe attempts to print the distance
      between the input commit and the best matching tag, but this distance
      was usually only an estimate as we always aborted revision walking
      as soon as we overflowed the configured limit on the number of
      possible tags (as set by --candidates).
      
      Displaying an estimated distance is not very useful and can just be
      downright confusing.  Most users (heck, most Git developers) don't
      immediately understand why this distance differs from the output
      of common tools such as `git rev-list | wc -l`.  Even worse, the
      estimated distance could change in the future (including decreasing
      despite no rebase occuring) if we find more possible tags earlier
      on during traversal.  (This could happen if more tags are merged
      into the branch between queries.)  These factors basically make an
      estimated distance useless.
      
      Fortunately we are usually most of the way through an accurate
      distance computation by the time we abort (due to reaching the
      current --candidates limit).  This means we can simply finish
      counting out the revisions still in our commit queue to present
      the accurate distance at the end.  The number of commits remaining
      in the commit queue is probably less than the number of commits
      already traversed, so finishing out the count is not likely to take
      very long.  This final distance will then always match the output of
      `git rev-list | wc -l`.
      
      We can easily reduce the total number of commits that need to be
      walked at the end by stopping as soon as all of the commits in the
      commit queue are flagged as being merged into the already selected
      best possible tag.  If that's true then there are no remaining
      unseen commits which can contribute to our best possible tag's
      depth counter, so further traversal is useless.
      
      Basic testing on my Mac OS X system shows there is no noticable
      performance difference between this accurate distance counting
      version of git-describe and the prior version of git-describe,
      at least when run on git.git.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1b600e65
    • J
      Update describe documentation. · 1891261e
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1891261e
    • S
      Teach git-describe to display distances from tags. · 237fb6ca
      Shawn O. Pearce 提交于
      If you get two different describes at different
      times from a non-rewinding branch and they both come up with the same
      tag name, you can tell which is the 'newer' one by distance.  This is
      rather common in practice, so its incredibly useful.
      
      [jc: still needs documentation and fixups when traversal gives up
       early.]
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      237fb6ca
    • J
      git-blame --porcelain: quote filename in c-style when needed. · 46e5e69d
      Junio C Hamano 提交于
      Otherwise a pathname that has funny characters such as LF would
      screw up the parsing programs of the output.
      
      Strictly speaking, this is not backward compatible, but the
      current output for pathnames that have embedded LF and such
      cannot be sanely parsed anyway, and pathnames that only use
      characters from the portable pathname character set won't be
      affected.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      46e5e69d
    • L
      git-blame --incremental · 717d1462
      Linus Torvalds 提交于
      This adds --incremental option to help GUI porcelains to show
      the result from git-blame incrementally.  The output gives the
      origin information in the same format as the porcelain format.
      The first line has commit object name, the line number of the
      first line in the group in the original file, the line number of
      that file in the final image, and number of lines in the group.
      Then subsequent lines show the metainformation for the commit
      when the commit is shown for the first time, except the filename
      information is always shown (we cannot even make it conditional
      to -C option as blame always follows the renaming of the file
      wholesale).
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      717d1462
    • J
      Don't force everybody to call setup_ident(). · 01754769
      Junio C Hamano 提交于
      Back when only handful commands that created commit and tag were
      the only users of committer identity information, it made sense
      to explicitly call setup_ident() to pre-fill the default value
      from the gecos information.  But it is much simpler for programs
      to make the call automatic when get_ident() is called these days,
      since many more programs want to use the information when updating
      the reflog.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      01754769
    • N
      git-log -g --pretty=oneline should display the reflog message · 903b45fe
      Nicolas Pitre 提交于
      In the context of reflog output the reflog message is more useful than
      the commit message's first line.  When relevant the reflog message
      will contain that line anyway.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      903b45fe
    • B
      Document --check option to git diff. · 16507fcf
      Bill Lear 提交于
      Signed-off-by: NBill Lear <rael@zopyra.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      16507fcf
    • A
      Allow the tag signing key to be specified in the config file · d67778ec
      Andy Parkins 提交于
      I did this:
      
        $ git tag -s test-sign
        gpg: skipped "Andy Parkins <andyparkins@gmail.com>": secret key not available
        gpg: signing failed: secret key not available
        failed to sign the tag with GPG.
      
      The problem is that I have used the comment field in my key's UID
      definition.
      
        $ gpg --list-keys andy
        pub   1024D/4F712F6D 2003-08-14
        uid                  Andy Parkins (Google) <andyparkins@gmail.com>
      
      So when git-tag looks for "Andy Parkins <andyparkins@gmail.com>";
      obviously it's not going to be found.
      
      There shouldn't be a requirement that I use the same form of my name in
      my git repository and my gpg key - I might want to be formal (Andrew) in
      my gpg key and informal (Andy) in the repository.  Further I might have
      multiple keys in my keyring, and might want to use one that doesn't
      match up with the address I use in commit messages.
      
      This patch adds a configuration entry "user.signingkey" which, if
      present, will be passed to the "-u" switch for gpg, allowing the tag
      signing key to be overridden.  If the entry is not present, the fallback
      is the original method, which means existing behaviour will continue
      untouched.
      Signed-off-by: NAndy Parkins <andyparkins@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d67778ec
  6. 27 1月, 2007 5 次提交