Code Monkey home page Code Monkey logo

Comments (6)

digitaljhelms avatar digitaljhelms commented on July 20, 2024

Output flags returned by git fetch (based on git version 1.7.8):

Also note that in fast-forwards, the output contains ".." (2 dots) but in a forced update the output contains "..." (3 dots).

https://gist.github.com/1480257

from git-dude.

ku1ik avatar ku1ik commented on July 20, 2024

Thanks for deep investigation.
However for me it looks like this:

$ echo " + 83e93db...b212eee branch-name -> origin/branch-name  (forced update)" | grep -F -- '->' | sed -E 's/^\s+\+\s+//'
83e93db...b212eee branch-name -> origin/branch-name  (forced update)

No "+" at the start of string. I wonder why sed is not stripping out "+" for you...

from git-dude.

digitaljhelms avatar digitaljhelms commented on July 20, 2024

AFAIK, not all sed's are equal; linux uses GNU sed, the BSDs use their own, etc. In looking at the manpage for sed on OS X, it looks like the POSIX.2 is being used for regex, so I'm guessing the regex used to strip the + would be different on OS X -- just a shot in the dark...

Either way, I figured it was safe to open this as an issue with what I had uncovered so far, considering more than a + could cause this issue.

from git-dude.

digitaljhelms avatar digitaljhelms commented on July 20, 2024

Considering awk is already in use, maybe the sed regex can be swapped for awk to avoid cross-platform issues?

from git-dude.

ku1ik avatar ku1ik commented on July 20, 2024

I appreciate that and I'll keep that issue open for some time, maybe more facts will come up.

As for sed and output flags you listed I've made small fix: #23
Can you try this fix on your machine?

from git-dude.

ku1ik avatar ku1ik commented on July 20, 2024

Pull #23 fixed the issue so I'm closing this one.

from git-dude.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.