1. 13 6月, 2007 12 次提交
    • J
      Extend --pretty=oneline to cover the first paragraph, · 4234a761
      Junio C Hamano 提交于
      so that an ugly commit message like this can be
      handled sanely.
      
      Currently, --pretty=oneline and --pretty=email (hence
      format-patch) take and use only the first line of the commit log
      message.  This changes them to:
      
       - Take the first paragraph, where the definition of the first
         paragraph is "skip all blank lines from the beginning, and
         then grab everything up to the next empty line".
      
       - Replace all line breaks with a whitespace.
      
      This change would not affect a well-behaved commit message that
      adheres to the convention of "single line summary, a blank line,
      and then body of message", as its first paragraph always
      consists of a single line.  Commit messages from different
      culture, such as the ones imported from CVS/SVN, can however get
      chomped with the existing behaviour at the first linebreak in
      the middle of sentence right now, which would become much easier
      to see with this change.
      
      The Subject: and --pretty=oneline output would become very long
      and unsightly for non-conforming commits, but their messages are
      already ugly anyway, and thischange at least avoids the loss of
      information.
      
      The Subject: line from a multi-line paragraph is folded using
      RFC2822 line folding rules at the places where line breaks were
      in the original.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4234a761
    • J
      Lift 16kB limit of log message output · 80583c0e
      Junio C Hamano 提交于
      Traditionally we had 16kB limit when formatting log messages for
      output, because it was easier to arrange for the caller to have
      a reasonably big buffer and pass it down without ever worrying
      about reallocating.
      
      This changes the calling convention of pretty_print_commit() to
      lift this limit.  Instead of the buffer and remaining length, it
      now takes a pointer to the pointer that points at the allocated
      buffer, and another pointer to the location that stores the
      allocated length, and reallocates the buffer as necessary.
      
      To support the user format, the error return of interpolate()
      needed to be changed.  It used to return a bool telling "Ok the
      result fits", or "Sorry, I had to truncate it".  Now it returns
      0 on success, and returns the size of the buffer it wants in
      order to fit the whole result.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      80583c0e
    • J
      Merge branch 'jc/blame' (early part) · 90ac368a
      Junio C Hamano 提交于
      * 'jc/blame' (early part):
        git-blame -w: ignore whitespace
        git-blame: do not indent with spaces.
      90ac368a
    • J
      refactor dir_add_name · 6815e569
      Jeff King 提交于
      This is in preparation for keeping two entry lists in the
      dir object.
      
      This patch adds and uses the ALLOC_GROW() macro, which
      implements the commonly used idiom of growing a dynamic
      array using the alloc_nr function (not just in dir.c, but
      everywhere).
      
      We also move creation of a dir_entry to dir_entry_new.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6815e569
    • J
      git-remote show: Also shorten non-fast-forward refs in the 'push' listing · 6718f1f0
      Johannes Sixt 提交于
      'git-remote show remote-name' lists the refs that are pushed to the remote
      by showing the 'Push' line from the config file. But before showing it,
      it shortened 'refs/heads/here:refs/heads/there' to 'here:there'. However,
      if the Push line is prefixed with a plus, the ref was not shortened.
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6718f1f0
    • M
      gitweb: change filename/directory name of snapshots · 9a7d9410
      Matthias Lederhofer 提交于
      /.git or .git is removed from the project name and the
      basename of the remaining path is used as the beginning of
      the filename and as the directory in the archive.
      
      The regexp will actually not strip off /.git or .git if there
      wouldn't be anything left after removing it.
      
      Currently the full project name is used as directory in the
      archive and the basename is used as filename.  For example a
      repository named foo/bar/.git will have a archive named
      .git-<version>.* and extract to foo/bar/.git.  With this patch
      the file is named bar-<version>.* and extracts to bar.
      Signed-off-by: NMatthias Lederhofer <matled@gmx.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9a7d9410
    • J
      Don't dereference a strdup-returned NULL · aa32eedc
      Jim Meyering 提交于
      There are only a dozen or so uses of strdup in all of git.
      Of those, most seem ok, but this one isn't:
      Signed-off-by: NJim Meyering <jim@meyering.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      aa32eedc
    • J
      Merge branch 'maint' · c43f64a0
      Junio C Hamano 提交于
      * maint:
      c43f64a0
    • J
      Merge branch 'aw/cvs' · 9bfe9f80
      Junio C Hamano 提交于
      * aw/cvs:
        cvsimport: add <remote>/HEAD reference in separate remotes more
        cvsimport: update documentation to include separate remotes option
        cvsimport: add support for new style remote layout
      9bfe9f80
    • J
      Merge branch 'ep/cvstag' · 03545396
      Junio C Hamano 提交于
      * ep/cvstag:
        Use git-tag in git-cvsimport
      03545396
    • J
      Merge branch 'ar/clone' into maint · 4f01d0f9
      Junio C Hamano 提交于
      * ar/clone:
        Fix clone to setup the origin if its name ends with .git
      4f01d0f9
    • J
      Merge branch 'sv/objfixes' into maint · 44bdc434
      Junio C Hamano 提交于
      * sv/objfixes:
        Don't assume tree entries that are not dirs are blobs
      44bdc434
  2. 12 6月, 2007 14 次提交
  3. 11 6月, 2007 14 次提交
    • J
      Merge branch 'master' of git://repo.or.cz/git-gui · 75d8ff13
      Junio C Hamano 提交于
      * 'master' of git://repo.or.cz/git-gui:
        git-gui: Internalize symbolic-ref HEAD reading logic
        git-gui: Expose the merge.diffstat configuration option
        git-gui: Allow users to delete remote branches
        git-gui: Allow users to rename branches through 'branch -m'
        git-gui: Disable tearoff menus on Windows, Mac OS X
        git-gui: Provide fatal error if library is unavailable
        git-gui: Enable verbose Tcl loading earlier
        git-gui: Show the git-gui library path in 'About git-gui'
        git-gui: GUI support for running 'git remote prune <name>'
        git gui 0.8.0
      75d8ff13
    • J
      Merge branch 'maint' · 27c1dbea
      Junio C Hamano 提交于
      * maint: (46 commits)
        git-gui: Changed blame header bar background to match main window
        git-gui: Favor the original annotations over the recent ones
        git-gui: Improve our labeling of blame annotation types
        git-gui: Use three colors for the blame viewer background
        git-gui: Jump to original line in blame viewer
        git-gui: Display both commits in our tooltips
        git-gui: Run blame twice on the same file and display both outputs
        git-gui: Display the "Loading annotation..." message in italic
        git-gui: Rename fields in blame viewer to better descriptions
        git-gui: Label the uncommitted blame history entry
        git-gui: Switch internal blame structure to Tcl lists
        git-gui: Cleanup redundant column management in blame viewer
        git-gui: Better document our blame variables
        git-gui: Remove unused commit_list from blame viewer
        git-gui: Automatically expand the line number column as needed
        git-gui: Make the line number column slightly wider in blame
        git-gui: Use lighter colors in blame view
        git-gui: Remove unnecessary space between columns in blame viewer
        git-gui: Remove the loaded column from the blame viewer
        git-gui: Clip the commit summaries in the blame history menu
        ...
      27c1dbea
    • J
      Merge branch 'maint' of git://repo.or.cz/git-gui into maint · c288a2f1
      Junio C Hamano 提交于
      * 'maint' of git://repo.or.cz/git-gui: (46 commits)
        git-gui: Changed blame header bar background to match main window
        git-gui: Favor the original annotations over the recent ones
        git-gui: Improve our labeling of blame annotation types
        git-gui: Use three colors for the blame viewer background
        git-gui: Jump to original line in blame viewer
        git-gui: Display both commits in our tooltips
        git-gui: Run blame twice on the same file and display both outputs
        git-gui: Display the "Loading annotation..." message in italic
        git-gui: Rename fields in blame viewer to better descriptions
        git-gui: Label the uncommitted blame history entry
        git-gui: Switch internal blame structure to Tcl lists
        git-gui: Cleanup redundant column management in blame viewer
        git-gui: Better document our blame variables
        git-gui: Remove unused commit_list from blame viewer
        git-gui: Automatically expand the line number column as needed
        git-gui: Make the line number column slightly wider in blame
        git-gui: Use lighter colors in blame view
        git-gui: Remove unnecessary space between columns in blame viewer
        git-gui: Remove the loaded column from the blame viewer
        git-gui: Clip the commit summaries in the blame history menu
        ...
      c288a2f1
    • S
      Merge branch 'maint' · 32af629a
      Shawn O. Pearce 提交于
      * maint: (38 commits)
        git-gui: Changed blame header bar background to match main window
        git-gui: Favor the original annotations over the recent ones
        git-gui: Improve our labeling of blame annotation types
        git-gui: Use three colors for the blame viewer background
        git-gui: Jump to original line in blame viewer
        git-gui: Display both commits in our tooltips
        git-gui: Run blame twice on the same file and display both outputs
        git-gui: Display the "Loading annotation..." message in italic
        git-gui: Rename fields in blame viewer to better descriptions
        git-gui: Label the uncommitted blame history entry
        git-gui: Switch internal blame structure to Tcl lists
        git-gui: Cleanup redundant column management in blame viewer
        git-gui: Better document our blame variables
        git-gui: Remove unused commit_list from blame viewer
        git-gui: Automatically expand the line number column as needed
        git-gui: Make the line number column slightly wider in blame
        git-gui: Use lighter colors in blame view
        git-gui: Remove unnecessary space between columns in blame viewer
        git-gui: Remove the loaded column from the blame viewer
        git-gui: Clip the commit summaries in the blame history menu
        ...
      32af629a
    • J
      gitweb: '--cc' for merges in 'commitdiff' view · cd030c3a
      Jakub Narebski 提交于
      Allow choosing between '-c' (combined diff) and '--cc' (compact
      combined) diff format in 'commitdiff' view for merge (multiparent)
      commits.  Default is now '--cc'.
      
      In the bottom part of navigation bar there is link allowing to change
      diff format: "combined" for '-c' (when using '--cc') and "compact" for
      '--cc' (when using '-c'), just on the right of "raw" link to
      'commitdiff_plain" view.
      
      About patchset part of diff --cc output: the difftree (whatchanged
      table) has "patch" links to anchors to individual patches (on the same
      page). The --cc option further compresses the patch output by
      omitting some hunks; when this optimization makes all hunks disappear,
      the patch is not shown (like in any other "empty diff" case). But the
      fact that patch has been simplified out is not reflected in the raw
      (difftree) part of diff output; the raw part is the same for '-c' and
      '--cc' options. As correcting difftree is rather out of the question,
      as it would require scanning patchset part before writing out
      difftree, we add "Simple merge" empty diffs as a place to have anchor
      to in place of those simplified out and removed patches.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cd030c3a
    • J
      gitweb: Add links to blobdiffs in from-file/to-file header for merges · 91af4ce4
      Jakub Narebski 提交于
      Add links to diff to file ('blobdiff' view) for each of individual
      versions of the file in a merge commit to the from-file/to-file header
      in the patch part of combined 'commitdiff' view for merges.
      
      The from-file/to-file header for combined diff now looks like:
      
        --- _1_/_git-gui/git-gui.sh_
        --- _2_/_git-gui.sh_
        +++ b/_git-gui/git-gui.sh_
      
      where _<filename>_ link is link to appropriate version of a file
      ('blob' view), and _<n>_ is link to respective diff to mentioned
      version of a file ('blobdiff' view). There is even hint provided in
      the form of title attribute.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      91af4ce4
    • J
      gitweb: Create special from-file/to-file header for combined diff · deaa01a9
      Jakub Narebski 提交于
      Instead of using default, diff(1) like from-file/to-file header for
      combined diff (for a merge commit), which looks like:
      
        --- a/git-gui/git-gui.sh
        +++ b/_git-gui/git-gui.sh_
      
      (where _link_ denotes [hidden] hyperlink), create from-file(n)/to-file
      header, using "--- <n>/_<filename>_" for each of parents, e.g.:
      
        --- 1/_git-gui/git-gui.sh_
        --- 2/_git-gui.sh_
        +++ b/_git-gui/git-gui.sh_
      
      Test it on one of merge commits involving rename, e.g.
        95f97567c1887d77f3a46b42d8622c76414d964d (rename at top)
        5bac4a67 (file from one branch)
      
      This is mainly meant to easier see renames in a merge commit.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      deaa01a9
    • J
      gitweb: Split git_patchset_body into separate subroutines · 90921740
      Jakub Narebski 提交于
      This commit makes git_patchset_body easier to read, and reduces level of
      nesting and indent level. It adds more lines that it removes because of
      extra parameter passing in subroutines, and subroutine calls in
      git_patchset_body. Also because there are few added comments.
      
      Below there are descriptions of all split-off subroutines:
      
      Separate formatting "git diff" header into format_git_diff_header_line.
      While at it fix it so it always escapes pathname. It would be even more
      useful if we decide to use `--cc' for merges, and need to generate by
      hand empty patches for anchors.
      
      Separate formatting extended (git) diff header lines into
      format_extended_diff_header_line. This one is copied without changes.
      
      Separate formatting two-lines from-file/to-file diff header into
      format_diff_from_to_header subroutine. While at it fix it so it always
      escapes pathname. Beware calling convention: it takes _two_ lines.
      
      Separate generating %from and %to hashes (with info used among others to
      generate hyperlinks) into parse_from_to_diffinfo subroutine. This one is
      copied without changes.
      
      Separate checking if file was deleted (and among others therefore does
      not have link to the result file) into is_deleted subroutine. This would
      allow us to easily change the algotithm to find if file is_deleted in
      the result.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      90921740
    • J
      gitweb: Improve "next" link in commitdiff view · ada3e1f7
      Jakub Narebski 提交于
      Check if 'hp' (hash_parent) parameter to 'commitdiff' view is one of
      'h' (hash) commit parents, i.e. if commitdiff is of the form
      "<commit>^<n> <commit>", and mark it as such in the bottom part of
      navigation bar. The "next" link in commitdiff view was introduced
      in commit 151602df
      
      If 'hb' is n-th parent of 'h', show the following at the bottom
      of navigation bar:
        (from parent n: _commit_)
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ada3e1f7
    • J
      gitweb: Provide links to commitdiff to each parent in 'commitdiff' view · 47598d7a
      Jakub Narebski 提交于
      Since commit-fb1dde4a we show combined diff for merges in 'commitdiff'
      view, and since commit-208ecb2e also in 'commit' view. Sometimes
      though one would want to see diff to one of merge commit parents. It
      is easy in 'commit' view: in the commit header part there are "diff"
      links for each of parent header. This commit adds such links also for
      'commitdiff' view.
      
      Add to difftree / whatchanged table row with "1", "2", ... links to
      'commitdiff' view for diff with n-th parent for merge commits, as a
      table header.  This is visible only in 'comitdiff' view, and only for
      a merge commit (comit with more than one parent).
      
      To save space links are shown as "n", where "n" is number of a parent,
      and not as for example shortened (to 7 characters) sha1 of a parent
      commit.  To make it easier to discover what links is for, each link
      has 'title' attribute explaining the link.
      
      Note that one would need to remember that difftree table in 'commit'
      view has one less column (it doesn't have "patch" link column), if one
      would want to add such table header also in 'commit' view.
      
      Example output:
                                1       2       3
        Makefile      patch | diff1 | diff2 | diff3 | blob | history
        cache.h       patch | diff1 | diff2 | diff3 | blob | history
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      47598d7a
    • J
      Merge branch 'maint' · c85d4f16
      Junio C Hamano 提交于
      * maint:
        tutorial: use "project history" instead of "changelog" in header
        Documentation: user-manual todo
        user-manual: add a missing section ID
        Fix typo in remote branch example in git user manual
        user-manual: quick-start updates
      c85d4f16
    • J
      mktag: minimally update the description. · 6cfec036
      Junio C Hamano 提交于
      It lacked a description for the (historically) optional tagger header line.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6cfec036
    • L
      Makefile: add an explicit rule for building assembly output · e36cb1c1
      Linus Torvalds 提交于
      In the kernel we have a rule for *.c -> *.s files exactly because
      it's nice to be able to easily say "ok, what does that generate".
      
      Here's a patch to add such a rule to git too, in case anybody is
      interested. It makes it much simpler to just do
      
      	make sha1_file.s
      
      and look at the compiler-generated output that way, rather than having to
      fire up gdb on the resulting binary.
      
      (Add -fverbose-asm or something if you want to, it can make the result
      even more readable)
      
      [jc: add *.s to .gitignore]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e36cb1c1
    • J
      tutorial: use "project history" instead of "changelog" in header · 23c9ccb2
      J. Bruce Fields 提交于
      The word "changelog" seems a little too much like jargon to me, and beginners
      must understand section headers so they know where to look for help.
      Signed-off-by: N"J. Bruce Fields" <bfields@citi.umich.edu>
      23c9ccb2