1. 03 11月, 2007 1 次提交
  2. 30 10月, 2007 1 次提交
  3. 27 9月, 2007 1 次提交
  4. 19 9月, 2007 3 次提交
  5. 13 9月, 2007 1 次提交
    • C
      Make "git reset" a builtin. · 0e5a7faa
      Carlos Rica 提交于
      This replaces the script "git-reset.sh" with "builtin-reset.c".
      
      A few git commands used in the script are called from the builtin also:
      "ls-files" to check for unmerged files, "read-tree" for resetting
      the index file in "mixed" and "hard" resets, and "update-index" to
      refresh at the end in the "mixed" reset and also for the option that
      gets selected paths into the index.
      
      The reset option with paths was implemented by Johannes Schindelin.
      
      Since the option that gets selected paths into the index is not
      a "reset" like the others because it does not change the HEAD at all,
      now the command is showing a warning when the "--mixed" option
      is supplied for that purpose.
      
      The following table shows the behaviour of "git reset" for
      the different supported options, where X means "changing"
      the HEAD, index or working tree:
      
      reset:  --soft  --mixed  --hard  -- <paths>
      HEAD       X       X        X        -
      index      -       X        X        X
      files      -       -        X        -
      Signed-off-by: NCarlos Rica <jasampler@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0e5a7faa
  6. 27 7月, 2007 1 次提交
    • C
      Make verify-tag a builtin. · 2ae68fcb
      Carlos Rica 提交于
      This replaces "git-verify-tag.sh" with "builtin-verify-tag.c".
      
      Testing relies on the "git tag -v" tests calling this command.
      
      A temporary file is needed when calling to gpg, because git is
      already creating detached signatures (gpg option -b) to sign tags
      (instead of leaving gpg to add the signature to the file by itself),
      and those signatures need to be supplied in a separate file to be
      verified by gpg.
      
      The program uses git_mkstemp to create that temporary file needed by
      gpg, instead of the previously used "$GIT_DIR/.tmp-vtag", in order to
      allow the command to be used in read-only repositories, and also
      prevent other instances of git to read or remove the same file.
      
      Signal SIGPIPE is ignored because the program sometimes was
      terminated because that signal when writing the input for gpg.
      
      The command now can receive many tag names to be verified.
      Documentation is also updated here to reflect this new behaviour.
      Signed-off-by: NCarlos Rica <jasampler@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2ae68fcb
  7. 20 7月, 2007 1 次提交
    • C
      Make git tag a builtin. · 62e09ce9
      Carlos Rica 提交于
      This replaces the script "git-tag.sh" with "builtin-tag.c".
      
      The existing test suite for "git tag" guarantees the compatibility
      with the features provided by the script version.
      
      There are some minor changes in the behaviour of "git tag" here:
      "git tag -v" now can get more than one tag to verify, like "git tag -d" does,
      "git tag" with no arguments prints all tags, more like "git branch" does,
      and "git tag -n" also prints all tags with annotations (without needing -l).
      Tests and documentation were also updated to reflect these changes.
      
      The program is currently calling the script "git verify-tag" for verify.
      This can be changed porting it to C and calling its functions directly
      from builtin-tag.c.
      Signed-off-by: NCarlos Rica <jasampler@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      62e09ce9
  8. 12 7月, 2007 1 次提交
  9. 27 6月, 2007 1 次提交
    • C
      Fix git-stripspace to process correctly long lines and spaces. · 9690c118
      Carlos Rica 提交于
      Now the implementation gets more memory to store completely
      each line before removing trailing spaces, and does it right
      when the last line of the file ends with spaces and no newline
      at the end.
      
      Function stripspace needs again to be non-static in order to call
      it from "builtin-tag.c" and the upcoming "builtin-commit.c".
      A new parameter skip_comments was also added to the stripspace
      function to optionally strips every shell #comment from the input,
      needed for doing this task on those programs.
      Signed-off-by: NCarlos Rica <jasampler@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9690c118
  10. 08 6月, 2007 2 次提交
  11. 25 5月, 2007 1 次提交
  12. 14 4月, 2007 1 次提交
    • J
      Add basic infrastructure to assign attributes to paths · d0bfd026
      Junio C Hamano 提交于
      This adds the basic infrastructure to assign attributes to
      paths, in a way similar to what the exclusion mechanism does
      based on $GIT_DIR/info/exclude and .gitignore files.
      
      An attribute is just a simple string that does not contain any
      whitespace.  They can be specified in $GIT_DIR/info/attributes
      file, and .gitattributes file in each directory.
      
      Each line in these files defines a pattern matching rule.
      Similar to the exclusion mechanism, a later match overrides an
      earlier match in the same file, and entries from .gitattributes
      file in the same directory takes precedence over the ones from
      parent directories.  Lines in $GIT_DIR/info/attributes file are
      used as the lowest precedence default rules.
      
      A line is either a comment (an empty line, or a line that begins
      with a '#'), or a rule, which is a whitespace separated list of
      tokens.  The first token on the line is a shell glob pattern.
      The rest are names of attributes, each of which can optionally
      be prefixed with '!'.  Such a line means "if a path matches this
      glob, this attribute is set (or unset -- if the attribute name
      is prefixed with '!').  For glob matching, the same "if the
      pattern does not have a slash in it, the basename of the path is
      matched with fnmatch(3) against the pattern, otherwise, the path
      is matched with the pattern with FNM_PATHNAME" rule as the
      exclusion mechanism is used.
      
      This does not define what an attribute means.  Tying an
      attribute to various effects it has on git operation for paths
      that have it will be specified separately.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d0bfd026
  13. 17 3月, 2007 1 次提交
  14. 04 3月, 2007 1 次提交
  15. 23 2月, 2007 1 次提交
    • J
      Add git-bundle: move objects and references by archive · 2e0afafe
      Johannes Schindelin 提交于
      Some workflows require use of repositories on machines that cannot be
      connected, preventing use of git-fetch / git-push to transport objects and
      references between the repositories.
      
      git-bundle provides an alternate transport mechanism, effectively allowing
      git-fetch and git-pull to operate using sneakernet transport. `git-bundle
      create` allows the user to create a bundle containing one or more branches
      or tags, but with specified basis assumed to exist on the target
      repository. At the receiving end, git-bundle acts like git-fetch-pack,
      allowing the user to invoke git-fetch or git-pull using the bundle file as
      the URL. git-fetch and git-ls-remote determine they have a bundle URL by
      checking that the URL points to a file, but are otherwise unchanged in
      operation with bundles.
      
      The original patch was done by Mark Levedahl <mdl123@verizon.net>.
      
      It was updated to make git-bundle a builtin, and get rid of the tar
      format: now, the first line is supposed to say "# v2 git bundle", the next
      lines either contain a prerequisite ("-" followed by the hash of the
      needed commit), or a ref (the hash of a commit, followed by the name of
      the ref), and finally the pack. As a result, the bundle argument can be
      "-" now.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      2e0afafe
  16. 14 2月, 2007 1 次提交
  17. 13 2月, 2007 1 次提交
  18. 09 2月, 2007 1 次提交
  19. 30 1月, 2007 1 次提交
  20. 29 1月, 2007 1 次提交
  21. 11 1月, 2007 1 次提交
  22. 10 1月, 2007 1 次提交
  23. 22 12月, 2006 1 次提交
  24. 21 12月, 2006 1 次提交
    • J
      git reflog expire · 4264dc15
      Junio C Hamano 提交于
      This prepares a place to collect reflog management subcommands,
      and implements "expire" action.
      
      	$ git reflog expire --dry-run \
      		--expire=4.weeks \
      		--expire-unreachable=1.week \
      		refs/heads/master
      
      The expiration uses two timestamps: --expire and --expire-unreachable.
      Entries older than expire time (defaults to 90 days), and entries older
      than expire-unreachable time (defaults to 30 days) and records a commit
      that has been rewound and made unreachable from the current tip of the
      ref are removed from the reflog.
      
      The parameter handling is still rough, but I think the
      core logic for expiration is already sound.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      4264dc15
  25. 07 12月, 2006 1 次提交
  26. 20 11月, 2006 1 次提交
  27. 09 11月, 2006 1 次提交
    • J
      git-pickaxe: retire pickaxe · acca687f
      Junio C Hamano 提交于
      Just make it take over blame's place.  Documentation and command
      have all stopped mentioning "git-pickaxe".  The built-in synonym
      is left in the command table, so you can still say "git pickaxe",
      but it probably is a good idea to retire it as well.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      acca687f
  28. 24 10月, 2006 2 次提交
  29. 23 10月, 2006 1 次提交
    • J
      Make prune also run prune-packed · 2eb53e65
      J. Bruce Fields 提交于
      Both the git-prune manpage and everday.txt say that git-prune should also prune
      unpacked objects that are also found in packs, by running git prune-packed.
      
      Junio thought this was "a regression when prune was rewritten as a built-in."
      
      So modify prune to call prune-packed again.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      2eb53e65
  30. 20 10月, 2006 1 次提交
    • J
      git-pickaxe: blame rewritten. · cee7f245
      Junio C Hamano 提交于
      Currently it does what git-blame does, but only faster.
      
      More importantly, its internal structure is designed to support
      content movement (aka cut-and-paste) more easily by allowing
      more than one paths to be taken from the same commit.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cee7f245
  31. 10 10月, 2006 1 次提交
  32. 24 9月, 2006 1 次提交
  33. 18 9月, 2006 1 次提交
    • L
      Start handling references internally as a sorted in-memory list · e1e22e37
      Linus Torvalds 提交于
      This also adds some very rudimentary support for the notion of packed
      refs.  HOWEVER! At this point it isn't used to actually look up a ref
      yet, only for listing them (ie "for_each_ref()" and friends see the
      packed refs, but none of the other single-ref lookup routines).
      
      Note how we keep two separate lists: one for the loose refs, and one for
      the packed refs we read. That's so that we can easily keep the two apart,
      and read only one set or the other (and still always make sure that the
      loose refs take precedence).
      
      [ From this, it's not actually obvious why we'd keep the two separate
        lists, but it's important to have the packed refs on their own list
        later on, when I add support for looking up a single loose one.
      
        For that case, we will want to read _just_ the packed refs in case the
        single-ref lookup fails, yet we may end up needing the other list at
        some point in the future, so keeping them separated is important ]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e1e22e37
  34. 17 9月, 2006 1 次提交
  35. 16 9月, 2006 2 次提交
    • L
      Add "git show-ref" builtin command · 358ddb62
      Linus Torvalds 提交于
      It's kind of like "git peek-remote", but works only locally (and thus
      avoids the whole overhead of git_connect()) and has some extra
      verification features.
      
      For example, it allows you to filter the results, and to choose whether
      you want the tag dereferencing or not. You can also use it to just test
      whether a particular ref exists.
      
      For example:
      
      	git show-ref master
      
      will show all references called "master", whether tags or heads or
      anything else, and regardless of how deep in the reference naming
      hierarchy they are (so it would show "refs/heads/master" but also
      "refs/remote/other-repo/master").
      
      When using the "--verify" flag, the command requires an exact ref path:
      
      	git show-ref --verify refs/heads/master
      
      will only match the exact branch called "master".
      
      If nothing matches, show-ref will return an error code of 1, and in the
      case of verification, it will show an error message.
      
      For scripting, you can ask it to be quiet with the "--quiet" flag, which
      allows you to do things like
      
      	git-show-ref --quiet --verify -- "refs/heads/$headname" ||
      		echo "$headname is not a valid branch"
      
      to check whether a particular branch exists or not (notice how we don't
      actually want to show any results, and we want to use the full refname for
      it in order to not trigger the problem with ambiguous partial matches).
      
      To show only tags, or only proper branch heads, use "--tags" and/or
      "--heads" respectively (using both means that it shows tags _and_ heads,
      but not other random references under the refs/ subdirectory).
      
      To do automatic tag object dereferencing, use the "-d" or "--dereference"
      flag, so you can do
      
      	git show-ref --tags --dereference
      
      to get a listing of all tags together with what they dereference.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      358ddb62
    • J
      Define fallback PATH_MAX on systems that do not define one in <limits.h> · d0c2449f
      Junio C Hamano 提交于
      Notably on GNU/Hurd, as reported by Gerrit Pape.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d0c2449f