1. 21 2月, 2007 6 次提交
    • J
      prefixcmp(): fix-up leftover strncmp(). · 1968d77d
      Junio C Hamano 提交于
      There were instances of strncmp() that were formatted improperly
      (e.g. whitespace around parameter before closing parenthesis)
      that caused the earlier mechanical conversion step to miss
      them.  This step cleans them up.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1968d77d
    • J
      prefixcmp(): fix-up mechanical conversion. · 599065a3
      Junio C Hamano 提交于
      Previous step converted use of strncmp() with literal string
      mechanically even when the result is only used as a boolean:
      
          if (!strncmp("foo", arg, 3)) ==> if (!(-prefixcmp(arg, "foo")))
      
      This step manually cleans them up to read:
      
          if (!prefixcmp(arg, "foo"))
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      599065a3
    • J
      Mechanical conversion to use prefixcmp() · cc44c765
      Junio C Hamano 提交于
      This mechanically converts strncmp() to use prefixcmp(), but only when
      the parameters match specific patterns, so that they can be verified
      easily.  Leftover from this will be fixed in a separate step, including
      idiotic conversions like
      
          if (!strncmp("foo", arg, 3))
      
        =>
      
          if (!(-prefixcmp(arg, "foo")))
      
      This was done by using this script in px.perl
      
         #!/usr/bin/perl -i.bak -p
         if (/strncmp\(([^,]+), "([^\\"]*)", (\d+)\)/ && (length($2) == $3)) {
                 s|strncmp\(([^,]+), "([^\\"]*)", (\d+)\)|prefixcmp($1, "$2")|;
         }
         if (/strncmp\("([^\\"]*)", ([^,]+), (\d+)\)/ && (length($1) == $3)) {
                 s|strncmp\("([^\\"]*)", ([^,]+), (\d+)\)|(-prefixcmp($2, "$1"))|;
         }
      
      and running:
      
         $ git grep -l strncmp -- '*.c' | xargs perl px.perl
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cc44c765
    • J
      Add prefixcmp() · cff0302c
      Junio C Hamano 提交于
      We have too many strncmp(a, b, strlen(b)).
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cff0302c
    • J
      Merge branch 'maint' · 9360f27f
      Junio C Hamano 提交于
      * maint:
        Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c.
      9360f27f
    • J
      Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c. · 3efb1f34
      Jason Riedy 提交于
      Thanks to Simon 'corecode' Schubert <corecode@fs.ei.tum.de> for
      the clean-up.  Defining the C99 standard PRIuMAX when necessary
      replaces UM_FMT and the awkward UM10_FMT.  There are no direct
      C99 translations for other uses of NO_C99_FORMAT in git, alas.
      Signed-off-by: NJason Riedy <ejr@cs.berkeley.edu>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      3efb1f34
  2. 20 2月, 2007 9 次提交
  3. 19 2月, 2007 5 次提交
  4. 18 2月, 2007 7 次提交
  5. 17 2月, 2007 4 次提交
  6. 16 2月, 2007 2 次提交
  7. 15 2月, 2007 7 次提交
    • J
      remotes.not-origin.tagopt · 24424fc2
      Junio C Hamano 提交于
      With a configuration entry like this:
      
      	[remote "alt-git"]
              	url = git://repo.or.cz/alt.git/git/
                      fetch = +refs/heads/*:refs/remotes/alt-git/*
                      tagopt = --no-tags
      
      you do not have to say "git pull --no-tags alt-git".  Just
      saying "git pull alt-git" would suffice.
      
      Obviously, if you want to get the tag from such an alternate
      remote in a separate namespace, you could also do something like:
      
      	[remote "alt-git"]
              	url = git://repo.or.cz/alt.git/git/
                      fetch = +refs/heads/*:refs/remotes/alt-git/*
                      fetch = +refs/tags/*:refs/remote-tags/alt-git/*
                      tagopt = --no-tags
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      24424fc2
    • J
      Merge branch 'maint' · 78e90f89
      Junio C Hamano 提交于
      * maint:
        GIT-VERSION-FILE: check ./version first.
        sha1_file.c: Round the mmap offset to half the window size.
        Make sure packedgitwindowsize is multiple of (pagesize * 2)
        Add RelNotes 1.5.0.1
        Still updating 1.5.0 release notes.
        git-daemon: Avoid leaking the listening sockets into child processes.
        Clarify two backward incompatible repository options.
      78e90f89
    • J
      GIT-VERSION-FILE: check ./version first. · 204d4092
      Junio C Hamano 提交于
      When somebody else extracts git tarball inside a larger project,
      'git describe' would reported the version number of that upper
      level project.
      
      Sometimes, using the consistent versioning across subdirectories
      of a larger project is useful, but it may not always be the
      right thing to do.
      
      This changes the script to check ./vertion file first, and then
      fall back to "git describe".  This way, by default, tarball
      distribution will get our own version.  If the upper level wants
      to use consistent versioning across its subdirectories, its
      Makefile can overwrite ./version file to force whatever version
      number they want to give us before descending into us.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      204d4092
    • A
      sha1_file.c: Round the mmap offset to half the window size. · 78a28df9
      Alexandre Julliard 提交于
      This ensures that a given area is mapped at most twice, and greatly
      reduces the virtual address space usage.
      Signed-off-by: NAlexandre Julliard <julliard@winehq.org>
      Acked-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      78a28df9
    • M
      Make gitk save and restore window pane position on Linux and Cygwin. · 9ca72f4f
      Mark Levedahl 提交于
      Subtle bugs remained on both Cygwin and Linux that caused the various
      window panes to be restored in positions different than where the user
      last placed them. Sergey Vlasov posed a pair of suggested fixes to this,
      what is done here is slightly different. The basic fix here involves
      a) explicitly remembering and restoring the sash positions for the upper
      window, and b) using paneconfigure to redundantly set height and width of
      other elements. This redundancy is needed as Cygwin Tcl has a nasty habit
      of setting pane sizes to zero if their slaves are not configured with a
      specific size, but Linux Tcl does not honor the specific size given.
      Signed-off-by: NMark Levedahl <mdl123@verizon.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9ca72f4f
    • M
      Make gitk save and restore the user set window position. · b6047c5a
      Mark Levedahl 提交于
      gitk was saving widget sizes and positions when the main window was
      destroyed, which is after all child widgets are destroyed. The cure
      is to trap the WM_DELETE_WINDOW event before the gui is torn down. Also,
      the saved geometry was captured using "winfo geometry .", rather than
      "wm geometry ." Under Linux, these two return different answers and the
      latter one is correct.
      
      [jc: credit goes to Brett Schwarz for suggesting the use of "wm protocol";
       I also squashed the follow-up patch to remove extraneous -0
       from expressions.]
      Signed-off-by: NMark Levedahl <mdl123@verizon.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      b6047c5a
    • J
      [PATCH] gitk: Use show-ref instead of ls-remote · 7426eb74
      Junio C Hamano 提交于
      It used to be ls-remote on self was the only easy way to grab
      the ref information.  Now we have show-ref which does not
      involve fork and IPC, so use it.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7426eb74